1
$\begingroup$

I am new to mixed-effect models and statistics, and I need to do a project for my thesis using mixed-effect modeling techniques.

My research aims to model how cardiovascular risk scores change over time. In this case, my mixed-effect model is

 lmer(log(Score) ~ Time + I(Time ^2) + (1+ Time + I(Time ^2) | Patients))

I have log transformed the score to improve the model fit. Quadratic function of time shows a better model fit. The random effect is allowing intercept and time to vary among patients.

I got an issue with the residuals of my best-fitted mixed-effect model. Q-Q plot shows the residuals are not normal on the individual level. However, the residuals look normal at the population level. If I fit a linear model (without the random effect component), the residuals also look normal. Hence, I suspected the issue was due to the random effect structure. I've been playing around with different random effect structures and correlations in the lme4 package in R, but neither could fix the residual issue.

I really need help to get through.

enter image description here

$\endgroup$
9
  • 1
    $\begingroup$ Could you please explain what the data are and what questions you want to answer using the model? $\endgroup$ Commented Nov 19, 2022 at 12:15
  • 2
    $\begingroup$ If there is a dependence structure in your data that requires the mixed effects model, it is of no help and ultimately of no meaning that residuals of models that ignore this structure look more normal. From the given information I have no idea how harmful the non-normality you detected actually is. There's the robustlmm package in R that should give you fits that are less affected by non-normal tails. $\endgroup$ Commented Nov 19, 2022 at 13:45
  • 1
    $\begingroup$ Thanks. Please add this information to your question, not everyone reads comments. $\endgroup$ Commented Nov 19, 2022 at 20:20
  • $\begingroup$ FYI, You need a random slope on Time^2 if you are going to have one on Time. $\endgroup$
    – Noah
    Commented Nov 20, 2022 at 0:39
  • $\begingroup$ yes, thanks, i have edited my post $\endgroup$ Commented Nov 20, 2022 at 1:10

1 Answer 1

1
$\begingroup$

it's a good call to see that you can look at residuals marginal (population-level) and conditional (on the RE).

The bad news here though is that what is relevant for your case are the conditional residuals, and they don't look normal. You shouldn't adjust the RE structure to correct this - it's not the fault of the REs, it can just happen that your residual error is non-normal.

In this case, you have at least 3 options to deal with distributional problem

  • try other transformations
  • beta regression
  • quantile regressions

I would probably try if beta solves the problem (because this is the natural choice), and else try a quantile regression.

Additional comment: my personal opinion is that the (1+ Time + I(Time ^2) | Patients)) structure creates a weird setup for modelling between-patient variability in temporal trends, because of the dependency between Time and Time^2. I would prefer using factor smooths or factor smooth interactions, see e.g. Multiply a seasonal spline by a region-specific coefficient in Generalized Additive Model (GAM) in R. You can do so keeping your population-level estimate as a polynomial or move to a spline as well.

$\endgroup$
3
  • $\begingroup$ Hi, Florian, thank you kindly for the suggestion. I have tried log, logit, arcsine transformations, however, neither of these could solve the residual issue. I also tried to use the CVD score increase from the baseline instead of the raw CVD scores (both score-baseline & score/baseline then log transformed), it also didn't work. I suspected that's because the proportion data are usually skewed (my data is highly skewed to the left - most are distributed from 0.02-10%). Hence, it's difficult to solve the residual error by transformations? $\endgroup$ Commented Dec 8, 2022 at 1:44
  • $\begingroup$ I have tried GLMM with beta distribution, it works well so far. Compared with LMM, the result doesn't look very different, which is also good. Thanks for the suggestion for quantile regression, I haven't learned before, but I am willing to do some research $\endgroup$ Commented Dec 8, 2022 at 1:44
  • $\begingroup$ if a beta works, it's preferable because fully parametric, so I wouldn't change to quantile $\endgroup$ Commented Dec 8, 2022 at 14:26

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.