I am trying to model two variables showing a non-linear relationship, as shown in the scatterplot below, with a Generalized Additive Mixed Model in R (package 'gamm4). The data represents roughly 15 years of data about wildlife monitoring, across more than 150 areas.

Scatterplot of the two variables

The response variable does not follow a Gaussian distribution (skewness=4.31, kurtosis=27.15, see histogram below) and I would like to know which distribution may be suitable to model the error term of a GAMM.

Distribution of the response variable

Unfortunately, I have seen that most of the 'family' options are available for GAM only, and cannot be used for mixed-effect models. I have noticed that gamm4 allows for a Tweedie distribution of the error, which can be a suitable option for my data. Indeed, an automatic specification of the optimal parameter cannot be achieved for GAMM (e.g like in GAM: family=tw()) and I have do specify the shape parameters by myself.

I guess it will be a matter of trial and error. I would like to ask you two things:

  1. Do you think that the Tweedie distribution can be a valuable distribution for the error? What about other distributions?
  2. How can I decide the most suitable values (theta and power) for the Tweedie distribution?
  3. Is there any approach for unknown shape parameters, based performance iteration, for the package 'gamm4'?

I have mentioned the package 'gamm4', but even older packages (e.g 'gamm') are accepted.

Kind regards,


  • $\begingroup$ This is a common misconception. The distribution of your response variable is irrelevant for regression (even more so if you don't stratify the plot by the grouping variable "area"). What is important is the distribution of the residuals. The family provides an error distribution model. You don't provide sufficient information to assess if you need this let alone which distribution you should use. $\endgroup$ – Roland Dec 27 '16 at 7:02

Your Answer

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

Browse other questions tagged or ask your own question.