Programming the statistical procedures from SAS

two-way MANOVA with nested random effect in proc glm - what error terms should I be testing over?

Reply
New Contributor
Posts: 2

two-way MANOVA with nested random effect in proc glm - what error terms should I be testing over?

I am examining multiple traits for the effects of various treatments, multiple genotypes, and their interaction.

 

Therefore I have two fixed factors:

  • treatment (4 levels)
  • genotype (12 levels)

However, each 'genotype' was kept in 4-5 different 'containers', so there is a nested random effect:

  • container(genotype)

[The containers are numbered uniquely in the datasheet.]

 

Therefore my model is:
trait1 trait2 trait3 trait4 ~ treatment genotype treatment*genotype container(genotype),
where 'treatment' and 'genotype' are fixed, and 'container' is random and nested within 'genotype'.

 

I am interested in significance testing the two fixed factors and their interaction.

However, in order to create the correct hypothesis test for each effect, I need to be careful to specify the correct MS divisor for the F ratio given the nested random factor.

 

For the 'genotype' fixed effect I am sure the correct MS term is the 'container(genotype)';
for the 'treatment' fixed effect I think the correct MS term is the residual MS error but am not entirely sure;
but for the interaction term I am not at all sure what MS term I should be using.

 

I am using proc glm in SAS v9.3 and this is what I have so far:

proc glm data=dataset;
class treatment genotype container ;
model trait1 trait2 trait3 trait4 = treatment|genotype container(genotype) / ss3 nouni;
random container(genotype) / test ;
manova H=treatment;
manova H=genotype E=container(genotype);
manova H=treatment*genotype E=?;
run;
quit;

Any help would be greatly appreciated and doesn't have to relate to MANOVA.

Respected Advisor
Posts: 2,655

Re: two-way MANOVA with nested random effect in proc glm - what error terms should I be testing over

Ouch.  Since PROC GLM does not correctly calculate standard errors for split plot models (which is what this is), you may want to consider using PROC GLIMMIX.  Example 45.5 Joint Modeling of Binary and Count Data is a place to get started.  It would help to know what distribution(s) your trait variables came from.  Work through that example carefully, and I think you will see how to apply it to your situation.

 

Steve Denham

New Contributor
Posts: 2

Re: two-way MANOVA with nested random effect in proc glm - what error terms should I be testing over

Thanks very much Steve - I’d overlooked this as a split-plot, so how I’ve done it is definitely incorrect. As a student I once did a split-plot in GLM but my instructor showed us how to do it ‘by-hand’ to get the correct F-ratios.



I’ll have a look at the GLIMMIX split-plot example you gave but will more likely need to use MIXED as the traits are from a Gaussian distribution (-∞ to ∞). Any further advice for doing a split-plot correctly in MIXED would be greatly appreciated.



Thanks again!


PROC Star
PROC Star
Posts: 185

Re: two-way MANOVA with nested random effect in proc glm - what error terms should I be testing over

[ Edited ]

For a short illustration of using the MIXED procedure to do MANOVA, see

 

http://blogs.sas.com/content/sastraining/2011/02/02/the-punchline-manova-or-a-mixed-model/

 

The column compares GLM and MIXED, and also notes the use of a mixture of distributions in GLIMMIX like @SteveDenham suggested, which would be very handy if different traits followed different distributions.

 

Edit: You can certainly use GLIMMIX for data that follow a normal distribution.

Ask a Question
Discussion stats
  • 3 replies
  • 191 views
  • 3 likes
  • 3 in conversation