Session Ready
Exercise

Random intercept and slope model

"How does relative humidity influence the abundance of orchids?"

Since you are more interested in answering a question about the wider population of sites rather than the particular sites you have sampled, you will, once again, move from a GLM to a Mixed Effect Model. This time, you'll use a random intercept and slope model to examine how site effects the distributions of both the intercept and slope coefficients.

Recall that a random intercept and slope model can be applied using:

lme(y ~ x, random = ~1 + slopeVariable|randomEffect, data = myData)

Note that the orchids data set and nlme library have been preloaded.

Instructions
100 XP
  • Look at the research question and apply a random intercept and slope model to evaluate how site effects the intercept and slope of the model.
  • Look at the output of the model.