|
估计是数据的问题
clear
set obs 1000
forv i=0/4{
gen x`i'=uniform()
}
gen y=1 if x0<=0.3
replace y=2 if x0>0.3 & x0<=0.6
replace y=3 if x0>0.6
egen id=seq(),b(200)
bysort id: gen t=_n
regoprob2 y x1-x4,i(id)
根据产生的模拟数据,是没有问题的
. clear
. set obs 1000
obs was 0, now 1000
. forv i=0/4{
2. gen x`i'=uniform()
3. }
.
. gen y=1 if x0<=0.3
(694 missing values generated)
. replace y=2 if x0>0.3 & x0<=0.6
(321 real changes made)
. replace y=3 if x0>0.6
(373 real changes made)
.
. egen id=seq(),b(200)
. bysort id: gen t=_n
.
.
. regoprob2 y x1-x4,i(id)
Fitting constant-only model:
Fitting full model:
Iteration 0: log likelihood = -1158.4897 (not concave)
Iteration 1: log likelihood = -1125.6207
Iteration 2: log likelihood = -1099.2043
Iteration 3: log likelihood = -1097.3984 (not concave)
Iteration 4: log likelihood = -1097.3983
Iteration 5: log likelihood = -1097.3965
Iteration 6: log likelihood = -1097.3965
Random Effects Generalized Ordered Probit Number of obs = 1000
LR chi2(8) = -11.34
Log likelihood = -1097.3965 Prob > chi2 = 1.0000
------------------------------------------------------------------------------
y | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
mleq1 |
x1 | -.0702588 .1442088 -0.49 0.626 -.3529029 .2123854
x2 | -.0362581 .1449297 -0.25 0.802 -.3203152 .2477989
x3 | .0689639 .1482779 0.47 0.642 -.2216554 .3595831
x4 | .1475481 .1406295 1.05 0.294 -.1280807 .4231768
_cons | .8875506 266.6399 0.00 0.997 -521.717 523.4921
-------------+----------------------------------------------------------------
mleq2 |
x1 | -.1283095 .1392873 -0.92 0.357 -.4013076 .1446887
x2 | .0093806 .1420836 0.07 0.947 -.2690982 .2878593
x3 | .2402977 .1445976 1.66 0.097 -.0431084 .5237037
x4 | -.0676559 .1381038 -0.49 0.624 -.3383344 .2030226
_cons | .0828413 266.6399 0.00 1.000 -522.5217 522.6874
-------------+----------------------------------------------------------------
rho |
_cons | .4871581 307.6014 0.00 0.999 -602.4005 603.3748
------------------------------------------------------------------------------
.
end of do-file
|