# Multilevel Model Residuals Scatterplot Assumptions

I am conducting multilevel modelling (MLM) in SPSS (mixed modeling) to analyze cross-sectional repeated measures data. One of my dependent variables is a survey question scaled 1 to 10, which produced the attached scatterplot of the residuals, which is angled downward but still balanced around the zero line. Could this "angling" cause any concern for interpreting that the MLM assumptions are being met?

You only have a fixed number of outcomes, so the pattern you are observing reflects that.

In fact, you can quite closely reproduce this pattern by plotting residuals of a binomial process:

...or the Pearson residuals of a multilevel model:

# What to make of this?

What you're really observing is that:

Simulated data to reproduce the figures:

# Binomial example
set.seed(2024)
n    <- 1000
size <- 10
x    <- rnorm(n, 10, 3)
ID   <- factor(rep(1:100, each = 10))
Z    <- model.matrix(~ 0 + ID)
eta  <- -1.8 + 0.2 * x + Z %*% rnorm(ncol(Z))
y    <- rbinom(n, size, binomial()$linkinv(eta)) + 1 DF <- data.frame(x, y) rm(n, size, x, eta, y) LM <- lm(y ~ x, DF) plot(LM, which = 1, pch = 21, bg = "steelblue1", xlim = c(2, 10)) # Binomial multilevel example set.seed(2024) n <- 1000 size <- 10 x <- rnorm(n, 6, 3) ID <- factor(rep(1:100, each = 10)) Z <- model.matrix(~ 0 + ID) eta <- -0.75 + 0.15 * x + Z %*% rnorm(ncol(Z), 0, 0.5) y <- rbinom(n, size, binomial()$linkinv(eta)) + 1
DF   <- data.frame(x, y, ID)
rm(n, size, x, eta, y)

LM <- lm(y ~ x, DF)

require("lme4")
LMM <- lmer(y ~ x + (1 | ID), DF)

plot(residuals(LMM) ~ fitted(LMM), pch = 21, bg = "steelblue1", xlim = c(2, 10),
cex = 0.7)
mtext("Pearson Residuals vs Fitted", 3, 0.5)

• Thank you so much for your help. I am using a Linear Mixed Model (LMM) in SPSS (MIXED command), and don't know much about R. I am attempting to assess the multilevel/mixed model assumptions of Linearity, Normality and Homoskedasticity through assessment of the Level-1 (and also Level-2) residuals in scatterplots (as well as Histograms and Q-Q Plots). To clarify are you saying that this scatterplot does not satisfy these assumptions, and that a GLMM will be required? Commented Jul 13 at 15:37
• Also, I have been exploring transformations (e.g. log, square root, etc) for my dependent variables. Would these potentially allow the use of LMM instead of GLMM? Commented Jul 13 at 15:47
• @MarkS. A transformation cannot change the discrete nature of the outcome. While you can approximate a binomial process with a normal distribution, this approximation is only good if the probability of success is close to $p = \frac{1}{2}$ and/or the number of trials is very large. Since you only have 10 possible outcomes, it is better to use a model made for discrete outcomes, like a binomial GLMM. Commented Jul 13 at 17:40
• Thank you. I am reviewing GLMM in SPSS now. So for the Link function would you recommend Binomial Distribution and Identity Link function? Commented Jul 13 at 19:40
• I also have some continuous DVs. Would these benefit from GLMM using a linear model link function, or would I do just as well sticking with LMM? Thank you for your continued help! Commented Jul 13 at 19:47