[R] Repeates Measures MANOVA for Time*Treatment Interactions

Jarrett Byrnes redbeard at arrr.net
Tue Nov 15 19:10:19 CET 2005


Dear R folk,
	First off I want to thank those of you who responded with comments for 
my R quick and dirty stats tutorial.  They've been quite helpful, and 
I'm in the process of revising them.  When it comes to repeated 
measures MANOVA, I'm in a bit of a bind, however.  I'm beginning to see 
that all of the documentation is written for psychologists, who have a 
slightly different mind-set behind their experiments than, say, an 
ecologist, who is interested in the effects of time per se, and not 
just the effects of a treatment.  For example, here's my dataset, say, 
looking at plant height in cm with and without fertilizer

Treatment, Time1, Time2, Time3, Time4, Time5
Fertilizer, 1, 4, 8, 10, 12
Control,1,2,3,4,5
Fertilizer,1,8,10,12,20
Control,1,3,5,6,6
Fertilizer,2,5,10,20,25
Control,1,2,4,4,4


Clearly there is a time*treatment interaction (just eyeballing the 
dataset)

My question is, how does one set this up using the anova.mlm approach 
so that in the end I can write up a table that says

Treatment
Time
Time*Treatment

I can see from ?anova.mlm how one would get the Treatment effect using 
something like

response<-with(my.data, rbind(Time1, Time2, Time3, Time4, Time5))
mlmfit<-lm(response~1)
mlmfit0<-update(mlmfit, ~0)
anova(mlmfit, mlmfit0, X = ~ Treatment, idata=my.data, test="Spherical")

Although this yields the result that, after correction, it's not 
significant - perhaps due to the low DF from this simple example
--
Analysis of Variance Table

Model 1: response ~ 1
Model 2: response ~ 1 - 1

Contrasts orthogonal to
~Treatment

Greenhouse-Geisser epsilon: 0.3565
Huynh-Feldt epsilon:        0.4982

   Res.Df Df Gen.var.      F num Df den Df  Pr(>F)  G-G Pr  H-F Pr
1      4     0.43167
2      5  1  0.50937 3.7939      4     16 0.02356 0.09620 0.06966
--

But, I still want to get my time and time*treatment interactions - what 
would be the appropriate anova statements here?

Thanks so much, and hopefully this will resolve the confusion both for 
myself and for LOTS of other ecology types!

-Jarrett


----------------------------------------
Jarrett Byrnes
Population Biology Graduate Group, UC Davis
Bodega Marine Lab
707-875-1969
http://www-eve.ucdavis.edu/stachowicz/byrnes.shtml




More information about the R-help mailing list