I am currently working with a set of samples of stable isotopic concentrations obtained from a group of individuals. I am trying to process this data through a glmm() from the package lme4 to highlight any correlation with environnemental values. My first idea was to carry a lmer() from the same package lme4.

M1d13C<-lmer(d13C~evt_var1+(1|individual_ID)+(1|year),REML=T,data=Table1, na.action = "na.fail")

d13C is my response variable evt_var1 is my environnemental variable

Unfortunately it isn't working as i expected: my d13C variable isn't normally distributed.(you can see my qqplot() below)

my qqplot

I tried to transform it with a logarithmic and square root transformation but the corrected distribution wasn't normal either. I would like to perform an equivalent model analysis to be able to work with a non normalized distribution.

I know that using the glmer() function could solve my problem but i don't know what i can assign the family parameter to (binomial; gaussian; poisson or gamma). My variable d13C is a negative variable (it isn't a binary so binomial is a no go...)


Do you know which one of this family parameter do i need to use and do I need to transform d13C to change them into positive values ?


Thank you for your help, and don't hesitate to tell me if you think i did something wrong


You don't need to have a normal distribution for your response variable.

Say your evt_var1 was a categorical variable with 2 levels with a large effect on the response. In that case you might expect the response variable to have a bimodal distribution corresponding to the 2 levels of evt_var1. Then the response variable certainly wouldn't be distributed normally.

Some types of statistical tests are based on the assumption that the residuals around model predictions are normally distributed. But even if they aren't, there are ways to test statistical hypotheses with methods based on resampling of cases.

What you need to concentrate on, if warranted, is transformations of response and predictor variables that provide a linear relation between the response variable and predictors. It would be good if the magnitudes of residuals also didn't depend on the levels of the predicted responses, and even better if the residuals were normally distributed. But worrying about a normal distribution of the response variable itself is generally fruitless.

It's quite possible that a mixed model analyzed with lmer will then work quite well; it has no problems with negative values. There may be no need to go to generalized linear models (glmer).

  • $\begingroup$ Thank you for your quick reply. If I understand correctly, I would have to make transformations of my explicative variable: evt_var1. Can I make a log transformation then a Z-transformation? You say that there are tests based on residues, what do you suggest to do ? I will do some testing thanks to your advice and I’ll show you my output with qqnorm (resids (Md13C)) and qqline (resids (Md13C)) We will see if we can normalize with those transformations. If all goes well, the best model should have the best residue distribution, right? $\endgroup$ – Mariannebt31 Aug 7 '18 at 7:18
  • $\begingroup$ @Mariannebt31 you might not need to do any transformations at all. Try and see. For log and other transformations, see this page. The "best" model depends on how you want to use it; use for inference versus prediction may have different "best" models. For tests based on resampling (if needed), see this page and this page. If this is for publication, try to get local expert statistical advice very soon. $\endgroup$ – EdM Aug 7 '18 at 13:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.