On 1/6/2013 12:45 AM, peter dalgaard wrote:
On Jan 6, 2013, at 04:00 , Pfeiffer, Steven wrote:

Hello,
For an experiment, I selected plots of land within a forest either with
honeysuckle or without honeysuckle.  Thus, my main factor is fixed, with 2
levels: "honeysuckle present"(n=11) and "honeysuckle absent"(n=8).

Within each plot of land, I have a "trenched" subplot and an "untrenched"
subplot.

Within each subplot of every plot, I measured soil moisture.  Now I need to
do a nested Anova to compare the soil moisture values between treatments.
I don't really want to discard some data to make the sample sizes
balanced.

Does anyone know how to do a nested, unbalanced Anova in R?
As far as I can tell, this is still an orthogonal design, so just proceed as 
usual. You're not in real trouble unless you have plots with one of the 
subplots missing. The whole thing will boil down to an analysis of the 
within-plot differences.

Just avoid things like Type-III sums of squares (base R won't do them, but 
popular add-ons will) because they get it wrong when cell counts are unequal.

Plot is a random effect. Honysuckle, trenched, and moisture are fixed. You may also wish to consider using either the nlme or lme4 packages, though they may not be needed "unless you have plots with one of the subplots missing", as Prof. Dalgaard indicated. Pinhiero and Bates (2000) Mixed-Effects Modeling in S and S-Plus (Springer) is the best book I know on the subject. The nlme package contains script files with names like ch01.R containing R code to work all the examples in the book; system.file('scripts', package='nlme') will give you the full path to where it is installed. These are necessary, because the R implementation contains a very few subtle changes from what is in the book. There is also an r-sig-mixed-mod...@r-project.org email list that may interest you. I have not used this in years, and I would expect that people on this email list could help you with more current information on what's available.


      Hope this helps.
      Spencer Graves

______________________________________________
R-help@r-project.org 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.

Reply via email to