Announcement

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

  • estat vif after reghdfe

    Hi,

    In a regression I'm running using reghdfe with two way fixed effects and two way clustering, one of my variables is getting omitted by Stata due to collinearity.

    I tried using estat vif after reghdfe for collinearity but it does not work.

    Any help with how to fix this problem and detect collinearity?

    Thanks.

  • #2
    -estat vif- is not a good way to do this anyhow.

    First consider whether the variable being omitted is constant within one of your fixed effects. So, for example, if one of the fixed effects you are having -reghdfe- absorb is called country, any variable that has the same value for all observations of a given country will be colinear with the country fixed effects. Effects of such variables are not estimable in fixed effects models and must be omitted.

    If that is not the source of the problem, take your list of predictor variables and do an ordinary -regress- with an omitted one as the outcome and the rest of them as predictors. Be sure to condition it on the outcome variable you used in -reghdfe- not being missing. You will get a result that has R2 within rounding error of 1.0, and most of the coefficients will be within rounding error of 0. The variables with non-zero coefficients are the ones that are colinear with the omitted one. You will then have to determine whether this indicates an error in your data, or, if not, which of these variables you will omit from the model. (If you don't care which one gets omitted, just go with the results you already have.)

    Advice for better posting: in the future with questions like this it is better to show the actual code you used and the output you got from Stata. That provides more information and often leads to quicker or better answers. For example, with the -reghdfe- results it might have been easier to guess which variable(s) are causing your problem.
    Last edited by Clyde Schechter; 14 Mar 2019, 23:03.

    Comment


    • #3
      Thank you for suggestions. I tried running the regressions again. I found the problem of collinearity arises when I include time fixed effects as my variable for prices gets omitted. The explanation for this could be that since prices change over time, the time fixed effects are already capturing the impact of prices on my dependent variable.

      My question then is that is dropping the price variable from the model the correct solution to avoid the problem of collinearity?

      Thank you!

      Comment


      • #4
        Well, I don't know what kind of prices you are talking about. If this is some kind of global price variable that varies over time but applies across the board to all of the firms/countries/whatevers in your data, then yes this would mean that it is colinear with the time fixed effects. That implies that you cannot have both the price variable and the time fixed effects in your model. You must choose between them.

        Comment

        Working...
        X