s**********l 发帖数: 395 | 1 Now for each categorical variable, it has 20 levels 1-20.
In order to use GLM, I need to convert more than 100 categorical variables
into continuous variables.
Who knows how to do this in SAS? Thanks. | a********s 发帖数: 188 | 2 Actually you do not need to transfer them into numerical, why not specify
CLASS option? If you have to, you may just create new variables like:
Var_New = Var * 1; | s**********l 发帖数: 395 | 3 Sorry, I should mention Genmod rather than GLM in SAS.
I think in Generalized liner model, if the dependent variable follows a
gamma distribution, the predictors can not be categorical variables, can
they?
There are totally 120 categorical variables and each of them have 20 levels.
Therefore, I tried to convert these categorical variables into continuous
variables so that I can build the model; however, I did not know how to do
so.
Who knows? Thanks. | l*********s 发帖数: 5409 | 4 1. fitting with class variables is OK
2. if the categorical variables already have numeric formats, you don't need to
declare them to be continuous.
levels.
【在 s**********l 的大作中提到】 : Sorry, I should mention Genmod rather than GLM in SAS. : I think in Generalized liner model, if the dependent variable follows a : gamma distribution, the predictors can not be categorical variables, can : they? : There are totally 120 categorical variables and each of them have 20 levels. : Therefore, I tried to convert these categorical variables into continuous : variables so that I can build the model; however, I did not know how to do : so. : Who knows? Thanks.
| a********s 发帖数: 188 | 5 Same opinions with littlebirds | s**********l 发帖数: 395 | 6 Thanks so much for all the replies. |
|