4

I would like to know how to choose the family in generalized linear models in R. Roughly, I have learned that family=binomial or family=poisson should be used if dependent variable (y) is binary or count data. How about others here?

Especially, in which situation of dependent variable(y), can I apply family=Gamma or family=inverse.gaussian?

B Sann
  • 41
  • 3

1 Answers1

3

A good guide is to look at the relationship between the mean and the variance. If the variance does not vary with the mean - Gaussian. If it varies proportional to the mean - Poisson. As mean squared - gamma. As mean cubed - inverse Gaussian.

mdewey
  • 17,806
  • I don't fully subscribe to your last sentence. The variance of a gamma distribution is not really proportional to the square of the mean, even if it looks so when you look at the formula: the variance is the square of the mean divided by the shape parameter which can vary as well in a GLM, so the two are free to vary independently of each other. – Arnaud Mortier May 04 '21 at 09:42
  • I've submitted a new question regarding this point, we'll see. – Arnaud Mortier May 04 '21 at 10:23