I am looking for opinions/interpretation on a model I'm trying to fit. A disclaimer: I'm an ecologist and not a statistician; and I appreciate everyone's time and opinions! I am generally following Zuur et al. 2009's (using R) recommendations in an attempt to model travel speed as a function of a few environmental covariates, the main one of interest being a 1/0 "treatment" variable.

The data are by nature are hierarchical and I have therefore used a mixed model with a random intercept. The mixed model fits significantly better than the base gls model. Additionally I included a varIdent with the mixed model, and that is significantly better than without.

From this point, I have looked at assumptions and diagnostics - the residuals look OK, I think, but I always have a hard time telling if it's "too much" pattern. I think less than 5% of the data are outside of the 2/-2, so I'm good there. The variation doesn't seem to be driven by any points in particular, and the variance of residuals for each group of the "treatment" is close to 1 (using tapply; I interpret this as minor heterogeneity). A box plot of the residuals by the random effect shows equal spread around zero and minor variation = independence (see below)?

I've looked at residuals vs. fitted (not too bad), residuals vs. each covariate (pattern with one of my covariates, elevation), histogram of the residuals (still quite skewed), and have checked for all potential influential observations.

I just don't know if I'm "done" and can now consider this model an OK fit?

I've included a couple of diagnostic images (response variable can't go below a certain value, and therefore the residual plot shows a sharp "line" in the negative values) - std residuals vs fitted; residuals by random intercept; histogram of residuals (not normalized); residuals by elevation covariate - could be something going on here, but not sure how to deal with it:

enter image description here

residuals by random intercept

histogram of residuals (not normalized)

resids by elevation covariate

  • 1
    $\begingroup$ You don't say much about the nature of your data. Have you considered a transformation of the dependent or using a glmm? The plots seem to indicate that it might be appropriate and "response variable can't go below a certain value" also hints at that. $\endgroup$
    – Roland
    Aug 27, 2013 at 12:38
  • $\begingroup$ Yep, I've considered that as a last resort (because it doubly complicates interpretation). The Y data are continuous (speed), but there are upper and lower thresholds (an animal can only travel so fast or slow). There are many small values of Y and few large values. I had considered a glmm with gamma family, but if I want to do that in R, I'm looking at MCMC and then I'm afraid I'm a bit too far out of my league. $\endgroup$
    – RLang
    Aug 27, 2013 at 14:25
  • 1
    $\begingroup$ I don't think you need to be afraid of MCMC. There is a nice vignette for MCMCglmm. $\endgroup$
    – Roland
    Aug 27, 2013 at 14:37
  • $\begingroup$ ha, thanks!! i'll take a deep breath and have a look :) appreciate your comments too! $\endgroup$
    – RLang
    Aug 27, 2013 at 18:13
  • $\begingroup$ I don't know if any of the models in cran.r-project.org/package=MCMCpack would be useful. It's a nice package. I'm not an expert, but both of your residual plots do appear to indicate issues with your fit. $\endgroup$
    – Wayne
    Aug 28, 2013 at 21:45

1 Answer 1


From the residuals vs fitted values plot it seems that your data are bounded (this also seems to be stated in the question comments. Thus a gamma GLMM would be a good choice and there are lots of packages that can fit such models apart from MCMCglmm


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.