SAS PROC MIXED: Repeated statement
[ Return
Top
SAS
Home ]
The repeated statement specifies the error structure for each subject.
repeated artime / type=ar(1) sub=id;
This example tells SAS to model serial correlation (in the form of a 1st order autoregressive process)
within each subject, where the variable id is unique per subject. This is only appropriate
when the samples are equally spaced. Also, missing values should be included with a missing value
code (.) if ar(1) is used. The variable specified after the word repeated must be
a categorical variable (i.e. specified in the class statement).
If the samples are not equally spaced, a model analagous to ar(1) is the spatial power model. For
example
repeated / type=SP(POW)(time) sub=id;
models the correlation as falling off exponentially with the time between samples.
[ Return
Top
SAS
Home ]