LOGSELECT Procedure

Example 18.6 Binary Model with Repeated Measures

(View the complete code for this example.)

This example uses data from the "Six Cities" study of the effects of air pollution on health (Ware et al. 1984). The analysis concerns the 16 selected cases in Lipsitz et al. (1994). The response is binary and indicates the wheezing status of 16 children. The children were assessed at ages 9, 10, 11, and 12 years. A value of 1 for wheezing status indicates the occurrence of wheezing at that age. The following statements create the data set:

data mylib.six;
     input case city$ @@;
   do i=1 to 4;
      input age smoke wheeze @@;
      output;
   end;
   datalines;
 1 portage   9 0 1  10 0 1  11 0 1  12 0 0
 2 kingston  9 1 1  10 2 1  11 2 0  12 2 0
 3 kingston  9 0 1  10 0 0  11 1 0  12 1 0
 4 portage   9 0 0  10 0 1  11 0 1  12 1 0
 5 kingston  9 0 0  10 1 0  11 1 0  12 1 0
 6 portage   9 0 0  10 1 0  11 1 0  12 1 0
 7 kingston  9 1 0  10 1 0  11 0 0  12 0 0
 8 portage   9 1 0  10 1 0  11 1 0  12 2 0
 9 portage   9 2 1  10 2 0  11 1 0  12 1 0
10 kingston  9 0 0  10 0 0  11 0 0  12 1 0
11 kingston  9 1 1  10 0 0  11 0 1  12 0 1
12 portage   9 1 0  10 0 0  11 0 0  12 0 0
13 kingston  9 1 0  10 0 1  11 1 1  12 1 1
14 portage   9 1 0  10 2 0  11 1 0  12 2 1
15 kingston  9 1 0  10 1 0  11 1 0  12 2 1
16 portage   9 1 1  10 1 1  11 2 0  12 1 0
;

The mean response is modeled by using a logistic regression model. The explanatory variables are city of residence (city), age in years (age), and maternal smoking status at each age (smoke). The responses for each child are assumed to be equally correlated, indicating that an exchangeable correlation structure is appropriate. The following statements fit the model by using generalized estimating equations (GEEs) and the chosen correlation structure:

proc logselect data=mylib.six;
   class case city;
   model wheeze(event='1') = city age smoke;
   repeated subject=case / type=exch covb corrw printmle;
run;

The MODEL statement specifies the mean model for the wheeze response variable as a logistic regression that uses city, age, and smoke as explanatory variables. This is the same specification that you use for an ordinary logistic regression.

The REPEATED statement uses GEE for parameter estimation, specifies the working correlation structure, and controls the output that is displayed. The SUBJECT=CASE option specifies that the case variable identifies the individual subjects in the data set. The case variable must be listed in the CLASS statement. The TYPE=EXCH option specifies that the procedure use the exchangeable working correlation structure. The exchangeable correlation structure does not rely on an order in the repeated measurements, so you do not need to specify a within-subject effect in the WITHIN= option. The COVB option displays the parameter estimates covariance matrix, and the CORRW option displays the final working correlation matrix. The PRINTMLE option displays a table of the initial parameter estimates that are produced by maximum likelihood estimation.

The initial parameter estimates for the GEE fit are computed by an ordinary logistic regression, which assumes no dependence between the repeated measurements.

Output 18.6.1 displays general information about the GEE model fit.

Output 18.6.1: GEE Model Information

The LOGSELECT Procedure

GEE Model Information
Correlation StructureExchangeable
Subject Effectcase (16 levels)
Number of Clusters16
Correlation Matrix Dimension4
Maximum Cluster Size4
Minimum Cluster Size4


Output 18.6.2 displays the estimated parameter covariance matrices. The COVB option produces both the model-based and empirical covariance matrices.

Output 18.6.2: GEE Parameter Estimate Covariance Matrices

GEE Parameter Estimates
Model-Based Covariance Matrix
 Interceptcity kingstonagesmoke
Intercept5.7495-0.2226-0.53470.01655
city kingston-0.22260.4548-0.002410.01876
age-0.5347-0.002410.05300-0.01658
smoke0.016550.01876-0.016580.1910

GEE Parameter Estimates
Empirical Covariance Matrix
 Interceptcity kingstonagesmoke
Intercept9.3399-0.8510-0.8325-0.1653
city kingston-0.85100.47370.057360.04023
age-0.83250.057360.07778-0.00236
smoke-0.16530.04023-0.002360.1305


The working correlation matrix that is specified by the CORRW option is displayed in Output 18.6.3.

Output 18.6.3: GEE Working Correlation Matrix

Working Correlation Matrix
 Col1Col2Col3Col4
Row11.00000.16480.16480.1648
Row20.16481.00000.16480.1648
Row30.16480.16481.00000.1648
Row40.16480.16480.16481.0000


The exchangeable working correlation structure is characterized by a single parameter. Output 18.6.4 shows the table that contains this information.

Output 18.6.4: GEE Exchangeable Correlation

GEE Exchangeable Correlation
Correlation0.164816


Output 18.6.5 displays the "GEE Parameter Estimates" table. This table shows the parameter estimates, standard errors, chi-square values, and p-values for the parameter estimates. The table uses the empirical standard error estimates. You can also produce a table that uses the model-based standard error estimates by specifying the MODELSE option in the REPEATED statement.

Output 18.6.5: GEE Parameter Estimates Table

Analysis of GEE Parameter Estimates
Using Empirical Standard Error Estimates
ParameterDFEstimateStandard
Error
Chi-SquarePr > ChiSq
Intercept11.27513.05610.17410.6765
city kingston10.12230.68820.03160.8589
city portage00...
age1-0.20360.27890.53270.4655
smoke1-0.09350.36130.06700.7957


You can compare the GEE parameter estimates to the parameter estimates from the initial model. The parameter estimates from the initial model are displayed in Output 18.6.6.

Output 18.6.6: Initial Parameter Estimates Table

Analysis of Initial Parameter Estimates
ParameterDFEstimateStandard
Error
Chi-SquarePr > ChiSq
Intercept11.2597072.6104230.23290.6294
city kingston10.1390980.5526860.06330.8013
city portage00...
age1-0.2003150.2508150.63790.4245
smoke1-0.1283640.4102390.09790.7544


The GEE parameter estimates are not substantially different from the parameter estimates in the initial model.

The GEE parameter estimates in Output 18.6.5 and the empirical covariance matrix in Output 18.6.2 are used for subsequent processing by the ASSOCIATION, CTABLE, and LACKFIT options and the ODDSRATIO and OUTPUT statements.

Last updated: May 14, 2026