e*****r 发帖数: 621 | 1 就是 mlogit model run 出来以后,要用一些 hypothetical independent variable
value 来算 predicted probability。请问在Stata 12下面具体的code是什么?
我知道在以前版本的Stata下,可以用 prvalue 来算,比如
prvalue, x(a=xx b=xx c=xx) rest(mean)
可现在发现 prvalue 不被recognize了。
另外知道在 LOGIT model里面,可以用 adjust a=xx b=xx c=xx, pr 但是发现这个在
MLOGIT 下面不行。
谢谢指教! | K*****2 发帖数: 9308 | 2 试试 -margins-
. margins age, at(a=XXX b=XXX c=XXX) | e*****r 发帖数: 621 | 3 Thank you so much, you got a baozi.
不过一个小问题是:我试的时候,如果把 age 去掉,就没有问题。但是一旦加上,就
告诉我 "age" is not in the covariate list。但是事实上在mlogit那一行里确实有
age这个 covariate呀。会是什么状况?
【在 K*****2 的大作中提到】 : 试试 -margins- : . margins age, at(a=XXX b=XXX c=XXX)
| K*****2 发帖数: 9308 | 4 thx for baozi
age是我随便打的,这个位置必须放factor variable,而且前面mlogit里面要用i.XXX
举个例子
webuse sysdsn1, clear
mlogit insure age male nonwhite i.site
margins male, at(age=40 nonwhite=1 site=1)
就出错,尽管male是0,1变量
换成
webuse sysdsn1, clear
mlogit insure age i.male nonwhite i.site
margins male, at(age=40 nonwhite=1 site=1)
就可以
【在 e*****r 的大作中提到】 : Thank you so much, you got a baozi. : 不过一个小问题是:我试的时候,如果把 age 去掉,就没有问题。但是一旦加上,就 : 告诉我 "age" is not in the covariate list。但是事实上在mlogit那一行里确实有 : age这个 covariate呀。会是什么状况?
|
|