Dummy Variables in R
In this section we explain how dummy variables can be used in Regressions
Dummy Variables
As we discussed in the Data Section categorical variables are labelled as factor variables in R. As econometricians we often think of these as dummy variables. In the data analysis section we already learned how to get frequency counts of categorical variables using the table( )
or summary( )
command.
Using Categorical/Factor variables in regressions
When using such categorical variables in regressions as explanatory variables we will use them in the form of dummy variables. Our practice dataset doesn't have any real factor variables (remember, wages and log(wages) were initially treated as factor variables due to the missing values.