Take the 2-minute tour ×
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

I was just wondering if there were any consequences to applying dummy variables to independent variables which don't need it.

For example, let's say I ran an OLS with income as my y variable and age and education as my x variables. Let's imagine I then used a dummy variable for every working age (instead of age). So I would have: AGE_16, AGE_17, AGE_18...,AGE_64.

What would this do to my estimates?

share|improve this question

2 Answers 2

What exactly it would do to your estimates depends on the particular data that you have. But it would:

1) Create p-1 estimates (where p is the number of different ages) where you had 1 estimate

2) Each of those estimates would (almost surely) have high variance

3) You would lose, for better or worse, the assumption that the effect of age is constant

4) Since this is an extreme example of binning, see binning problems for some more problems.

share|improve this answer
    
Oh wow thanks a lot ! This is exactly the sort of answer I was looking for. –  l_davies93 Aug 10 at 12:11

In econometrics this is usually referred to as a saturated model. If you regress income $y$ on dummies for every value of $\text{age}$ you will still estimate the conditional expectation function (if it is linear) as if you would for the case when you include age as a continuous explanatory variable. From the definition of a conditional expectation for a discrete variable you will have $$ \begin{align} E(y|\text{age}) &= \sum^J_{i=1}I(\text{age} = \text{age}_i)E(y|\text{age} = \text{age}_i) \newline &= E(y|\text{age} = \text{age}_1) + \sum^J_{i=2}I(\text{age} = \text{age}_i)E(y|\text{age} = \text{age}_i) - E(y|\text{age} = \text{age}_1) \newline &= X'\beta \end{align} $$ where $I$ is the indicator function, $\text{age}$ is the continuous age variable and $\text{age}_i$ are the realized values of this random variable, and $X'=(1, I(\text{age} = \text{age}_2),...,I(\text{age} = \text{age}_J))$ includes your $J$ age dummies and a constant. The coefficient vector then is $$ \begin{align} \beta = (&E(y|\text{age}=\text{age}_1), E(y|\text{age}=\text{age}_2)-E(y|\text{age}=\text{age}_1),..., \newline &E(y|\text{age}=\text{age}_J)-E(y|\text{age}=\text{age}_1)) \end{align} $$ All in all, $\text{age}$ as a continuous regressor includes the same information as the collection of saturated dummy variables. So if the CEF is linear your regression will estimate the same thing regardless of which version you use. If the CEF is not linear (and generally it isn't), then the saturated model will account for this as it gives a new intercept for every value of age and therefore accounts for the potential non-linearities. Hence if the effect of age on earnings is not constant then the saturated model will capture this better.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.