9 Dummy variables
The regressors so far have been quantitative: amounts of fertiliser, temperatures, distances. Many variables that affect a response are qualitative: the variety of a crop, the type of school, the province, whether a household is rural or urban. They have no natural numerical scale, but they can still enter a regression through indicator variables, also called dummy variables, which take the values \(0\) and \(1\) to record which category an observation belongs to. With them, one regression model can compare groups, test whether a relationship is the same in each, and fit relationships whose shape changes at a known point.
9.1 A qualitative regressor with two levels
9.2 Fitting and testing
9.3 Factors with more than two levels
9.4 Piecewise linear regression
9.5 Practice problems
9.2 Fitting and testing
9.3 Factors with more than two levels
9.4 Piecewise linear regression
9.5 Practice problems
Questions on this section
Stuck on something here? Ask below and it stays attached to this topic.