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

(vip2019) #1

The code to run this model with two random effects follows:


PROC GLIMMIX DATA¼REF.INFANT;
CLASS IDNO;
MODEL OUTCOME¼BIRTHWGT GENDER DIARRHEA / DIST¼BIN LINK¼LOGIT
SOLUTION;
RANDOM INTERCEPT DIARRHEA / SUBJECT¼IDNO TYPE¼UN GCORR;
RANDOM _RESIDUAL_;
ESTIMATE‘log odds ratio (DIARRHEA 1 vs 0)’DIARRHEA 1/EXP;
RUN;

The random effects (INTERCEPT and DIARRHEA) are listed after the key word
RANDOM. Since there is more than one random effect, we need to consider the
covariation between the random effects. The TYPE¼UN option requests an unstruc-
tured covariance structure for the working covariance structure for the random
effects (here a 22 G matrix). The GCORR option in the first RANDOM statement
requests that the correlation matrix for the G matrix be printed in the output. The
RANDOM RESIDUAL statements request variance estimates for the residual (the R
matrix) in the output with its standard error. The SUBJECT¼IDNO identifies IDNO
as the cluster variable. The output follows:


The GLIMMIX Procedure

Model Information
Data Set REF.INFANT
Response Variable OUTCOME
Response Distribution Binomial
Link Function Logit
Variance Function Default
Variance Matrix Blocked By IDNO
Estimation Technique Residual PL
Degrees of Freedom Method Containment

Dimensions

G-side Cov. Parameters 3
R-side Cov. Parameters 1
Columns in X 4
Columns in Z per Subject 2
Subjects (Blocks in V) 136
Max Obs per Subject 9

Estimated G Correlation Matrix
Effect Row Col1 Col2
Intercept 1 1.0000 0.2716
DIARRHEA 2 0.2716 1.0000

632 Appendix: Computer Programs for Logistic Regression

Free download pdf