我的因变量Y是二分变量
层一(个人)变量有:性别sex、年龄age、年龄平方age_sq、教育程度edu、婚姻状态marry、工作状态work、个人收入inco_f
层二(区域:id)变量有:地区平均收入inco_s、地区人居GDPgdp_
我写的命令是:
xi:xtmelogit Y i.sex age age_sq i.edu i.marry i.work inco_f ||id: inco_s gdp_
①请问这样写是否正确
计算结果是:
Mixed-effects logistic regression Number of obs = 10322
Group variable: id Number of groups = 135
Obs per group: min = 20
avg = 76.5
max = 113
Integration points = 7 Wald chi2(15) = 384.20
Log likelihood = -5716.0612 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
Y | Coef. Std. Err. z P>|z| [95% Conf. Interval]
----------------+----------------------------------------------------------------
_Isex_1 | -.199809 .0490748 -4.07 0.000 -.2959937 -.1036242
age | -.0971992 .0107257 -9.06 0.000 -.1182212 -.0761773
age_sq | .0010898 .0001067 10.22 0.000 .0008808 .0012989
_Iedu_1 | .4277005 .0609518 7.02 0.000 .3082372 .5471638
_Iedu_2 | .5014418 .0808419 6.20 0.000 .3429945 .659889
_Iedu_3 | .6184027 .1098142 5.63 0.000 .4031709 .8336345
_Iedu_4 | .9097251 .1138878 7.99 0.000 .6865091 1.132941
_Iedu_5 | 1.093062 .1364763 8.01 0.000 .8255739 1.360551
_Iedu_99 | -.0499472 .4975509 -0.10 0.920 -1.025129 .9252346
_Imarry_1 | .8075008 .1056393 7.64 0.000 .6004515 1.01455
_Imarry_2 | -.0402689 .1298514 -0.31 0.756 -.2947729 .2142351
_Imarry_99 | .9517722 .3816935 2.49 0.013 .2036668 1.699878
_Iwork_1 | -.1780915 .055609 -3.20 0.001 -.2870831 -.0690998
_Iwork_99 | -1.096483 .5203953 -2.11 0.035 -2.116439 -.0765269
inco_f | .0924837 .0193242 4.79 0.000 .054609 .1303583
_cons | 1.975386 .2380678 8.30 0.000 1.508782 2.441991
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval]
-------------------------------------+------------------------------------------------
id: Independent |
sd(inco_s) | 1.76e-09 .0664358 0 .
sd(gdp_) | 8.58e-10 .0205738 0 .
sd(_cons) | .4833669 .0414339 .4086132 .5717963
------------------------------------------------------------------------------
LR test vs. logistic regression: chi2(3) = 224.47 Prob > chi2 = 0.0000
②层二变量没有logit系数,我怎么得到inco_s和gad_的logit系数、P值和R2呢?
③最好能稍微帮我分析一下层二结果的含义