The CATMOD Procedure

Example 32.6 Repeated Measures, 2 Response Levels, 3 Populations

(View the complete code for this example.)

In this multiple-population repeated measures example, from Guthrie (1981), subjects from three groups have their responses (0 or 1) recorded in each of four trials. The analysis of the marginal probabilities is directed at assessing the main effects of the repeated measurement factor (Trial) and the independent variable (Group), as well as their interaction. Although the contingency table is incomplete (only 13 of the 16 possible responses are observed), this poses no problem in the computation of the marginal probabilities. The following statements produce Output 32.6.1:

data group;
   input a b c d Group wt @@;
   datalines;
1 1 1 1 2 2     0 0 0 0 2 2     0 0 1 0 1 2     0 0 1 0 2 2
0 0 0 1 1 4     0 0 0 1 2 1     0 0 0 1 3 3     1 0 0 1 2 1
0 0 1 1 1 1     0 0 1 1 2 2     0 0 1 1 3 5     0 1 0 0 1 4
0 1 0 0 2 1     0 1 0 1 2 1     0 1 0 1 3 2     0 1 1 0 3 1
1 0 0 0 1 3     1 0 0 0 2 1     0 1 1 1 2 1     0 1 1 1 3 2
1 0 1 0 1 1     1 0 1 1 2 1     1 0 1 1 3 2
;
title 'Multiple-Population Repeated Measures';
proc catmod data=group;
   weight wt;
   response marginals;
   model a*b*c*d=Group _response_ Group*_response_
         / freq;
   repeated Trial 4;
   title2 'Saturated Model';
run;

Output 32.6.1: Analysis of Multiple-Population Repeated Measures

Multiple-Population Repeated Measures
Saturated Model

The CATMOD Procedure

Data Summary
Responsea*b*c*dResponse Levels13
Weight VariablewtPopulations3
Data SetGROUPTotal Frequency45
Frequency Missing0Observations23

Population Profiles
SampleGroupSample Size
1115
2215
3315

Response Profiles
Responseabcd
10000
20001
30010
40011
50100
60101
70110
80111
91000
101001
111010
121011
131111

Response Frequencies
SampleResponse Number
1 2 3 4 5 6 7 8 9 10111213
10421400030100
22122110111012
30305021200020

Analysis of Variance
SourceDF Chi-SquarePr > ChiSq
Intercept1354.88<.0001
Group224.79<.0001
Trial321.45<.0001
Group*Trial618.710.0047
Residual0..

Analysis of Weighted Least Squares Estimates
EffectParameterEstimate Standard
Error
Chi-
Square
Pr > ChiSq
Intercept10.58330.0310354.88<.0001
Group20.13330.033515.88<.0001
 3-0.03330.05510.370.5450
Trial40.17220.05579.570.0020
 50.10560.06472.660.1028
 6-0.07220.05771.570.2107
Group*Trial7-0.15560.08523.330.0679
 8-0.05560.08000.480.4877
 9-0.08890.09530.870.3511
 100.01110.08660.020.8979
 110.08890.08221.170.2793
 12-0.01110.08240.020.8927


The analysis of variance table in Output 32.6.1 shows that there is a significant interaction between the independent variable Group and the repeated measurement factor Trial. An intermediate model (not shown) is fit in which the effects Trial and Group* Trial are replaced by Trial(Group=1), Trial(Group=2), and Trial(Group=3). Of these three effects, only the last is significant, so it is retained in the final model. The following statements produce Output 32.6.2 and Output 32.6.3:

   model a*b*c*d=Group _response_(Group=3)
         / noprofile noparm design;
   title2 'Trial Nested within Group 3';
quit;

Output 32.6.2 displays the design matrix resulting from retaining the nested effect.

Output 32.6.2: Final Model: Design Matrix

Multi-Population Repeated Measures
Trial Nested within Group 3

The CATMOD Procedure

Data Summary
Responsea*b*c*dResponse Levels13
Weight VariablewtPopulations3
Data SetGROUPTotal Frequency45
Frequency Missing0Observations23

Response Functions and Design Matrix
SampleFunction
Number
Response
Function
Design Matrix
1 2 3 4 5 6
110.73333110000
 20.73333110000
 30.73333110000
 40.66667110000
210.66667101000
 20.66667101000
 30.46667101000
 40.40000101000
310.866671-1-1100
 20.666671-1-1010
 30.333331-1-1001
 40.066671-1-1-1-1-1


The residual goodness-of-fit statistic tests the joint effect of Trial(Group=1) and Trial(Group=2). The analysis of variance table in Output 32.6.3 shows that the final model fits, that there is a significant Group effect, and that there is a significant Trial effect in Group 3.

Output 32.6.3: ANOVA Table

Analysis of Variance
SourceDF Chi-SquarePr > ChiSq
Intercept1386.94<.0001
Group225.42<.0001
Trial(Group=3)375.07<.0001
Residual65.090.5319