Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Control variable is collinear with fixed effects

    Hi,

    I am planning to run the following fixed effect regression to look at the impact of job loss for financial satisfaction. I am trying to control for paid sick leave which is the variable of q123s1. When I run my regression, it is omitted because of collinearity. How can I add my variable without omitted?


    reghdfe std_satisf black hisplatino nativeamer asian jobloss black_shock hisp_shock native_shock asian_shock age gender hhincome working q123s1 i.q105 i.maritalstatus, absorb(id statereside year) cluster(statereside)

  • #2
    It depends on what it's colinear with. If it's colinear with one of the other variables from black through i.maritalstatus, you can remove the other variable(s) that it's colinear with. Given the names of the other variables, that sounds unlikely, although it isn't apparent what i.q05 is.

    Or the colinearity might result because you have too many variables for the number of observations in your data set--in that case you would have to get more data or remove some variables. If you had shown your full output, that would be obvious by looking at the N and the number of variables.

    But the most likely thing is that it's colinear with the absorbed effects. For example, it would make sense for a paid sick leave variable to be constant within any combination of id and year. If that's the case, there is no way to force the paid sick leave variable into the model unless you abandon fixed effects for some other model, or remove id or year from the list of fixed effects. You can test this theory easily enough:

    Code:
    gen byte in_sample = e(sample)
    by id year in_sample, sort: assert q123s1[1] == q[123s1[_N] if in_sample
    If that code runs without the -assert- command telling you that the assertion is false, then you have that kind of colinearity.

    It is a standard and well known property of fixed-effects models that you cannot estimate the effect of variables that are constant within levels of the fixed effects. This is linear algebra. But the good news is that it doesn't matter. You state that you wwant to use q123s1 as a "control variable." Which means you have no need to estimate its effects--you just want to make sure that the results avoid omitted variable bias from it. But if it is colinear with the fixed effects, then the results are automatically adjusted for all constant attributes of the fixed-effect panels (whether explicitly included as variables or not). So no need to worry about this.

    In the future, you can get more specific advice if you show example data, the code you ran, and the output that Stata gave you. Please read the Forum FAQ for excellent advice on how to pose questions that maximize your chance of getting a timely and helpful response.

    Comment

    Working...
    X