2
$\begingroup$

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?

Residuals Scatterplot to Assess MLM Assumptions

$\endgroup$

1 Answer 1

2
$\begingroup$

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:

similar pattern

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

similar pattern LMM

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)
$\endgroup$
8
  • $\begingroup$ 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? $\endgroup$
    – Mark S.
    Commented Jul 13 at 15:37
  • $\begingroup$ 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? $\endgroup$
    – Mark S.
    Commented Jul 13 at 15:47
  • $\begingroup$ @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. $\endgroup$ Commented Jul 13 at 17:40
  • $\begingroup$ Thank you. I am reviewing GLMM in SPSS now. So for the Link function would you recommend Binomial Distribution and Identity Link function? $\endgroup$
    – Mark S.
    Commented Jul 13 at 19:40
  • $\begingroup$ 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! $\endgroup$
    – Mark S.
    Commented Jul 13 at 19:47

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.