Dear all,
I am working with Stata 13.1 and have a problem using the margins command after estimating a model where collinear variables have been omitted automatically. For illustration I have reconstructed the problem with the artificial data for margins from the reference manual.
I use a set of dummies as controls. In case 1 I let Stata omit the variables that are collinear. Margins are reported as “not estimable”. In case 2 I estimate the exact same model, but this time I omitted the collinear variables myself. Estimated margins are reported.
There is probably a good reason why Stata handles the two cases differently. In the actual data that I am using I run a panel regression on log wages and include industry dummies, time dummies, and industry-specific time dummies to reduce omitted variable bias (similar to Baumgarten et al. (2013), table 4, specification (b)). It is not surprising and in my view not a problem that some dummies are omitted due to collinearity. Since I am working with different specifications, omitting collinear variables manually is rather tedious.
Is there a workaround to make Stata estimate margins despite automatically omitted collinear variables?
Cheers,
Irene
I am working with Stata 13.1 and have a problem using the margins command after estimating a model where collinear variables have been omitted automatically. For illustration I have reconstructed the problem with the artificial data for margins from the reference manual.
I use a set of dummies as controls. In case 1 I let Stata omit the variables that are collinear. Margins are reported as “not estimable”. In case 2 I estimate the exact same model, but this time I omitted the collinear variables myself. Estimated margins are reported.
Code:
use http://www.stata-press.com/data/r13/margex, clear set seed 1110 gen random=runiform() xtile dummies = random, nq(3) replace dummies = 4 if group==3 quietly tab dummies , gen(dummy_manual) *Case 1 regress y sex##group i.dummies margins group *Case 2 regress y sex##group dummy_manual2 dummy_manual3 margins group
Is there a workaround to make Stata estimate margins despite automatically omitted collinear variables?
Cheers,
Irene
Baumgarten, D., Geishecker, I., & Görg, H. (2013). Offshoring, tasks, and the skill-wage pattern. European Economic Review, 61, 132–152. doi:10.1016/j.euroecorev.2013.03.007
Comment