Logistic Regression: A Self-learning Text, Third Edition (Statistics in the Health Sciences)

(vip2019) #1

This model is numerically very unstable and the confidence interval for DIARRHEA
is basically estimated from 0 to infinity, which is not useful. There are three rando-
m effect parameters estimated: the standard deviation of the random slope for
DIARRHEA, the random intercept, and the correlation between them. A likelihood
ratio test of the three random effect parameters is given at the bottom of the output.


Thextmelogitcommand does not allow autocorrelation of the residuals to be mod-
eled along with the random effects but rather assumes that the residuals have an
independent correlation structure. However, thextmelogitcommand does provide
estimates for nested random effects. As a hypothetical example, suppose 30 daycare
centers were randomly sampled and within each daycare center 10 infants were
sampled yielding 300 infants in all (3010). Also, each infant has monthly measure-
ments over a 9-month period. In this setting, we can consider three types of indepen-
dent variables: (1) a variable like DIARRHEA whose status may vary within an infant
from month-to-month, (2) a variable like GENDER which is fixed at the infant level
(does not vary month-to-month), and (3) a variable that is fixed at the daycare level
such as the size of the daycare center. Here we have a cluster of daycare centers and
nested within each daycare center is a cluster of infants. In the infant dataset, the
variable identifying each infant is called IDNO. Suppose the variable identifying
the daycare center was called DAYCARE (this variable does not actually exist in the
infant dataset). Consider a model with a random intercept for each infant as well as a
random intercept for each daycare center. We continue to use BIRTHWEIGHT,
GENDER, and DIARRHEA as fixed effects. The code to run such a model using the
xtmelogitcommand is:


xtmelogit outcome birthwgt gender diarrhea || daycare: || idno:


This model contains a random intercept at the daycare level and a random intercept
at the infant level. The symbol “||” separating the random effects indicates that the
random effect for infant (IDNO) is nested within DAYCARE. Random slope para-
meters could be listed after the code “|| daycare:” if they are to vary by daycare or
listed after the code “|| idno:” if they are to vary by infant.


This completes our discussion on the use of SAS, SPSS, and STATA to run different
types of logistic models. An important issue for all three of the packages discussed is
that the user must be aware of how the outcome event is modeled for a given package
and given type of logistic model. If the parameter estimates are the negative of what is
expected, this could be an indication that the outcome value is not correctly specified
for the given package and/or procedure.


All three statistical software packages presented have built-in Help functions which
provide further details about the capabilities of the programs. The web-based sites of
the individual companies are another source of information about the packages:
http://www.sas.com/for SAS,http://www.spss.com/for SPSS, andhttp://www.stata.
com/for Stata.


STATA 665

Free download pdf