How GLMs are different from general linear models
- They use maximum likelihoods rather than least squares estimation
- Probability distributions for binomial and Poisson are defined by the natural parameter (a function of the mean) and the dispersion parameter (a function of the variance) rather than normal distributions where the dispersion parameter is estimated separately from the mean.
- The random component – the response variable and its probability distribution (e.g. logistic or Poisson)
- The systematic component – the predictors or X variables
- The link function – this links the random and systematic component. This links the expected value of Y to the predictors by the function:
The logit link is used for binary data and logistic regression. The logit link is:
The logistic model is:
You can transform π(x) so that it resembles the more familiar linear model.
See https://ww2.coastal.edu/kingw/statistics/R-tutorials/logistic.html for a good blog on doing a logistic regression in r.
Reference
Quinn, G.P. & Keough, M.J. (2002). Experimental Design and Data Analysis for Biologists. Cambridge University Press, Cambridge, UK.