I'm conducting an experiment to see how automation can increae task-unrelated thoughts (or mind wandering, MW). In order to do so, I displayed probes asking "Are you on or off task?". Now I'm analyzing data with 4 blocks, each block gathering 5 probes. To sum-up my independant variables are time (block 1, 2, 3 and 4) and condition (automated or manual). My dependant variable is the frequency of MW (for each block, it can be 0, 0.2, 0.4, 0.6, 0.8 and 1, as there are 5 probes per block).

I used the lmer function (package lme4) in R to build a model. Now I want to check if the assumptions are met.

On the figure below you can see the fitted*residuals graph. As I saw already here ("parallel-straight-lines-on-residual-vs-fitted-plot" discussion on Stack Exchange) the lines are perfectly normal considering that I have only a few possible values for the frequency of MW. The residuals are normal, I already checked. However knowing that doesn't tell me how to check for homoscedasticity. I found the lmtest !jgouraud package to check this using the Breusch-Pagan test, however it doesn't take lmer models as arguments (only lm models).

enter image description here

My questions are therefore:

  1. is it accepted to say "visual detection did not reveal any obvious deviation from the homoscedasticity assumption" for a publication? I saw it here (bodowinter.com/tutorial/bw_LME_tutorial1.pdf) but I'm not so sure
  2. is it even possible to say that regarding this graph?
  3. in any case, do you know any R package to test homoscedasticity of residuals for lmer models?
  4. should I use another type of model? I'm new to statistics, so I don't have any experience concerning modelisation

Thank you for your time,


EDIT: as proposed by mdewey, I plotted plot(fitted, sqrt(abs(residuals)). However I don't have any idea of what I'm supposed to see here: it's only normal half sqrt graphs, I don't know how I should see an "increase to the right" or not. enter image description here

  • $\begingroup$ Try plotting the sqrt of the abs value of the residuals against fitted. if they increase to the right you have heteroscedasticity. $\endgroup$
    – mdewey
    Jul 20, 2017 at 12:24
  • $\begingroup$ I think your residuals plot is typical of a dependent variable with discrete values. $\endgroup$
    – guy
    Jul 20, 2017 at 13:08
  • $\begingroup$ @mdewey I did the graph you asked, however I don't know how to evaluate an increase $\endgroup$
    – Pyxel
    Jul 20, 2017 at 13:20
  • $\begingroup$ @tbone: that is exactly what I said in my post, please read it before commenting $\endgroup$
    – Pyxel
    Jul 20, 2017 at 13:22
  • 1
    $\begingroup$ @tbone thank you for this link, although I looked for similar topics, I didn't encounter this one. I'll look into ordered logit models right away. $\endgroup$
    – Pyxel
    Jul 20, 2017 at 13:49


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.