Contents
Why does the model fit suffer from singularities?
Notice that the model fit suffers from singularities, as we’re trying to estimate 4 regression coefficients plus the error standard deviation using just 2 observations. The singularities would persist even if we observed this subject twice – rather than once – under each condition.
What causes a singular fit in a lmer model?
Thank you, so much. In lmer, a singular fit could be caused by collinearity in fixed effects, as in any other linear model. That would need you to revise your model by removing terms.
Why do we not have enough observations for the singularity?
My interpretation of the singularity issue, which certainly could be incorrect, is that each of the combinations of your model only has one observation/measurement. Therefore, you may not have enough observations to include all of those variables as fixed effects. Thanks for contributing an answer to Stack Overflow!
How to get rid of singularities in R?
However, if we observed the subject 3 times under each condition, we would get rid of singularities: Here is the corresponding R output for this second example, from which the singularities have disappeared:
What’s the best way to test for Singularity?
Now, according to this helpful link one way to deal with this model is to remove higher-order random effects (e.g., X:ConditionB) and see whether that makes a difference when testing for singularity. The other is to use the Bayesian approach, e.g., the blme package to avoid singularity.
How to use lmer to fit reduced random effects structure?
As an example, I’ll cover extending the model to allow for quadratic change during piece 1. If you wanted to fit a reduced random effects structure you could use the method outlined in “Drop the correlation between time piece 1 and 2”. lmer does not report p -values or degrees of freedoms, see ?pvalues and r-sig-mixed-models FAQ for why not.