Date: Tue, 8 Jun 2010 07:48:08 -0400
Reply-To: Anne <anne.daubmann@GMX.DE>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Anne <anne.daubmann@GMX.DE>
Subject: Using the CONTRAST Statement in PROC MIXED for 3 fixed effects
Hello,
First of all I would like to introduce my study. I have a study population
divided into 3 different groups. For each group each subject got 4
different treatments to the skin at two different points in time. Now I
want to analyze whether the group, the treatment and the time has any
influence on the skin hydration.
The data have the following structure (the points in between shall show
that there are more subjects than two subjects in each group):
data t;
input subject Treatment$ group$ time$ hydration;
cards;
1 K 1 3h 0.424301601
1 10 1 3h 0.66230796
1 20 1 3h 0.935552903
1 30 1 3h 0.314342945
1 K 1 24h 0.193648359
1 10 1 24h 0.226547532
1 20 1 24h 0.555516816
1 30 1 24h 0.420854877
2 K 1 3h 0.894045221
2 10 1 3h 0.666443159
2 20 1 3h 0.984863413
2 30 1 3h 0.920030913
2 K 1 24h 0.144518192
2 10 1 24h 0.203838493
2 20 1 24h 0.638158456
2 30 1 24h 0.576927595
. . . . .
. . . . .
. . . . .
9 K 2 3h 0.924301601
9 10 2 3h 1.16230796
9 20 2 3h 1.435552903
9 30 2 3h 0.814342945
9 K 2 24h 0.693648359
9 10 2 24h 0.726547532
9 20 2 24h 1.055516816
9 30 2 24h 0.920854877
10 K 2 3h 1.394045221
10 10 2 3h 1.166443159
10 20 2 3h 1.484863413
10 30 2 3h 1.420030913
10 K 2 24h 0.644518192
10 10 2 24h 0.703838493
10 20 2 24h 1.138158456
10 30 2 24h 1.076927595
. . . . .
. . . . .
. . . . .
17 K 3 3h 1.024301601
17 10 3 3h 1.26230796
17 20 3 3h 1.535552903
17 30 3 3h 0.914342945
17 K 3 24h 0.793648359
17 10 3 24h 0.826547532
17 20 3 24h 1.155516816
17 30 3 24h 1.020854877
18 K 3 3h 1.494045221
18 10 3 3h 1.266443159
18 20 3 3h 1.584863413
18 30 3 3h 1.520030913
18 K 3 24h 0.744518192
18 10 3 24h 0.803838493
18 20 3 24h 1.238158456
18 30 3 24h 1.176927595
. . . . .
;
run;
To get the global effect I run the following repeated measure analysis of
variance:
proc mixed data = t;
class subject treatment group time;
model hydration = treatment group time;
repeated group time / subject = subject type = un@un;
random subject/ subject = subject;
run;
Now I am interested e.g. in the p-value of the differences in the means of
the pairwise comparisons, for example treatment K vs. treatment 10 for
group 1 at time 3h, treatment K vs. treatment 20 for group 1 at time 3h and
treatment K vs. treatment 30 for group 1 at time 3h. As far as I know, I
have to take the CONTRAST statement but I have some problems to formulate
the contrast correctly. Can anyone help me with the contrasts?
Thanks a lot,
Anne