This example, from MacMillan et al. (1981), illustrates a repeated measures analysis in which there are two repeated measurement factors. Two diagnostic procedures
(standard and test) are performed on each subject, and the results of both are evaluated at each of two times as being positive
or negative. In the following DATA step, std1
and std2
are the two measurements of the standard procedure, and test1
and test2
are the two measurements of the test procedure:
data a; input std1 $ test1 $ std2 $ test2 $ wt @@; datalines; neg neg neg neg 509 neg neg neg pos 4 neg neg pos neg 17 neg neg pos pos 3 neg pos neg neg 13 neg pos neg pos 8 neg pos pos pos 8 pos neg neg neg 14 pos neg neg pos 1 pos neg pos neg 17 pos neg pos pos 9 pos pos neg neg 7 pos pos neg pos 4 pos pos pos neg 9 pos pos pos pos 170 ;
For the initial model, the response functions are marginal probabilities, and the repeated measurement factors are Time
and Treatment
. The model is a saturated one, containing effects for Time
, Treatment
, and Time
*Treatment
. The following statements produce Output 32.9.1:
proc catmod data=a; title2 'Marginal Symmetry, Saturated Model'; weight wt; response marginals; model std1*test1*std2*test2=_response_ / freq design noparm; repeated Time 2, Treatment 2 / _response_=Time Treatment Time*Treatment; run;
The analysis of variance table in Output 32.9.1 shows that there is no significant effect of Time
, either by itself or in its interaction with Treatment
. The second model includes only the Treatment
effect. Again, the response functions are marginal probabilities, and the repeated measurement factors are Time
and Treatment
.
Output 32.9.1: Diagnosis Data: Two Repeated Measurement Factors
Response Profiles | ||||
---|---|---|---|---|
Response | std1 | test1 | std2 | test2 |
1 | neg | neg | neg | neg |
2 | neg | neg | neg | pos |
3 | neg | neg | pos | neg |
4 | neg | neg | pos | pos |
5 | neg | pos | neg | neg |
6 | neg | pos | neg | pos |
7 | neg | pos | pos | pos |
8 | pos | neg | neg | neg |
9 | pos | neg | neg | pos |
10 | pos | neg | pos | neg |
11 | pos | neg | pos | pos |
12 | pos | pos | neg | neg |
13 | pos | pos | neg | pos |
14 | pos | pos | pos | neg |
15 | pos | pos | pos | pos |
A main effect model with respect to Treatment
is fit. The following statements produces Output 32.9.2:
title2 'Marginal Symmetry, Reduced Model'; model std1*test1*std2*test2=_response_ / corrb design noprofile; repeated Time 2, Treatment 2 / _response_=Treatment; run;
The analysis of variance table for the reduced model (Output 32.9.2) shows that the model fits (since the residual chi-square is nonsignificant) and that the treatment effect is significant.
The negative parameter estimate for Treatment
shows that the first level of treatment (std) has a smaller probability of the first response level (neg) than the second
level of treatment (test). In other words, the standard diagnostic procedure gives a significantly higher probability of a
positive response than the test diagnostic procedure.
Output 32.9.2: Diagnosis Data: Reduced Model
The next example illustrates a RESPONSE
statement that, at each time, computes the sensitivity and specificity of the
test diagnostic procedure with respect to the standard procedure. Since these are measures of the relative accuracy of the
two diagnostic procedures, the repeated measurement factors in this case are labeled Time
and Accuracy
. Only 15 of the 16 possible responses are observed, so additional care must be taken in formulating the RESPONSE
statement for computation of sensitivity and specificity.
The following statements produce Output 32.9.3 and Output 32.9.4:
title2 'Sensitivity and Specificity Analysis, ' 'Main-Effects Model'; model std1*test1*std2*test2=_response_ / covb design noprofile; repeated Time 2, Accuracy 2 / _response_=Time Accuracy; response exp 1 -1 0 0 0 0 0 0, 0 0 1 -1 0 0 0 0, 0 0 0 0 1 -1 0 0, 0 0 0 0 0 0 1 -1 log 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1, 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1, 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0, 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0, 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1, 0 0 1 1 0 0 1 0 0 1 1 0 0 1 1, 1 0 0 0 1 0 0 1 0 0 0 1 0 0 0, 1 1 0 0 1 1 0 1 1 0 0 1 1 0 0; quit;
For the sensitivity and specificity analysis, the four response functions displayed next to the design matrix (Output 32.9.3) represent the following:
sensitivity, time 1
specificity, time 1
sensitivity, time 2
specificity, time 2
The sensitivities and specificities are for the test diagnostic procedure relative to the standard procedure.
Output 32.9.3: Diagnosis Data: Sensitivity and Specificity Analysis
The ANOVA table in Output 32.9.3 shows that an additive model fits, that there is a significant effect of time, and that the sensitivity is significantly different from the specificity.
Output 32.9.4 shows that the predicted sensitivities and specificities are lower for time 1 (since parameter 2 is negative). It also shows that the sensitivity is significantly less than the specificity.
Output 32.9.4: Parameter Estimates