蓝色 发表于 2019-1-9 08:32
你命令的最前面不是有 xi:
不要用那个
老师好,尝试了您说的用margins
. do "D:\Stata14\STD04000000.tmp"
. oprobit happiness i.housenum sex age c.age#c.age dangyuan eduyear hukou marry1 zjxy ///
> lnincome zfmj urban_pop1 dqgdpdex houprice finance_worker,robust nolog
Ordered probit regression Number of obs = 4,086
Wald chi2(16) = 303.90
Prob > chi2 = 0.0000
Log pseudolikelihood = -4389.563 Pseudo R2 = 0.0346
------------------------------------------------------------------------------
| Robust
happiness | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
housenum |
有一套房 | .3883352 .0614187 6.32 0.000 .2679567 .5087136
多套房 | .6272601 .0734501 8.54 0.000 .4833006 .7712196
|
sex | -.1278365 .0361398 -3.54 0.000 -.1986692 -.0570039
age | -.082792 .0138948 -5.96 0.000 -.1100252 -.0555587
|
c.age#c.age | .0008873 .0001625 5.46 0.000 .0005689 .0012057
|
dangyuan | .0589298 .056098 1.05 0.293 -.0510203 .1688798
eduyear | .0337274 .0050082 6.73 0.000 .0239115 .0435433
hukou | -.0078488 .0375733 -0.21 0.835 -.0814911 .0657935
marry1 | .4281599 .0638562 6.71 0.000 .303004 .5533158
zjxy | .1269487 .0608625 2.09 0.037 .0076603 .246237
lnincome | .0116192 .0051171 2.27 0.023 .0015899 .0216485
zfmj | .0010055 .0002676 3.76 0.000 .0004811 .00153
urban_pop1 | -1.559975 .3523334 -4.43 0.000 -2.250536 -.8694147
dqgdpdex | .0039186 .0048791 0.80 0.422 -.0056442 .0134814
houprice | -.2947213 .095229 -3.09 0.002 -.4813668 -.1080758
finance_wo~r | .0268949 .0070489 3.82 0.000 .0130793 .0407104
-------------+----------------------------------------------------------------
/cut1 | -2.472257 .776837 -3.99483 -.9496846
/cut2 | -1.566008 .7726679 -3.080409 -.0516064
/cut3 | -.7858455 .7728116 -2.300528 .7288374
/cut4 | .9925541 .7733049 -.5230957 2.508204
------------------------------------------------------------------------------
.
end of do-file
.
.
.
. do "D:\Stata14\STD04000000.tmp"
. margins,dydx(*), predict(outcome(1))
invalid 'predict'
r(198);
end of do-file
r(198);
最后显示 无效的predict 无效 不明白是什么意思