BookmarkSubscribeRSS Feed
palolix
Obsidian | Level 7

Hi, does anybody knows how to code a 4 Factorial-Split Plot design with proc mixed?

Thank´s a lot!

Caroline

17 REPLIES 17
PaigeMiller
Diamond | Level 26

There are examples of using PROC MIXED for split plots in both the online SAS help, plus in the book "SAS System for Mixed Models" by Littell, Milliken Stroup and Wolfinger.

You really haven't given us enough details about the design for us to give more explicit instructions.

--
Paige Miller
palolix
Obsidian | Level 7

Thank you very much for your answer Paige!

I already cheked it on SAS help, but there are only examples with 2 factors, but not with 4.  In my design, I want to test the effect of the following variables:

Block

Year (3)

Nematodes (2 species)-wholeplot

Treatment (2)-Plot

Cereal Cultivar (3)-Subplot

Here is how I do it with 3 factors, but I do not know how is the code when I want to add another factor (year)

Proc mixed data=one;

class blk nem trt cultivar;

model lgsprCysts100=

nem

trt

trt*cultivar

cultivar

nem*cultivar

trt*cultivar

nem*trt*cultivar/ddfm=Satterth;

random blk blk*nem blk*nem*trt;

PaigeMiller
Diamond | Level 26

Is Year crossed with the other factors?

--
Paige Miller
palolix
Obsidian | Level 7

I guess, because each year a different cereal was planted.  I want to compare the dependent variable between 3 years.

PaigeMiller
Diamond | Level 26

If each year a different cereal was planted, then cereal is nested within year, but year could still be crossed with treatment and nematodes. Could you confirm?

These are the types of details that we require if we are going to provide a meaningful and correct answer.

--
Paige Miller
palolix
Obsidian | Level 7

Yes, I guess cereal could be nested in year, and year could also be crossed with treatment and nematodes.

palolix
Obsidian | Level 7

I think maybe I should analize it as a Split-split plot model in order to include the year, which should be include before block and the rest of the factors.  What do you think?

PaigeMiller
Diamond | Level 26

The problem is that you have to analyze the design in an appropriate manner. So if Year is crossed with the other factors, then it can't be a split-split plot (I don't think).

So, I think this is the analysis

Year and Nematode and their interaction is the whole plot, treatment is plot, cereal cultivar nested within Year is subplot.

So this is my analysis

proc mixed;

class year blk nem trt cultivar;

model lgsprCysts100=nem|year trt trt*nem trt*year trt*nem*year cultivar(year) cultivar(year)*nem cultivar(year)*trt cultivar(year)*new*trt;

random blk blk*trt blk*trt*nem blk*trt*year blk*trt*year*nem;

run;

Maybe I'm way off. What do you think, ?

--
Paige Miller
palolix
Obsidian | Level 7

Thanks a lot Paige!  its look very good.  Maybe I said it wrong, but block should be the whole plot, because each block includes the 3 nematodes, the 2 different treatments and the cultivars, so nematode and treatment should be the plot, and cultivar the subplot. 

SteveDenham
Jade | Level 19

Sorry to be so slow in replying.  That model ought to be OK.  Now I'm going to worry more about the dependent variable, and whether this should be done in GLIMMIX with an untransformed DV and an appropriate distribution for counts of cysts.

If it were in GLIMMIX, with a negative binomial distribution for overdispersed counts, we could also get an appropriate covariance error structure to model any time dependence over years.

Steve Denham

palolix
Obsidian | Level 7

Thank you very much for your reply Steve!  I think this model should be also ok.

Proc mixed data=one;

where nem>1;

class blk nem trt crop date;

model lgsprCysts100=

nem|trt|crop|date/ddfm=Satterth;

random blk blk*nem blk*nem*trt*crop;

palolix
Obsidian | Level 7

Hi Steve!

I have a Split plot design but with 4 factors; nem, trt, crop and date.  Until now I have only done split-split designs, but what comes next when you have to add a forth factor.  Is this code ok??

Thanks!!

blk

nem

blk*nem

trt

nem*trt

blk*nem*trt

crop

blk*crop

nem*crop

trt*crop

blk*nem*crop

nem*trt*crop

date

blk*date

nem*date

trt*date

crop*date

blk*nem*trt*date

nem*trt*crop*date;

random blk blk*nem blk*nem*trt blk*crop blk*nem*crop blk*date blk*nem*trt*date/test;

run;

SteveDenham
Jade | Level 19

Caroline,

I think there may be some missing factors.  Let me see if the design is correct:

Fixed effects: nematode type, treatment, crop

Random effect: block

Repeated effect: date

I assume that there is a single measurement per date for the nem*trt*crop*block cell.

If this is the case, it looks like the following might be what you should consider:

proc mixed;

class nem trt crop blk date;

model nem|trt|crop|date;

random intercept nem|trt|crop/subject=blk;

repeated date/subject=nem*trt*crop*blk type=<insert appropriate type here depending on spacing of dates, cs or csh for uneven spacing, ar(1) or arh(1) for regular spacing;

run;

Appropriate options should be added for solutions, etc., as well as LSmean or LSestimate statements as needed.

Steve Denham

palolix
Obsidian | Level 7

Hi Steve,

thank you very much for your help!

ja, there is a single measurement per date, and and there is a regular spacing for date (harvest 2010, harvest 2011 and harvest 2012).  The thing is that is not a repeated measures model, because the crop are not the same every year, so the conditions are not the same every year.  How would you code this model with proc glm?

Thanks a lot!

Caroline

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 17 replies
  • 2523 views
  • 6 likes
  • 3 in conversation