[R-sig-ME] Modelling intraspecific differences with random slopes
bates at stat.wisc.edu
Mon Nov 2 21:12:23 CET 2009
On Fri, Oct 30, 2009 at 1:21 PM, David R. <drbn at yahoo.com> wrote:
> I'm using mixed models (lme4 package) to analyze variability in 13 SPECIES of birds observed during 15 YEARS across 5 sites. All the species were observed in all the sites in most YEARS.
> My initial model was:
> response ~ a + b + c + d + e + (1 | YEAR) + (1 | SITE) + (1 | SPECIES)
> that after some LRT was simplified to:
> response ~ a + b + c + d + e + (1 | SPECIES)
> I was not interested in these species in their own right and treated them as being representative members of a population of similar species. But now I was asked about the possible intraspecific differences in the effect of a, b, c, d and e on the response.
> My question is: Is it appropriate a model of random intercept and slopes as initial full model to estimate these differences?
> For example:
> response ~ a + b + c + d + e + (1 | YEAR) + (1 | SITE) + (1 | SPECIES) + (1 + a | SPECIES) + (1 + b | SPECIES) + (1 + c | SPECIES) + (1 + d | SPECIES) + (1 + e | SPECIES)
You don't want to do that. If you want to try to estimate all the
variances and covariances in the interactions you could put in just
one term of the form (1 + a + b + c + d + c|SPECIES) but you would
need a large amount of data to estimate all the resulting covariance
terms. If you are willing to assume independent random effects you
could reduce this to
(1|SPECIES) + (0+a|SPECIES) + (0 + b|SPECIES) ...
That is, the model that you specified but replacing 1 + a, etc. with 0 + a, etc.
> Or perhaps is it more appropriate to work with species as fixed effects like:
> response ~ (a + b + c + d + e) * SPECIES + (1 | YEAR) + (1 | SITE)
That seems more appropriate in this case. Estimating a large number
of interactions between fixed-effects terms and random-effects
grouping variables is not a good idea.
More information about the R-sig-mixed-models