Contrast coding for categorical predictors

A linear regression model is a mathematical object. Consequently, if we want to model the association between a categorical predictor and some outcome variable, we need to represent the levels of our categorical predictor as numbers.

The umbrella term for all the different ways that we could possibly represent categorical predictors as numbers is “contrast coding”.

In DAPR2 we will cover two common contrast coding schemes:

You should choose your contrast coding scheme based on the hypotheses you want to test. See each flash card for more details.