[R] Split-plot model

Spencer Graves spencer.graves at pdf.com
Thu Aug 10 11:00:31 CEST 2006


	  Have you considered the 'lme' function in library(nlme)?  The 'lme' 
function is new, much more flexible, and as far as I know at least as 
good and usually better than 'aov'.  I would try the following:

	  fit <- lme(response~CO2*NITROGEN, random=~1|ROOM)

	  Checking "methods(class='lme')" gives a list of helper functions to 
do a variety of useful things with 'fit'.  For more information, see 
Pinheiro and Bates (2000) Mixed-Effects Models in S and S-Plus 
(Springer).  I suggest you use the companion R script files in the 
"~\library\nlme\scripts" subdirectory of your R installation to 
facilitate your study of the book.  There is at least one minor but 
important difference in the syntax between the book and R.  In addition, 
using these script files should save you from any problems with 
typographical errors, thereby making your study more enjoyable and 
educational.

	  Hope this helps.
	  Spencer Graves

Chreis Habeck wrote:
> How do I set up my model equation in aov to analyze a split-plot design?
> 
> I have two factors (CO2 and NITROGEN), each with two levels (high and 
> ambient).   CO2 is my whole-plot factor with three replicates for each level 
> (i.e., 6 rooms total).
> 
> Is this syntax below correct?
> 
> summary(aov(response ~ ROOM + CO2*NITROGEN + Error(ROOM/CO2)))
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list