[R-sig-ME] Interactions between fixed and random effects

Ben Bolker bolker at ufl.edu
Mon Apr 5 13:28:13 CEST 2010


Christopher Eckert wrote:
> I apologize if the answer to this query is somewhere totally obvious,
> but i couldn't find it.
> 
> I am trying to analyze an experiment where a set of 22 populations of
> a dune plant species (populations were randomly chosen from across
> the species' geographic range) were grown in a glasshouse under two
> different watering regimes (Water = Control vs. Drought). DryMass is
> the response variable. There was about 20 individuals from each
> population grown in each Water treatment.
> 
> Population is a random effect, but I would like to test for an
> interaction between Population and Water -to ask the question: do
> different populations respond differently to drought?
> 
>> From what I can gather this is analogous the random intercepts and
>> slopes model discussed in Zuur et al and elsewhere, except that I
>> am examining a categorical predictor (Water) rather than a
>> continuous predictor.
> 
> Am I right in thinking that the basic syntax using lme is:
> 
> lme(DryMass~Water,random=~Water|Population)
> 
> and the syntax using lmer is:
> 
> lmer(DryMass~Water+(Water|Population))

  I think this is exactly right (and I disagree with the other
respondent who thought you should just use a fixed effect: you may well
be interested in the among-population variation within the species in
drought response).  One of the nice things about this formulation is
that it allows you to look at/test the relationship between variation in
Control growth and drought response -- i.e., is there a tradeoff between
 growth under good conditions and drought tolerance? -- by looking at
the covariance in the random effects.




More information about the R-sig-mixed-models mailing list