15.4 Regression on non-Normal data with glm()

Argument Description
formula, data, subset The same arguments as in lm()
family One of the following strings, indicating the link function for the general linear model
Family name Description
"binomial" Binary logistic regression, useful when the response is either 0 or 1.
"gaussian" Standard linear regression. Using this family will give you the same result as lm()
"Gamma" Gamma regression, useful for highly positively skewed data
"inverse.gaussian" Inverse-Gaussian regression, useful when the dv is strictly positive and skewed to the right.
"poisson" Poisson regression, useful for count data. For example, ``How many parrots has a pirate owned over his/her lifetime?“

We can use standard regression with lm()when your dependent variable is Normally distributed (more or less). When your dependent variable does not follow a nice bell-shaped Normal distribution, you need to use the Generalized Linear Model (GLM). the GLM is a more general class of linear models that change the distribution of your dependent variable. In other words, it allows you to use the linear model even when your dependent variable isn’t a normal bell-shape. Here are 4 of the most common distributions you can can model with glm():