Multiple linear regression with categorical predictor
After dealing with several examples of linear regression, we can certainly claim to have understood the mechanisms underlying this statistical technique. So far, we've used only continuous variables, such as predictors. What happens when the predictors are categorical variables? Don't worry, because the underlying principles of regression techniques remain the same.
Categorical variables
Categorical variables are variables that are not numerical. They do not derive from measurement operations (and do not have units of measurement), but from classification and comparison operations; for instance, they describe data that fits into specific categories. Categorical variables can be further grouped as nominal, dichotomous, or ordinal:
- Nominal variables are variables that have two or more categories but do not have an intrinsic order. For example, the blood group variable, limited to the ABO system, can assume the values A, B, AB, and O. If we...