10.5. Using Dummy Variables and Interaction Terms in Regression Models
The multiple regression models discussed in Sections 10.1–10.4 assumed that each independent variable is numerical. However, in some situations, you might want to include categorical variables as independent variables in the regression model. The use of dummy variables allows you to include categorical independent variables as part of the regression model. If a given categorical independent variable has two categories, then you need only one dummy variable to represent the two categories. A particular dummy variable, say X3, is defined as:
X3 = 0 if the observation is in category 1
X3 = 1 if the observation is in category 2
To illustrate the application of dummy variables in ...