Testing assumptions for linear mixed-effect model LMM
Hello all!
i am currently writing my master thesis using a LMM. For my analysis i would like to check the model assumptions.
• The explanatory variables are related linearly to the response.
• The errors/residuals have constant variance (homoscedasticity).
• The errors/residuals are independent.
• The errors/residuals are normally distributed.
How do i do that? Is it possible within the tool for the LMM?
I have tried it via normal linear regression, however my independent variables are all nominal (different design features of advertisements, such as color, animation (yes/no), use of logos (yes/no) etc.).
When i check for collineraity within the linear regression tool, JASP tells me that the independent variables must be metric?
Unfortunately i am a JASP beginner. Can you help me? That would be great!
Many greetings
Lena
Comments
Hi
You could try doing the following steps:
Linearity: Use dummy coding to represent nominal independent variables as binary ones. You can use the lme4 package in R for this, as JASP might not handle categorical variables efficiently.
Homoscedasticity: Create a residual plot in JASP by obtaining residuals from your LMM and plotting them against fitted values. No pattern or funnel shape shows homoscedasticity.
Independence of errors: JASP does not support autocorrelation plots for LMMs, so you'll need to use R for this. Use the acf() function on the residuals from your LMM to create an autocorrelation plot. Lack of significant autocorrelation suggests independent errors.
Normality of errors: Create a Q-Q plot of residuals in JASP. Points falling along a straight line suggest normality of errors.
Collinearity check is not applicable to your nominal independent variables. Some diagnostics might need to be done in R, like the autocorrelation plot, due to limitations in JASP.
Hope this will help.