How to Use SAS ® for GMM Logistic Regression Models for Longitudinal Data with Time-Dependent Covariates

In longitudinal data, it is important to account for the correlation due to repeated measures and timedependent covariates. Generalized method of moments can be used to estimate the coefficients in longitudinal data, although there are currently limited procedures in SAS ® to produce GMM estimates for correlated data. In a recent paper, Lalonde, Wilson, and Yin provided a GMM model for estimating the coefficients in this type of data. SAS PROC IML was used to generate equations that needed to be solved to determine which estimating equations to use. In addition, this study extended classifications of moment conditions to include a type IV covariate. Two data sets were evaluated using this method, including rehospitalization rates from a Medicare database as well as body mass index and future morbidity rates among Filipino children. Both examples contain binary responses, repeated measures, and timedependent covariates. However, while this technique is useful, it is tedious and can also be complicated when determining the matrices necessary to obtain the estimating equations. We provide a concise and user-friendly macro to fit GMM logistic regression models with extended classifications. INTRODUCTION Longitudinal studies focus on a particular outcome measured across time. While studies investigating changes over time are very useful, multiple measurements collected on a single subject can result in correlated observations. The correlation can affect the standard errors in the estimation processes as the variation within a particular subject is likely to be much smaller than the variation between subjects. Moreover, time-dependent covariates present some additional challenges in working with longitudinal modeling. In particular, some predictors can change over time due to feedback from the response, and need to be accounted for in the modeling process. In turn, the change in predictors can impact the response. SAS currently offers procedures, which utilize the statistical methods of generalized estimating equations (GEE) and generalized linear mixed models (GLMM), to analyze longitudinal data with binary outcomes. A macro that performs generalized method of moments (GMM) logistic regression is presented, which can appropriately take into account the correlation between covariate values. The use of the GMM macro is illustrated and compared to the results to SAS PROC GENMOD and PROC GLIMMIX. The three methods are demonstrated through the analysis of a body mass index (BMI) and morbidity dataset collected in the Philippines. THE DATA The data were collected by the International Food Policy Research Institute in the Bukidnon Province in the Philippines. BMI and morbidity were measured for 370 children at three separate time points, separated by 4-month intervals. The purpose of this study was to predict morbidity for children over time based on various factors. The dataset contains a total of 1,110 observations, with three different BMI measurements for each of the 370 children. For each of the children (labeled by childID), the visit number (time) and body mass index (BMI) were recorded. For each of the three visits, it was recorded whether the child was sick (sick = 1) or healthy (sick = 0) at the time of measurement. Although additional information was collected in the study, we wish to predict morbidity based on the visit number and the child’s BMI. The SAS data set was created using the following code: data Morbidity; input childID BMI time sick; datalines; 206 14.95059 1 0