12-30-2013 03:00 PM
I am a graduate student at Auburn university. My experiment design is kind of complicated and I have no idea how to do the statistics. Please help me.
Here I attached a picture of my experiment design. The field experiment was a split plot design: the main plot is different Ca treatments, and the sub-plot is two peanut cultivars. The experiment was repeated 4 times (4 blocks). Peanut samples were collected from each sub-plot three times: 4 weeks before harvest, 2 weeks before harvest and at harvest. Each peanut sample was further divided into 5 maturity classes: yellow 1, yellow 2, orange, brown and black. The response variable is Ca content in peanut seed.
So my experiment includes 4 blocks (Block), 4 treatments (Main plot), 2 peanut cultivars (Sub-plot), 3 sampling times (timing) and 5 maturity classes (M_class). I'd like to know whether there is a difference between sampling times, peanut cultivars, treatments and maturity classes. I know I can use PROC MIXED to do this but I don't know how to write the SAS program. Anyone can help me? Thank you!
12-31-2013 08:04 AM
Do you have access to Littell et al.'s SAS System for Mixed Models, 2nd. ed.? I'm sure somebody in the agronomy dept. has a copy. Anyway, look at Chapter 16 - Case Studies, for some examples that approach your design (essentially, everything except the repeated measures part).
Here is my UNTESTED code:
proc mixed data=yourdata;
class block trt cult time mclass;
repeated time/subject=block(mclass*trt*cult) type=csh; /* A lot of possible choices for covariance type. If you suspect time dependence, you may want to try ar(1), arh(1) or ante(1) */
lsmeans trt|cult|mclass|time/diff; /* You'll probably want to look at sliced effects here, but for now all possible comparisons */
01-14-2014 06:04 PM
I have two questions:
Can you please explain why the subject is block(mclass*trt*cult) in the REPEATED statement?
I don't quite understand the meaning of "random intercept/subject=block". does this treat all the random effects associate with block?
01-15-2014 02:12 PM
1. The subject is set up so that there is exactly one observation per timepoint per all of the effects in the model. If you had something other than that, you would get an error message referring to an infinite likelihood.
2. The "random intercept/subject=block" models only a block effect. If you have, or suspect, random effects due to fixed effect by block interactions, those can be modeled by adding the fixed effects that you expect (or need) to the statement BEFORE the slash.