[R] Help with lme for split plot
CBEdge
christopher.edge at unb.ca
Tue Dec 14 00:27:33 CET 2010
Hello,
I am having trouble doing a split plot analysis of variance with lme. The
study design is ponds split in two, one side of each pond was a control and
the other was one of three chemical treatments. Each pond side was sampled
three times, response variable is the mean of twenty animals. So we have
sample time within side within pond. Pond is random effects. There are
three or four replicate ponds for each treatment
data table looks like this
pond side sampperiod response
1 cont 1 x1
1 cont 2 x2
1 cont 3 x3
1 chem1 1 x1
1 chem1 2 x2
1 chem1 3 x3
2 cont 1 x1
2 cont 2 x2
2 cont 3 x3
2 chem2 1 x1
2 chem2 2 x2
2 chem2 3 x3
3 cont 1 x1
3 cont 2 x2
3 cont 3 x3
3 chem3 1 x1
3 chem3 2 x2
3 chem3 3 x3
I can fit a model using aov
m1<-aov(response~side*sampperiod + Error(pond/side/sampperiod,
data=datafile)
Since there is unequal replication, 4 replicates for one chemical treatment
and 3 for the other two, and there is one missing value, lme from the nlme
package should be used.
m2<-lme(response~sampperiod*side*pond, random=~1|pond, data=datafile)
Any help would be greatly appreciated.
Cheers,
Chris Edge
PhD. Candidate
Biology Dept.
University of New Brunswick
--
View this message in context: http://r.789695.n4.nabble.com/Help-with-lme-for-split-plot-tp3086237p3086237.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list