[R-sig-ME] New to LMER with 2 (easy?) questions...

Ben Bolker bolker at ufl.edu
Thu May 21 05:12:11 CEST 2009


Peter McHugh wrote:
> I apologize in advance if this is a fairly trivial set of questions,
> but I'm fairly new to multi-level models...
> 
> I'm analyzing the results from a field experiment and am interested
> in quantifying the effects of various fertilizer treatments (2
> factors, N and P, each with two levels) and environmental variables
> (i.e., site-level covariates [ENV1...ENVp] that were not controlled
> for, but measured) on plant growth [GROW] across a wide range of
> sites (SITE).  Also, treatments were replicated within sites using a
> randomized complete block (BLOCK) design (the blocks are arranged
> parallel to hillslope contours at each site, and there is no
> replication within blocks).  It's a fairly straightforward design,
> but I'm not 100% sure that I'm specifying my models correctly.  My
> questions are:
> 
> 1) If I'm interested in estimating the main effects of N and P (and
> their interaction) while incoporating site and block (nested within
> site) as random effects WITHOUT incorporating environmental
> variables, is the following model structure correct?
> 
> model1<- lmer(GROW ~ N + P + N*P + (1|SITE) + (1|SITE:BLOCK),
> options...)
> 
> The main reason I ask is that I'm obtaining a miniscule (almost zero)
> variance component for the SITE:BLOCK effect; though this isn't
> surprising, I want to make sure that I've at least specified the
> model correctly.

   The only thing I would check for is that your BLOCK numbers
are truly "nested" within SITE, i.e. that your blocks are numbered
1..n within each site, not 1:(n*N) (where n = # blocks per site,
N = # of sites).  What are n and N?  A common cause of low estimated
block variance is low replication ...

> 2) (partially a design question) Same basic analysis, but now I'm
> interested in incorporating some of the environmental variables that
> were measured at the site level into my model.  In particular, I'm
> interested determining how certain factors (though I didn't control
> for them) may have modified the response of plants to the
> experimental treatments.  Is the following the correct way to do so?
> 
> model2<-lmer(GROW ~ N + P + N*P + ENV1 [plus appropriate trt*cov
> interactions] + (1|SITE:BLOCK), options...)
> 
> I'm particularly curious if replacing the random categorical site
> effect with continuous covariate(s), while retaining the random
> nested block effect, makes sense here.  And if so, whether this is
> the correct way to specify such a model.

  I would leave (1|SITE) in the model to check whether there is residual
site variation that isn't explained by the environmental variables ...

  Ben Bolker




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