[R-sig-eco] issue with using different error terms within the same model

Iannone, Basil bianno2 at uic.edu
Thu Jan 20 18:23:33 CET 2011


Dear R users,

I am trying to analyze a data set from an experiment where I measured
nitrate over time. The study was set up in 5 blocks with four plots in
each (For now let’s assume that Block is a Fixed effect). Within each
block I randomly assigned one treatment combination of two possible
treatments (“Mulch” and “Tilling”) at two levels each (absent or present).
I also measured relative water content (“RWC”) in each plot 5 times over
the growing season to use as a covariate. So a model for an analysis had I
only measured nitrate one time would have a sample size of 20, have df for
the error term of 12, and look something like (I am not interested in RWC
interactions):

        Nitrate ~ Block + RWC + Mulch*Till

But I measured nitrate 5 times over the growing season. So now I have a
sample size of 100 and I want to analyze the following model.

        Nitrate ~ Block + RWC + Mulch*Till + Week + Week:RWC +
Week*Mulch*Till

The issue is that I cannot figure out how to code the larger model in R so
that the between subject terms (ones before “Week”) are estimated using df
for the error term of 12 (N = 20) and the within subject terms (“Week” and
later in the model) using the df for the error term of 78 (N = 100) (This
value may not be correct). Currently the models I use in R, including aov
and gls (in nlme) produce pseudo-replicated results for the between
subject terms, i.e., they are calculated using the larger df value
assuming that N = 100 not 20.

I would prefer to use the “nlme” package for this analysis because I am
familiar with how to include variance structures if they are needed and I
could treat Block as a random effect if I convince myself that it in fact
is.

Thanks in advance for any advice that anyone can offer.


-- 
Basil Iannone
University of Illinois at Chicago
Department of Biological Sciences (MC 066)
845 W. Taylor St.
Chicago, IL  60607-7060
Email: bianno2 at uic.edu
Phone: 312-355-3231
Fax: 312-413-2435
http://www2.uic.edu/~bianno2



More information about the R-sig-ecology mailing list