Date: Tue, 14 May 1996 17:11:07 +1300
Reply-To: Will Hopkins <will.hopkins@STONEBOW.OTAGO.AC.NZ>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Will Hopkins <will.hopkins@STONEBOW.OTAGO.AC.NZ>
Subject: Help! Proc mixed simple example
I am struggling with the syntax of the contrast statement in proc mixed. I
have a simple data set consisting of a between-subject factor with two
levels (group: control and expt) and a within-subject factor with four
levels (time: 1, 2, 3 and 4). The data were generated to give a difference
between the control and expt groups at times 3 and 4 (i.e. corresponding to
an intervention with the exptal group between times 2 and 3). This is a
very standard, straightforward design.
Several weeks ago someone at SAS suggested I look at the worked example in
the Technical Report P-229. Well, I have. It is for a split plot design,
and quite simply it blows me right out of the water. A pity there isn't a
simpler example.
Anyway I have tried the following. It works for the overall effect of
group*time (it gives almost the same p value as the standard glm
repeated-measures analysis), but the p value for the contrast of the
interaction at time 3 vs time 2 is way too high. What am I doing wrong?
I should add that I have tried two consultant statisticians here. They
also have difficulties coming to terms with proc mixed and have been unable
to help.
proc mixed;
class id group time;
model var=group time group*time;
repeated/subject=id type=cs;
contrast 'interaction time 2 vs time 1' group*time 1 -1 0 0 -1 1 0 0;
contrast 'interaction time 3 vs time 2' group*time 0 1 -1 0 0 -1 1 0;
contrast 'interaction time 4 vs time 3' group*time 0 0 1 -1 0 0 -1 1;
lsmeans group time group*time;
Will
Will G Hopkins PhD <will.hopkins@stonebow.otago.ac.nz>
Physiology and Physical Education
University of Otago, Dunedin, NEW ZEALAND
Be creative - break rules.