Chapter Contents |
Previous |
Next |
The CATMOD Procedure |
To perform a repeated measures analysis, you also need to specify a RESPONSE statement, since the standard response functions (generalized logits) cannot be used. Typically, the MEANS or MARGINALS response functions are specified in a repeated measures analysis, but other response functions may also be reasonable.
proc catmod; response marginals; model t1*t2*t3=_response_; repeated Time 3 / _response_=Time; run;
These statements induce a Time effect that has 2(k-1) degrees of freedom since there are k-1 response functions at each time point. Thus, for a dichotomous variable, the Time effect has two degrees of freedom.
Now suppose that at each time point, each subject has X-rays taken, and the X-rays are read by two different radiologists. This creates six dependent variables that represent the 3 ×2 cross-classification of the repeated measurement factors Time and Reader. A saturated model with respect to these factors can be obtained by specifying
proc catmod; response marginals; model r11*r12*r21*r22*r31*r32=_response_; repeated Time 3, Reader 2 / _response_=Time Reader Time*Reader; run;
If you want to fit a main-effects model with respect to Time and Reader, then change the REPEATED statement to
repeated Time 3, Reader 2 / _response_=Time Reader;
If you want to fit a main-effects model for Time but for only one of the readers, the REPEATED statement might look like
repeated Time $ 3, Reader $ 2 /_response_=Time(Reader=Smith) profile =('1' Smith, '1' Jones, '2' Smith, '2' Jones, '3' Smith, '3' Jones);
If Jones had been unavailable for a reading at time 3, then there would be only 5(k-1) response functions, even though PROC CATMOD would be expecting some multiple of 6 ( = 3 ×2). In that case, the PROFILE= option would be necessary to indicate which repeated measurement profiles were actually represented:
repeated Time $ 3, Reader $ 2 /_response_=Time(Reader=Smith) profile =('1' Smith, '1' Jones, '2' Smith, '2' Jones, '3' Smith);
When two or more repeated measurement factors are specified, PROC CATMOD presumes that the response functions are ordered so that the levels of the rightmost factor change most rapidly. This means that the dependent variables should be specified in the same order. For this example, the order implied by the REPEATED statement is as follows, where the variable r_{ij} corresponds to Time i and Reader j.
Response | Dependent | ||
Function | Variable | Time | Reader |
1 | r_{11} | 1 | 1 |
2 | r_{12} | 1 | 2 |
3 | r_{21} | 2 | 1 |
4 | r_{22} | 2 | 2 |
5 | r_{31} | 3 | 1 |
6 | r_{32} | 3 | 2 |
Thus, the order of dependent variables in the MODEL statement must agree with the order implied by the REPEATED statement.
For example, suppose that there are five groups of subjects, that each subject in the study is measured at three different times, and that the dichotomous dependent variables are labeled t1, t2, and t3. The following statements induce the computation of three response functions for each population:
proc catmod; weight wt; population Group; response marginals; model t1*t2*t3=_response_; repeated Time / _response_=Time; run;
PROC CATMOD then regards _RESPONSE_ as a variable with three levels corresponding to the three response functions in each population and forms an effect with two degrees of freedom. The MODEL and REPEATED statements tell PROC CATMOD to fit the main effect of Time.
In general, the MODEL statement tells PROC CATMOD how to integrate the independent variables and the repeated measurement factors into the model. For example, again suppose that there are five groups of subjects, that each subject is measured at three times, and that the dichotomous independent variables are labeled t1, t2, and t3. If you use the same WEIGHT, POPULATION, RESPONSE, and REPEATED statements as in the preceding program, the following MODEL statements result in the indicated analyses:
model t1*t2*t3=Group / averaged; | specifies the Group main effect (with four degrees of freedom). |
model t1*t2*t3=_response_; | specifies the Time main effect (with two degrees of freedom). |
model t1*t2*t3=_response_*Group; | specifies the interaction between Time and Group (with eight degrees of freedom). |
model t1*t2*t3=_response_|Group; | specifies both main effects, and the interaction between Time and Group (with a total of fourteen degrees of freedom). |
model t1*t2*t3=_response_(Group); | specifies a Time main effect within each Group (with ten degrees of freedom). |
However, the following MODEL statement is invalid since effects cannot be nested within _RESPONSE_:
model t1*t2*t3=Group(_response_); |
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.