random effect,ss^2 , is estimated at 3.255 to the right of the heading “sigma_u.” The
estimated variance of the random effect can be found by squaring the standard
deviation (3.255^2 ¼10.6). The natural log of the variance estimate is also given in
the output at 2.36, to the right of the heading “/Insig2u.” The estimated value for “rho”
is 0.763, which is the proportion of the total variance contributed by the subject
specific variance component. The likelihood ratio test for the random effect is highly
significant (chi-square¼61.04) at the bottom of the output.
An alternative command for running this model is thextmelogitcommand. The
xtmelogitcommand is designed to run mixed logistic models. That is, a mixing of
fixed and random effects. The code to run the random intercept model with the
xtmelogitcommand follows:
xtmelogit outcome birthwgt gender diarrhea || idno: , or intpoints(3)
The symbol || separates the fixed effects from the subject specific random effect. The
oroption requests the parameter estimates for the fixed effects be exponentiated. The
intpoints(3)option sets the number of quadrature points to 3 for the numerical
estimation rather than the default 7. It is generally recommended to have more rather
than fewer quadrature points for estimation. However, this model did not numeri-
cally estimate without this option to lower the default number, which likely indicates
a problem with model stability. The output follows:
Mixed-effects logistic regression Number of obs ¼ 1203
Group variable: idno Number of groups ¼ 136
Obs per group: min ¼ 5
avg ¼ 8.8
max ¼ 9
Integration points¼3 Wald chi2(3) ¼ 4.26
Log likelihood¼170.33099 Prob>chi2 ¼ 0.2352
outcome Odds Ratio Std. Err. z P>jzj [95% Conf. Interval].
birthwgt .9992259 .0005833 1.33 0.185 .9980833 1.00037
gender 1.706531 1.450536 0.63 0.529 .3225525 9.028756
diarrhea 2.763684 1.856623 1.51 0.130 .7407258 10.31144
Random-effects Parameters Estimate Std. Err. [95% Conf. Interval]
idno: Identity
sd(_cons) 2.732656 .5458486 1.847385 4.042153
LR test vs. logistic regression: chibar2(01)¼149.39 Prob>¼chibar2¼0.0000
The estimated odds ratio for DIARRHEA is 2.76, but is not statistically significant
(p-value¼0.130). The standard deviation of the random effect,ss^2 , is estimated at 2.73
to the right of the heading “sd (_cons).” The results are similar but not identical to that
obtained with thextlogitcommand as the method of estimation is somewhat different.