Example 22.6: Repeated Measures, 2 Response Levels, 3 Populations
In this multipopulation 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 thirteen of the
sixteen possible responses are observed), this poses no
problem in the computation of the marginal probabilities.
The following statements produce Output 22.6.1 through
Output 22.6.5:
title 'MultiPopulation Repeated Measures';
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
;
proc catmod data=group;
weight wt;
response marginals;
model a*b*c*d=Group _response_ Group*_response_
/ freq nodesign;
repeated Trial 4;
title2 'Saturated Model';
run;
Output 22.6.1: Analysis of MultiplePopulation Repeated Measures
MultiPopulation Repeated Measures 
Saturated Model 
Response 
a*b*c*d 
Response Levels 
13 
Weight Variable 
wt 
Populations 
3 
Data Set 
GROUP 
Total Frequency 
45 
Frequency Missing 
0 
Observations 
23 
Population Profiles 
Sample 
Group 
Sample Size 
1 
1 
15 
2 
2 
15 
3 
3 
15 

Output 22.6.2: Response Profiles
MultiPopulation Repeated Measures 
Saturated Model 
Response Profiles 
Response 
a 
b 
c 
d 
1 
0 
0 
0 
0 
2 
0 
0 
0 
1 
3 
0 
0 
1 
0 
4 
0 
0 
1 
1 
5 
0 
1 
0 
0 
6 
0 
1 
0 
1 
7 
0 
1 
1 
0 
8 
0 
1 
1 
1 
9 
1 
0 
0 
0 
10 
1 
0 
0 
1 
11 
1 
0 
1 
0 
12 
1 
0 
1 
1 
13 
1 
1 
1 
1 

Output 22.6.3: Response Frequencies
MultiPopulation Repeated Measures 
Saturated Model 
Response Frequencies 
Sample 
Response Number 
1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
1 
0 
4 
2 
1 
4 
0 
0 
0 
3 
0 
1 
0 
0 
2 
2 
1 
2 
2 
1 
1 
0 
1 
1 
1 
0 
1 
2 
3 
0 
3 
0 
5 
0 
2 
1 
2 
0 
0 
0 
2 
0 

Output 22.6.4: Analysis of Variance Table
MultiPopulation Repeated Measures 
Saturated Model 
Analysis of Variance 
Source 
DF 
ChiSquare 
Pr > ChiSq 
Intercept 
1 
354.88 
<.0001 
Group 
2 
24.79 
<.0001 
Trial 
3 
21.45 
<.0001 
Group*Trial 
6 
18.71 
0.0047 
Residual 
0 
. 
. 

Output 22.6.5: Parameter Estimates
MultiPopulation Repeated Measures 
Saturated Model 
Analysis of Weighted Least Squares Estimates 
Effect 
Parameter 
Estimate 
Standard Error 
Chi Square 
Pr > ChiSq 
Intercept 
1 
0.5833 
0.0310 
354.88 
<.0001 
Group 
2 
0.1333 
0.0335 
15.88 
<.0001 

3 
0.0333 
0.0551 
0.37 
0.5450 
Trial 
4 
0.1722 
0.0557 
9.57 
0.0020 

5 
0.1056 
0.0647 
2.66 
0.1028 

6 
0.0722 
0.0577 
1.57 
0.2107 
Group*Trial 
7 
0.1556 
0.0852 
3.33 
0.0679 

8 
0.0556 
0.0800 
0.48 
0.4877 

9 
0.0889 
0.0953 
0.87 
0.3511 

10 
0.0111 
0.0866 
0.02 
0.8979 

11 
0.0889 
0.0822 
1.17 
0.2793 

12 
0.0111 
0.0824 
0.02 
0.8927 

The analysis of variance table in Output 22.6.4 shows that
there is a significant interaction between the independent
variable Group and the repeated measurement factor
Trial. Thus, 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 22.6.6 and Output 22.6.7:
model a*b*c*d=Group _response_(Group=3)
/ noprofile noparm;
title2 'Trial Nested within Group 3';
quit;
Output 22.6.6: Final Model: Design Matrix
MultiPopulation Repeated Measures 
Trial Nested within Group 3 
Response 
a*b*c*d 
Response Levels 
13 
Weight Variable 
wt 
Populations 
3 
Data Set 
GROUP 
Total Frequency 
45 
Frequency Missing 
0 
Observations 
23 
Sample 
Function Number 
Response Function 
Design Matrix 
1 
2 
3 
4 
5 
6 
1 
1 
0.73333 
1 
1 
0 
0 
0 
0 

2 
0.73333 
1 
1 
0 
0 
0 
0 

3 
0.73333 
1 
1 
0 
0 
0 
0 

4 
0.66667 
1 
1 
0 
0 
0 
0 
2 
1 
0.66667 
1 
0 
1 
0 
0 
0 

2 
0.66667 
1 
0 
1 
0 
0 
0 

3 
0.46667 
1 
0 
1 
0 
0 
0 

4 
0.40000 
1 
0 
1 
0 
0 
0 
3 
1 
0.86667 
1 
1 
1 
1 
0 
0 

2 
0.66667 
1 
1 
1 
0 
1 
0 

3 
0.33333 
1 
1 
1 
0 
0 
1 

4 
0.06667 
1 
1 
1 
1 
1 
1 

Output 22.6.6 displays the design matrix resulting from
retaining the nested effect.
Output 22.6.7: ANOVA Table
MultiPopulation Repeated Measures 
Trial Nested within Group 3 
Analysis of Variance 
Source 
DF 
ChiSquare 
Pr > ChiSq 
Intercept 
1 
386.94 
<.0001 
Group 
2 
25.42 
<.0001 
Trial(Group=3) 
3 
75.07 
<.0001 
Residual 
6 
5.09 
0.5319 

The residual goodnessoffit statistic tests the joint
effect of Trial(Group=1) and Trial(
Group=2). The analysis of variance table in Output 22.6.7
shows that the final model fits, that there is a significant
Group effect, and that there is a significant
Trial effect in Group 3.
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.