2
$\begingroup$

I have data from a daily diary study of participants nested in couples. To analyse the data I used lme4 to do multilevel modelling in R to create my models.

After doing this I wanted to check if the model assumptions were given. I plotted Residuals vs Predicted, and my understanding is in order for the assumption of linearity to be fullfilled there should not be an observable pattern. I think the plot looks like this because the outcome variable is categorical. The normal qq plot doesn't look super bad - but now I am just not sure how to continue.

Does anyone have an idea how I could analyse the data in R? The outcome here is on a 5-point Likert scale.

Plot Residuals vs Predicted of the variable

$\endgroup$

1 Answer 1

0
$\begingroup$

The pattern on your plot may well arise as you surmise. The general definition

residual = observed $-$ predicted

implies that data points with the same observed outcome lie on the same straight line, so if 3 is the observed outcome then all data points with outcome 3 lie on the line 3 $-$ predicted. All such lines have gradient $-$1, as observed on your plot.

However, I count 11 distinct lines, which isn't obviously consistent with the report that your outcome has 5 distinct values. That may be something to do with the project using data on couples, but you don't explain that detail.

If you're fitting a linear model with an ordered outcome, then that divides researchers, as many would prefer a model specifically for such outcomes, say ordinal logit or probit. I wouldn't expect normal (Gaussian) residuals beyond that being a rough approximation.

You're not telling us anything about your predictors (covariates, explanatory variables, whatever you want to call them). I can't suggest further analyses on this information.

Your using R is incidental, as this isn't an R forum and software-specific or coding requests are generally off-topic. I am focusing here on the statistical aspects of the question.

$\endgroup$
1
  • 1
    $\begingroup$ The residual plot also resembles what I've seen when differences from baseline rather than raw values are used as Y. Differences from baseline has a host of serious problems, as compared to ANCOVA adjusted for baseline. If that's not the problem, also consider floor and ceiling effects that would be solved by ordinal models as Nick mentioned. $\endgroup$ Commented Aug 2, 2023 at 12:16

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.