[R-sig-ME] year and site
h.wickham at gmail.com
Sat Sep 26 23:18:44 CEST 2009
On Sat, Sep 26, 2009 at 9:58 AM, Douglas Bates <bates at stat.wisc.edu> wrote:
> On Sat, Sep 26, 2009 at 9:17 AM, hadley wickham <h.wickham at gmail.com> wrote:
>>> in ecology year a study is done in, and the site it is done at, are
>>> obvious random effects.
>> You're picking the years at random? - that's a pretty impressive study design!
> As I'm sure you realize, Hadley, it is the effects that are random,
> not the years. If I have studied a particular location for the last
> three years and I use a fixed-effect for the years in my model then I
> can "predict" the response for any one of those three years that I
> wish to. But I have no information on which to base a prediction for
> next year, which is usually what I want to do. (I am assuming the
> year is being modeled as a categorical variable rather than in terms
> of trends.)
> Using random effects for the year allows me to characterize the
> variability between years and that does help me in characterizing the
> variability for the next year.
I forgot to add a ;) to my initial comment - I was really more poking
at "are obvious random effects". It is _useful_ to model year as a
random effect, but don't we need to limit the scope of our inference
to the scope of the experimental randomisation? To extend the scope
of inference to all years we need to make some additional assumptions
- that these three years are representative (in some sense) and that
there is no long term trend (and probably some others).
While the locations are also unlikely to be picked at random, we often
make more of an effort to randomise their location within a study
area. Until a time machine is invented, we are limited to a
convenience sample of years.
More information about the R-sig-mixed-models