My dataset contains two numerical variables (n1
, n2
) and six indicator variables. The first three indicator variables specify the location of a property (i1
=north, i2
=center, i3
=south), the next three indicator variables specify the color of walls (j1
=blue, j2
=red, j3
=other). Let's say I want to predict the property price (y
). I want to run an ordinary least squares regression. I have two questions:
- Should I include all indicator variables or should I exclude one per group? And why?
y = b1 * n1 + b2 * n2 + b3 * i1 + b4 * i2 + b5 * i3 + b6 * j1 + b7 * j2 + b8 * j3
vs
y = b1 * n1 + b2 * n2 + b3 * i1 + b4 * i2 + b6 * j1 + b7 * j2
- Should I include an intercept? And how does it affect the interpretation of the indicator variables?
y = b0 + b1 * n1 + b2 * n2 + b3 * i1 + b4 * i2 + b5 * i3 + b6 * j1 + b7 * j2 + b8 * j3
and
y = b0 + b1 * n1 + b2 * n2 + b3 * i1 + b4 * i2 + b6 * j1 + b7 * j2