13 Generalized linear models
This chapter covers
- Formulating a generalized linear model
- Predicting categorical outcomes
- Modeling count data
In chapters 8 (regression) and 9 (ANOVA), we explored linear models that can be used to predict a normally distributed response variable from a set of continuous and/or categorical predictor variables. But in many situations, it’s unreasonable to assume that the dependent variable is normally distributed (or even continuous). For example:
-
The outcome variable may be categorical. Binary variables (for example, yes/no, passed/failed, lived/died) and polytomous variables (for example, poor/good/excellent, Republican/Democrat/independent) clearly aren’t normally distributed.
-
The outcome variable may be ...
Get R in Action, Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.