My dataset consists of ~800 observations. This is the distribution of my response variable:

enter image description here

I'd like to model the response with a generalised linear mixed model with 1 random effect and 8 fixed effects. I've tried different families and links but in any case when I compare observed vs. fitted values I can see that the few very high values of the response variable are modelled poorly.

Model fit with gaussian family and log link (best of all I tried): enter image description here

What can I try to increase the fit?

  • $\begingroup$ Have you also tried non-linear associations (transforming variables [predictor or outcome] to for example, log scale; or fractional polynomials; or [restricted] cubic splines)? $\endgroup$
    – IWS
    Apr 28, 2017 at 8:52
  • $\begingroup$ On the residual plot, which axis are the predictions? $\endgroup$
    – Gijs
    Apr 28, 2017 at 9:15
  • $\begingroup$ @IWS I tried transforming the response variable to no avail $\endgroup$
    – user45065
    Apr 28, 2017 at 9:21
  • $\begingroup$ I would recommend you to look at the non-linear association types I mentioned in my previous comment. This concerns the predictor variables (independent variables) instead of the response (==outcome==dependent variable). $\endgroup$
    – IWS
    Apr 28, 2017 at 9:23

1 Answer 1


Under your assumptions, it seems the data has a couple of data points that have a higher outcome than the model expects. You hope that after a logarithmic transformation the errors look Gaussian, but they do not.

You can think about what's causing the outliers. Perhaps there is something that's causing these? A nonlinear effect in one of the predictors? Or a missing predictor?

If you are confident the linear model is correct, you can try to wrestle the errors into a Gaussian. You mention you have used the log transform, that's a common one, but you can also try a couple of other transformations from the Box-Cox family, I've googled this link: https://www.isixsigma.com/tools-templates/normality/making-data-normal-using-box-cox-power-transformation/.


Your Answer

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