I want to drop collinear variables from my list of independent variables in the case of factor variables and interactions.
I am working with confidential data for which I can only access a small sample and can let my do-files run over a larger sample by the Statistical Office. Since I am using the margins command, which does not work with collinear variables, after my regressions, I cannot rely on Stata omitting the collinear variables. And as I am not running the do-files myself, I cannot check which variables are collinear and drop them manually.
I know that there is the option forcedrop for the _rmcoll command. However, this option is not allowed for factor variables and interactions, which I do have in my regression:
Code:
reg y i.post_reform##ib999.Event i.DFAge* i.DYear*, r
Ideally, I would like to use _rmcoll to identify collinear variables and omit these collinear variables from r(varlist) I obtain from the command. I would then run the regression only with non-collinear independent variables.
Code:
_rmcoll i.post_reform##ib999.Event i.DFAge* i.DYear*
Thank you very much!
Leonie
0 Response to Drop collinear variables with factor variables and interactions
Post a Comment