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
| GEE Model Information | |
|---|---|
| Correlation Structure | Exchangeable |
| Subject Effect | case (16 levels) |
| Number of Clusters | 16 |
| Correlation Matrix Dimension | 4 |
| Maximum Cluster Size | 4 |
| Minimum Cluster Size | 4 |
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 | ||||
|---|---|---|---|---|
| Intercept | city kingston | age | smoke | |
| Intercept | 5.7495 | -0.2226 | -0.5347 | 0.01655 |
| city kingston | -0.2226 | 0.4548 | -0.00241 | 0.01876 |
| age | -0.5347 | -0.00241 | 0.05300 | -0.01658 |
| smoke | 0.01655 | 0.01876 | -0.01658 | 0.1910 |
| GEE Parameter Estimates Empirical Covariance Matrix | ||||
|---|---|---|---|---|
| Intercept | city kingston | age | smoke | |
| Intercept | 9.3399 | -0.8510 | -0.8325 | -0.1653 |
| city kingston | -0.8510 | 0.4737 | 0.05736 | 0.04023 |
| age | -0.8325 | 0.05736 | 0.07778 | -0.00236 |
| smoke | -0.1653 | 0.04023 | -0.00236 | 0.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 | ||||
|---|---|---|---|---|
| Col1 | Col2 | Col3 | Col4 | |
| Row1 | 1.0000 | 0.1648 | 0.1648 | 0.1648 |
| Row2 | 0.1648 | 1.0000 | 0.1648 | 0.1648 |
| Row3 | 0.1648 | 0.1648 | 1.0000 | 0.1648 |
| Row4 | 0.1648 | 0.1648 | 0.1648 | 1.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 | |
|---|---|
| Correlation | 0.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 | |||||
|---|---|---|---|---|---|
| Parameter | DF | Estimate | Standard Error | Chi-Square | Pr > ChiSq |
| Intercept | 1 | 1.2751 | 3.0561 | 0.1741 | 0.6765 |
| city kingston | 1 | 0.1223 | 0.6882 | 0.0316 | 0.8589 |
| city portage | 0 | 0 | . | . | . |
| age | 1 | -0.2036 | 0.2789 | 0.5327 | 0.4655 |
| smoke | 1 | -0.0935 | 0.3613 | 0.0670 | 0.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 | |||||
|---|---|---|---|---|---|
| Parameter | DF | Estimate | Standard Error | Chi-Square | Pr > ChiSq |
| Intercept | 1 | 1.259707 | 2.610423 | 0.2329 | 0.6294 |
| city kingston | 1 | 0.139098 | 0.552686 | 0.0633 | 0.8013 |
| city portage | 0 | 0 | . | . | . |
| age | 1 | -0.200315 | 0.250815 | 0.6379 | 0.4245 |
| smoke | 1 | -0.128364 | 0.410239 | 0.0979 | 0.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.