Problem set 10

Complete this task individually or in teams of up to three students.

Submission information: please submit on ZoneCours

Read the chocolate example from Meier (2022) and some of the examples from the course notes.

Consider the model of Hatano et al. (2022) for Experiment 4. The authors fitted a linear mixed model for the intrinsic motivation score, a scale, with a continuous covariate (interim rating time) and the rating type (either predicted pre-experiment, or the true rating post-experiment). The rating time was centered. Using Oehlert (2000) approach

  1. Identify sources of variation
  2. Identify whether factors are crossed or nested
  3. Determine whether factors should be fixed or random
  4. Figure out which interactions can exist and whether they can be fitted.

Now, fit the linear mixed model using the following code

data(HOSM22_E4, package = "hecedsm")
mixmod <- lmer(imscore ~ #TODO add covariates, etc.
               data = HOSM22_E4)
summary(mixmod) # coefficients
anova(mixmod) # type III analysis of variance table
  1. Report the results for the interaction test: is the interaction significative at level 5%? If not, compute estimated marginal means for rating type.
  2. Compute the correlation between measurements from the same students.


Hatano, A., Ogulmus, C., Shigemasu, H., & Murayama, K. (2022). Thinking about thinking: People underestimate how enjoyable and engaging just waiting is. Journal of Experimental Psychology: General, 151(12), 3213–3229.
Meier, L. (2022). ANOVA and mixed models: A short introduction using R (Chapman & Hall/CRC, Eds.).
Oehlert, G. (2000). A first course in design and analysis of experiments. W. H. Freeman.