The CATMOD Procedure

Example 32.9 Repeated Measures, Two Repeated Measurement Factors

(View the complete code for this example.)

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

Diagnostic Procedure Comparison
Marginal Symmetry, Saturated Model

The CATMOD Procedure

Data Summary
Responsestd1*test1*std2*test2Response Levels15
Weight VariablewtPopulations1
Data SetATotal Frequency793
Frequency Missing0Observations15

Population Profiles
SampleSample Size
1793

Response Profiles
Responsestd1test1std2test2
1negnegnegneg
2negnegnegpos
3negnegposneg
4negnegpospos
5negposnegneg
6negposnegpos
7negpospospos
8posnegnegneg
9posnegnegpos
10posnegposneg
11posnegpospos
12posposnegneg
13posposnegpos
14posposposneg
15pospospospos

Response Frequencies
SampleResponse Number
1 2 3 4 5 6 7 8 9 101112131415
150941731388141179749170

Response Functions and Design Matrix
SampleFunction
Number
Response
Function
Design Matrix
1 2 3 4
110.708701111
 20.7238311-1-1
 30.706181-11-1
 40.738971-1-11

Analysis of Variance
SourceDF Chi-SquarePr > ChiSq
Intercept12385.34<.0001
Time10.850.3570
Treatment18.200.0042
Time*Treatment12.400.1215
Residual0..


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

Diagnostic Procedure Comparison
Marginal Symmetry, Reduced Model

The CATMOD Procedure

Data Summary
Responsestd1*test1*std2*test2Response Levels15
Weight VariablewtPopulations1
Data SetATotal Frequency793
Frequency Missing0Observations15

Response Functions and Design Matrix
SampleFunction
Number
Response
Function
Design Matrix
1 2
110.7087011
 20.723831-1
 30.7061811
 40.738971-1

Analysis of Variance
SourceDF Chi-SquarePr > ChiSq
Intercept12386.97<.0001
Treatment19.550.0020
Residual23.510.1731

Analysis of Weighted Least Squares Estimates
EffectParameterEstimate Standard
Error
Chi-
Square
Pr > ChiSq
Intercept10.71960.01472386.97<.0001
Treatment2-0.01280.004169.550.0020

Correlation Matrix of the Parameter
Estimates
RowCol1Col2
11.000000.04194
20.041941.00000


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:

  1. sensitivity, time 1

  2. specificity, time 1

  3. sensitivity, time 2

  4. 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

Diagnostic Procedure Comparison
Sensitivity and Specificity Analysis, Main-Effects Model

The CATMOD Procedure

Data Summary
Responsestd1*test1*std2*test2Response Levels15
Weight VariablewtPopulations1
Data SetATotal Frequency793
Frequency Missing0Observations15

Response Functions and Design Matrix
SampleFunction
Number
Response
Function
Design Matrix
1 2 3
110.82251111
 20.9484011-1
 30.815451-11
 40.969641-1-1

Analysis of Variance
SourceDF Chi-SquarePr > ChiSq
Intercept16448.79<.0001
Time14.100.0428
Accuracy138.81<.0001
Residual11.000.3178


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

Analysis of Weighted Least Squares Estimates
EffectParameterEstimate Standard
Error
Chi-
Square
Pr > ChiSq
Intercept10.88920.01116448.79<.0001
Time2-0.009320.004604.100.0428
Accuracy3-0.07020.011338.81<.0001

Covariance Matrix of the Parameter Estimates
RowCol1Col2Col3
10.000122600.000002290.00010137
20.000002290.00002116-.00000587
30.00010137-.000005870.00012697