reach a dialog box called Repeated (the word Repeated is highlighted in the upper
right corner). Select the variable IDNO in the box called “Subject variables” and select
the variable MONTH in the box called “Within-subject variables”. Under the heading
called “Covariance Matrix” there are two possible choices to click on: Robust Estima-
tor or Model-based Estimator. Keep it on the default Robust Estimator. Below that is
the heading called “Working Correlation Matrix.” To the right of the word Structure
is the default choice of an independent working correlation structure. Click on the
drop-down menu and you will see four other choices for the working correlation
structure: AR(1), Exchangeable, M-dependent, and Unstructured. Click on AR(1).
Next select a new dialog box called “Type of Model.” Click on Binary logistic under the
heading called “Binary Response or Event/Trials Data.” Select a new dialogue box
called “Response” and select the variable OUTCOME in the Dependent Variable box.
Click on the box called “Reference Category” and select First (lowest value) and click
on Continue. Select a new dialogue box called “Predictors” and enter the variables
BIRTHWGT, GENDER, and DIARRHEA in the Covariates box. Select a new dialogue
box called “Model” and enter the same covariates in the Model box. Select a new
dialogue box called “Statistics.” Under the heading Print, many of the output statis-
tics are checked by default. Click on one that is not checked by default called
“Working correlation matrix” (bottom left) and click OK to run the model. The
corresponding syntax follows:
Generalized Estimating Equations.
GENLIN outcome (REFERENCE¼FIRST) WITH birthwgt gender diarrhea
/MODEL birthwgt gender diarrhea INTERCEPT¼YES
DISTRIBUTION¼BINOMIAL LINK¼LOGIT
/CRITERIA METHOD¼FISHER(1) SCALE¼1 MAXITERATIONS¼ 100
MAXSTEPHALVING¼ 5
PCONVERGE¼1E-006 (ABSOLUTE)
SINGULAR¼1E-012 ANALYSISTYPE¼3(WALD) CILEVEL¼95 LIKELIHOOD¼FULL
/REPEATED SUBJECT¼idno WITHINSUBJECT¼month SORT¼YES CORRTYPE¼AR(1)
ADJUSTCORR¼YES COVB¼ROBUST
MAXITERATIONS¼100 PCONVERGE¼1e-006(ABSOLUTE) UPDATECORR¼ 1
/MISSING CLASSMISSING¼EXCLUDE
/PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION WORKINGCORR.
Selected output follows:
Model Information
Dependent Variable outcomea
Probability Distribution Binomial
Link Function Logit
Subject Effect 1 idno
Within-Subject Effect 1 month
Working Correlation Matrix Structure AR(1)
aThe procedure models 1.00 as the response, treating .00 as the reference category.