Good afternoon.
I would like to get a second opinion on this puzzle.
A student made cheese. As far as the sample units go, the student created 45 total wheels of cheese (implied by numbers 1-45 below) so a new cheese wheel from each vat (implied by the vertical columns) was used for each testing day, the same cheese wheel was never used twice for testing. Her professor believes this is a split-plot design is because all 5 cheese wheels, respectively, were made from the same vat of cheese – so almost in a sense, the vat, is the “testing unit” I guess with the cheese wheels themselves being the “repeats”? So testing each wheel of cheese did destroy that individual wheel of cheese. Below, for the first trial, I circled the cheese vats themselves. Three vats of cheese were produced each trial and then from each vat, 5 wheels of cheese were produced. For each testing day, a random wheel from each respective vat was pulled for testing and consumed accordingly.
We would like to know whether SAS has a similar example we could use or get inspired on? The professor wants to use the ddfm = satterth.
Do you think this code would work?
data Karley;
input Protein Day Block Hardness @@;
datalines;
1 10 1 28363.69
1 30 1 24175.03
1 50 1 27697.26
1 70 1 31018.65
1 90 1 30535.20
2 10 1 30370.15
2 30 1 27032.27
2 50 1 33202.88
2 70 1 33475.14
2 90 1 33138.66
3 10 1 36818.95
3 30 1 32467.36
3 50 1 34832.65
3 70 1 39695.98
3 90 1 37399.16
1 10 2 21981.89
1 30 2 26965.76
1 50 2 28669.08
1 70 2 27150.88
1 90 2 27196.89
2 10 2 23948.18
2 30 2 28311.28
2 50 2 25452.11
2 70 2 28323.41
2 90 2 26327.38
3 10 2 28709.88
3 30 2 32924.68
3 50 2 33727.10
3 70 2 33445.72
3 90 2 32212.79
1 10 3 32820.97
1 30 3 34004.63
1 50 3 31426.37
1 70 3 30023.20
1 90 3 29945.74
2 10 3 42299.89
2 30 3 36940.54
2 50 3 39163.51
2 70 3 36524.49
2 90 3 39025.86
3 10 3 32626.59
3 30 3 37859.66
3 50 3 41112.71
3 70 3 39111.42
3 90 3 35726.72
proc mixed;
class Protein Day Block;
model Hardness = Protein Day Protein*Day/ddfm = satterth;
repeated day/subject=block*protein;
lsmeans Protein/pdiff adjust = tukey;
lsmeans Day/pdiff adjust = tukey;
slice protein*day/sliceby=protein diff adjust=tukey;
slice protein*day/sliceby=day diff adjust=tukey;
run;
quit;
As I finally got to in our direct communication, I think the one additional thing to add is a RANDOM block(protein) statement. That would give this code:
proc mixed;
class Protein Day Block;
model Hardness = Protein Day Protein*Day/ddfm = satterth;
random Block(Protein);
repeated day/subject=block(Protein) type=ar(1);
lsmeans Protein/pdiff adjust = tukey;
lsmeans Day/pdiff adjust = tukey;
slice protein*day/sliceby=protein diff adjust=tukey;
slice protein*day/sliceby=day diff adjust=tukey;
run;
In this case, block=vat so that the individual wheels are sampling units over time.
SteveDenham
Hi Steve
this is the last one you recommend, right?
proc mixed;
class Protein Day Block;
model Hardness = Protein Day Protein*Day/ddfm = satterth;
random Block(Protein);
repeated day/subject=block(Protein) type=ar(1);
lsmeans Protein/pdiff adjust = tukey;
lsmeans Day/pdiff adjust = tukey;
slice protein*day/sliceby=protein diff adjust=tukey;
slice protein*day/sliceby=day diff adjust=tukey;
run;
In this case, block=vat so that the individual wheels are sampling units over time.
Yes.
SteveDenham
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.