EXCEL 97: Categorical Regressors (dummy or indicator variables)
A. Colin Cameron, Dept. of Economics, Univ. of Calif.
- Davis
This September 1999 help sheet gives information on how to
-
Linear regression with dummy or indicator variables
A dummy variable or indicator variable is a variable that takes value 1
if one event occurs and zer otherwise.
For example, 1 if male and 0 if female or 1 if more than high school
education and 0 otherwise.
THEORY
One can perform regression in the usual way when such variables appear
as regressors, including complications such as several indicator variables
and indicator variables that interact with other regressors.
The difficult parts are:
-
interpretation: see a textbook
-
avoid the dummy-variable trap: if a constant term appears in the regression
then one of the mutually exclusive indicator variables must be dropped,
so for example, do not have both an indicator variable for male (1 if male
and 0 if female) and an indicator variable for female (1 if female and
0 if male).
For further information on how to use Excel go to
http://www.econ.ucdavis.edu/faculty/cameron