I am now running a linear mixed effects model and want to use emmeans() to do the post-hoc tests.
Here is my code:
mod.cog_engagement <- lmer(scale(cog_engagement) ~ Year_ID*Group + (1 | school) + (1 | id), data = combined_data)
emm <- emmeans(mod.happiness, ~ Year_ID|Group)
Error in h(simpleError(msg, call)) :
error in evaluating the argument ‘x’ in selecting a method for function ‘chol2inv’: chol(x) is undefined: ‘x’ is not positive definite
Year_ID and Group here are all [factor]
I dont know how to deal with it. I appreciate any help and comments on it. Let me know if you need more information
I already check_model() and the results are shown here: Actually not bad.
enter image description here
Mason is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2