I want to analyze a factorial split-plot data performed in two years (combined analysis) using SAS. I think year should takes random effect in the analysis. Does anyone have SAS codes for this analysis?
In "SAS System for Mixed Models" by R. Littell et al., on page 495 there is this code:
proc mixed;
class a b block;
model y = a|b;
random block a*block;
run;
This is for a split-plot design involving two experimental factor, A and B, and two different sizes of experimental units to which they are applied. The levels of A are randomly assigned to the larger size of experimental unit, called whole plot, whereas the levels of B are assigned to the smaller size of the experimental unit, the subplot. The subplot are assumed to be nested wihtin the whole plot so that the whle plot consists of a cluster of subplots and a level of A is applied to the entire cluster. The classical example is the application of fertilizer to large plots of land, and different crop varieties planted in subdivisions of the large plot. For this example fertilizer is the whole plot factor A and variety the sub^plot factor B.
Thank you for your comment. I mean a factorial split-plot design within years not a simple split plot. I found a code to analyze but not sure about that.
Here the code:
data a;
input year r a b c y;
cards;
.
.
.
;
proc print;
run;
proc glm;
class year r a b c;
model y=year r year*r a year*a b year*b a*b year*a*b r(a b) c year*c a*c b*c year*a*c year*b*c a*b*c year*a*b*c/ss3;
I think that my first question would be: Did the plots and subplots were the same for both years? There are two alternatives, to consider year as a random effect or as a fixed effect. Considering year as a fixed effect, you just add the variable year in the model, as a split-split plot design (I have the code for it). Let me know if my answer helped or if you need further information.