由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - how to convert a categorical variable into a continuous variable
相关主题
请问:想fit gamma 并同时用lasso的方法做variable selection问个问题,高手请进
proc GLM和proc Reg、proc Genmod的比较菜鸟请教一个问题
包子求解释,为什么anova解释variance这么少how to interpret the interaction terms between two continuous variables in regression model?
还是个MODEL问题如何在一个regression model里面同时处理continuous和categorical变量
model和variables都sig.但每个category都不sig[合集] 电话面试完了,肯定没戏,大家帮我看看题目,就算学习吧
一个covariance的问题求问~做大数据时怎样知道哪些predictor应该构造interaction term??
求一个用SPSS算multilevel logistic regression。谢谢了。一个 proc mixed 的问题
[合集] a R question一道SAS面试题,关于dummy variable
相关话题的讨论汇总
话题: variable话题: variables话题: continuous话题: convert
进入Statistics版参与讨论
1 (共1页)
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.
1 (共1页)
进入Statistics版参与讨论
相关主题
一道SAS面试题,关于dummy variablemodel和variables都sig.但每个category都不sig
求教:SAS怎样实现限制必须经过某个点的GLM一个covariance的问题
关于lasso的variable selection问题求一个用SPSS算multilevel logistic regression。谢谢了。
问个用SPSS分析CATEGORICAL IV的问题[合集] a R question
请问:想fit gamma 并同时用lasso的方法做variable selection问个问题,高手请进
proc GLM和proc Reg、proc Genmod的比较菜鸟请教一个问题
包子求解释,为什么anova解释variance这么少how to interpret the interaction terms between two continuous variables in regression model?
还是个MODEL问题如何在一个regression model里面同时处理continuous和categorical变量
相关话题的讨论汇总
话题: variable话题: variables话题: continuous话题: convert