The GENMOD Procedure

Example 45.7 Log-Linear Model for Count Data

(View the complete code for this example.)

In this example the data, from Thall and Vail (1990), concern the treatment of people suffering from epileptic seizure episodes. These data are also analyzed in Diggle, Liang, and Zeger (1994). The data consist of the number of epileptic seizures in an eight-week baseline period, before any treatment, and in each of four two-week treatment periods, in which patients received either a placebo or the drug Progabide in addition to other therapy. A portion of the data is displayed in Table 45.16. See "Gee Model for Count Data, Exchangeable Correlation" in the SAS/STAT Sample Program Library for the complete data set.

Table 45.16: Epileptic Seizure Data

Patient ID

Treatment

Baseline

Visit1

Visit2

Visit3

Visit4

104

Placebo

11

5

3

3

3

106

Placebo

11

3

5

3

3

107

Placebo

6

2

4

0

5

.

      

.

      

.

      

101

Progabide

76

11

14

9

8

102

Progabide

38

8

7

9

4

103

Progabide

19

0

4

3

0

.

      

.

      

.

      


Model the data as a log-linear model with (the Poisson variance function) and

where

number of epileptic seizures in interval j

length of interval j

The correlations between the counts are modeled as , (exchangeable correlations). For comparison, the correlations are also modeled as independent (identity correlation matrix). In this model, the regression parameters have the interpretation in terms of the log seizure rate displayed in Table 45.17.

Table 45.17: Interpretation of Regression Parameters

Treatment

Visit

Placebo

Baseline

 

1–4

Progabide

Baseline

 

1–4


The difference between the log seizure rates in the pretreatment (baseline) period and the treatment periods is for the placebo group and for the Progabide group. A value of indicates a reduction in the seizure rate.

Output 45.7.1 lists the first 14 observations of the data, which are arranged as one visit per observation:

Output 45.7.1: Partial Listing of the Seizure Data

Obsidyvisittrtblineage
11045101131
21043201131
31043301131
41043401131
51063101130
61065201130
71063301130
81063401130
9107210625
10107420625
11107030625
12107540625
13114410836
14114420836


Some further data manipulations create an observation for the baseline measures, a log time interval variable for use as an offset, and an indicator variable for whether the observation is for a baseline measurement or a visit measurement. Patient 207 is deleted as an outlier, as in the Diggle, Liang, and Zeger (1994) analysis. The following statements prepare the data for analysis with PROC GENMOD:

data new;
   set thall;
   output;
   if visit=1 then do;
      y=bline;
      visit=0;
      output;
   end;
run;

data new;
   set new;
   if id ne 207;
   if visit=0 then do;
      x1=0;
      ltime=log(8);
   end;
   else do;
      x1=1;
      ltime=log(2);
   end;
run;

For comparison with the GEE results, an ordinary Poisson regression is first fit. The results are shown in Output 45.7.2.

Output 45.7.2: Maximum Likelihood Estimates

The GENMOD Procedure

Analysis Of Maximum Likelihood Parameter Estimates
ParameterDFEstimateStandard
Error
Wald 95% Confidence LimitsWald Chi-SquarePr > ChiSq
Intercept11.34760.03411.28091.41441565.44<.0001
x110.11080.04690.01890.20275.580.0181
trt1-0.10800.0486-0.2034-0.01274.930.0264
x1*trt1-0.30160.0697-0.4383-0.164918.70<.0001
Scale01.00000.00001.00001.0000  

Note:The scale parameter was held fixed.



The GEE solution is requested with the REPEATED statement in the GENMOD procedure. The SUBJECT=ID option indicates that the variable id describes the observations for a single cluster, and the CORRW option displays the working correlation matrix. The TYPE= option specifies the correlation structure; the value EXCH indicates the exchangeable structure.

The following statements perform the analysis:

proc genmod data=new;
   class id;
   model y=x1 | trt / d=poisson offset=ltime;
   repeated subject=id / corrw covb type=exch;
run;

These statements first fit a generalized linear model (GLM) to these data by maximum likelihood. The estimates are not shown in the output, but are used as initial values for the GEE solution.

Information about the GEE model is displayed in Output 45.7.3. The results of fitting the model are displayed in Output 45.7.4. Compare these with the model of independence displayed in Output 45.7.2. The parameter estimates are nearly identical, but the standard errors for the independence case are underestimated. The coefficient of the interaction term, , is highly significant under the independence model and marginally significant with the exchangeable correlations model.

Output 45.7.3: GEE Model Information

The GENMOD Procedure

GEE Model Information
Correlation StructureExchangeable
Subject Effectid (58 levels)
Number of Clusters58
Correlation Matrix Dimension5
Maximum Cluster Size5
Minimum Cluster Size5


Output 45.7.4: GEE Parameter Estimates

Analysis Of GEE Parameter Estimates
Empirical Standard Error Estimates
ParameterEstimateStandard
Error
95% Confidence LimitsZPr > |Z|
Intercept1.34760.15741.03921.65608.56<.0001
x10.11080.1161-0.11680.33830.950.3399
trt-0.10800.1937-0.48760.2716-0.560.5770
x1*trt-0.30160.1712-0.63710.0339-1.760.0781


Table 45.18 displays the regression coefficients, standard errors, and normalized coefficients that result from fitting the model with independent and exchangeable working correlation matrices.

Table 45.18: Results of Model Fitting

Variable

Correlation Structure

Coef.

Std. Error

Coef./S.E.

Intercept

Exchangeable

1.35

0.16

8.56

 

Independent

1.35

0.03

39.52

Visit

Exchangeable

0.11

0.12

0.95

 

Independent

0.11

0.05

2.36

Treat

Exchangeable

–0.11

0.19

–0.56

 

Independent

–0.11

0.05

–2.22

Exchangeable

–0.30

0.17

–1.76

 

Independent

–0.30

0.07

–4.32


The fitted exchangeable correlation matrix is specified with the CORRW option and is displayed in Output 45.7.5.

Output 45.7.5: Working Correlation Matrix

Working Correlation Matrix
 Col1Col2Col3Col4Col5
Row11.00000.59410.59410.59410.5941
Row20.59411.00000.59410.59410.5941
Row30.59410.59411.00000.59410.5941
Row40.59410.59410.59411.00000.5941
Row50.59410.59410.59410.59411.0000


If you specify the COVB option, you produce both the model-based (naive) and the empirical (robust) covariance matrices. Output 45.7.6 contains these estimates.

Output 45.7.6: Covariance Matrices

Covariance Matrix (Model-Based)
 Prm1Prm2Prm3Prm4
Prm10.012230.001520-0.01223-0.001520
Prm20.0015200.01519-0.001520-0.01519
Prm3-0.01223-0.0015200.024950.005427
Prm4-0.001520-0.015190.0054270.03748

Covariance Matrix (Empirical)
 Prm1Prm2Prm3Prm4
Prm10.02476-0.001152-0.024760.001152
Prm2-0.0011520.013480.001152-0.01348
Prm3-0.024760.0011520.03751-0.002999
Prm40.001152-0.01348-0.0029990.02931


The two covariance estimates are similar, indicating an adequate correlation model.