b********1 发帖数: 2861 | 1 为什么用SAS运行ordered probit model, 得到的parameter estimated 都是反的? 在
R里面,用同样的数据,得出的结果是正常的,就是跟SAS差个正负号关系。SAS跟R的
order 都是一样的顺序,请问这种情况我是不是需要修改什么系统设置? 之前用SAS9.
2的时候无此现象,现在装了一个9.3才出现错误。
多谢! |
b********1 发帖数: 2861 | |
t**c 发帖数: 539 | 3 Are your explanatory variables categorical?
SAS by default calculates the coefficient for (X=0), not for (X=1) as we
usually do or as in R. Therefore the signs of the coefficients will be
opposite. |
b********1 发帖数: 2861 | 4 多谢回复!
这个我在模型里面已经指定了,比如x=0,1,2.我在模型里指定class x(ref="0").所以
不会是这个问题,另外我把categorical variable 去掉,只有continuous variable,
也出现同样的错误。
R里面我用relevel做了同样的设定,所以我看不出来错误出在哪里。
【在 t**c 的大作中提到】 : Are your explanatory variables categorical? : SAS by default calculates the coefficient for (X=0), not for (X=1) as we : usually do or as in R. Therefore the signs of the coefficients will be : opposite.
|
h***i 发帖数: 3844 | 5 he said dependent variable, not independent variable.
【在 b********1 的大作中提到】 : 多谢回复! : 这个我在模型里面已经指定了,比如x=0,1,2.我在模型里指定class x(ref="0").所以 : 不会是这个问题,另外我把categorical variable 去掉,只有continuous variable, : 也出现同样的错误。 : R里面我用relevel做了同样的设定,所以我看不出来错误出在哪里。
|
t**c 发帖数: 539 | 6 Hehe, I meant independent variable.
But it is also true for the dependent variable.SAS by default model the
probability for event of 0. So in your model, you may use Y(Desc) or Y(event
='1') to force SAS to model the probability for event of 1.
【在 h***i 的大作中提到】 : he said dependent variable, not independent variable.
|
h***i 发帖数: 3844 | 7 ......
my first impression is, sas estimated Prob(Y=0) instead of Prob(Y=1);
event
【在 t**c 的大作中提到】 : Hehe, I meant independent variable. : But it is also true for the dependent variable.SAS by default model the : probability for event of 0. So in your model, you may use Y(Desc) or Y(event : ='1') to force SAS to model the probability for event of 1.
|
b********1 发帖数: 2861 | 8 The response variable has 4 classes, 1,2,3,4. How can I set up the ref level
for the response variable? When I ran in SAS 9.2 with the same code, it
turns out the parameter estimates are in correct sign. |