Examples
The following are examples of models that can
be specified using MIXED
:
Model 1: Fixed-Effects ANOVA Model
Suppose that TREAT is the treatment factor and BLOCK is the blocking factor.
MIXED Y BY TREAT BLOCK
/FIXED = TREAT BLOCK.
Model 2: Randomized Complete Blocks Design
Suppose that TREAT is the treatment factor and BLOCK is the blocking factor.
MIXED Y BY TREAT BLOCK
/FIXED = TREAT
/RANDOM = BLOCK.
Model 3: Split-Plot Design
An experiment consists of two factors, A and B. The experiment unit with respect to A is C. The experiment unit with respect to B is the individual subject, a subdivision of the factor C. Thus, C is the whole-plot unit, and the individual subject is the split-plot unit.
MIXED Y BY A B C
/FIXED = A B A*B
/RANDOM = C(A).
Model 4: Purely Random-Effects Model
Suppose that A, B, and C are random factors.
MIXED Y BY A B C
/FIXED = | NOINT
/RANDOM = INTERCEPT A B C A*B A*C B*C | COVTYPE(CS).
The MIXED
procedure allows effects specified on the same RANDOM
subcommand to be correlated. Thus, in the model
above, the parameters of a compound symmetry covariance matrix are
computed across all levels of the random effects. In order to specify
independent random effects, you need to specify separate RANDOM
subcommands. For example:
MIXED Y BY A B C
/FIXED = | NOINT
/RANDOM = INTERCEPT | COVTYPE(ID)
/RANDOM = A | COVTYPE(CS)
/RANDOM = B | COVTYPE(CS)
/RANDOM = C | COVTYPE(CS)
/RANDOM = A*B | COVTYPE(CS)
/RANDOM = A*C | COVTYPE(CS)
/RANDOM = B*C | COVTYPE(CS).
Here, the parameters of compound symmetry matrices are computed separately for each random effect.
Model 6: Multilevel Analysis
Suppose that SCORE is the score of a particular achievement test given over TIME. STUDENT is nested within CLASS, and CLASS is nested within SCHOOL.
MIXED SCORE WITH TIME
/FIXED = TIME
/RANDOM = INTERCEPT TIME | SUBJECT(SCHOOL) COVTYPE(ID)
/RANDOM = INTERCEPT TIME | SUBJECT(SCHOOL*CLASS) COVTYPE(ID)
/RANDOM = INTERCEPT TIME | SUBJECT(SCHOOL*CLASS*STUDENT) COVTYPE(ID).
Model 7: Unconditional Linear Growth Model
Suppose that SUBJ is the individual’s identification and Y is the response of an individual observed over TIME. The covariance structure is unspecified.
MIXED Y WITH TIME
/FIXED = TIME
/RANDOM = INTERCEPT TIME | SUBJECT(SUBJ) COVTYPE(ID).
Model 8: Linear Growth Model with a Person-Level Covariate
Suppose that PCOVAR is the person-level covariate.
MIXED Y WITH TIME PCOVAR
/FIXED = TIME PCOVAR TIME*PCOVAR
/RANDOM = INTERCEPT TIME | SUBJECT(SUBJ) COVTYPE(ID).
Model 9: Repeated Measures Analysis
Suppose that SUBJ is the individual’s identification and Y is the response of an individual observed over several STAGEs. The covariance structure is compound symmetry.
MIXED Y BY STAGE
/FIXED = STAGE
/REPEATED = STAGE | SUBJECT(SUBJ) COVTYPE(CS).
Model 10: Repeated Measures Analysis with Time-Dependent Covariate
Suppose that SUBJ is the individual’s identification and Y is the response of an individual observed over several STAGEs. X is an individual-level covariate that also measures over several STAGEs. The residual covariance matrix structure is AR(1).
MIXED Y BY STAGE WITH X
/FIXED = X STAGE
/REPEATED = STAGE | SUBJECT(SUBJ) COVTYPE(AR1).