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 29.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;
Multiple-Population Repeated Measures |
Saturated Model |
Data Summary | |||
---|---|---|---|
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 |
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 |
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 |
Analysis of Variance | |||
---|---|---|---|
Source | DF | Chi-Square | 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 | . | . |
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 29.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 29.6.2 and Output 29.6.3:
model a*b*c*d=Group _response_(Group=3) / noprofile noparm design; title2 'Trial Nested within Group 3'; quit;
Output 29.6.2 displays the design matrix resulting from retaining the nested effect.
Multi-Population Repeated Measures |
Trial Nested within Group 3 |
Data Summary | |||
---|---|---|---|
Response | a*b*c*d | Response Levels | 13 |
Weight Variable | wt | Populations | 3 |
Data Set | GROUP | Total Frequency | 45 |
Frequency Missing | 0 | Observations | 23 |
Response Functions and Design Matrix | ||||||||
---|---|---|---|---|---|---|---|---|
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 |
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 29.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.
Analysis of Variance | |||
---|---|---|---|
Source | DF | Chi-Square | 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 |