1. Learn
  2. /
  3. Courses
  4. /
  5. Helsinki Open Data Science

Connected

Exercise

Slippery slopes: Random Intercept and Random Slope Model

Now we can move on to fit the random intercept and random slope model to the rat growth data. Fitting a random intercept and random slope model allows the linear regression fits for each individual to differ in intercept but also in slope. This way it is possible to account for the individual differences in the rats' growth profiles, but also the effect of time.

Instructions

100 XP
  • Fit the random intercept and slope model with Time and ID as the random effects
  • Print the summary of the model
  • Compute the analysis of variance tables of the models RATS_ref and RATS_ref1
  • Pay attention to the chi-squared statistics and p-value of the likelihood ratio test between RATS_ref1 and RATS_ref. The lower the value the better the fit against the comparison model.