Announcement

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

  • Margins not estimable after estimation with automatically omitted collinear variables

    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.
    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
    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


    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

  • #2
    Welcome to Statalist, Irene, and thank you for your presentation of your problem. You've apparently taken the time to read and learn from the Statalist FAQ, and that is appreciated - and, sorry to say, rare in first-time posters.

    In the documentation of the margins command in the Stata Base Reference Manual Release 13 you will see on page 1185 "Estimability of Margins" which discusses the problem with estimating margins when some combinations of the variables lack data.

    With that said, the following will ignore the estimability issues and provide margins, leaving it to you to determine if they make sense within the limitations discussed by the cited passage.
    Code:
    *Case 1 revised
    regress y sex##group i.dummies
    margins group, noestimcheck

    Comment


    • #3
      Dear William,

      thanks a lot for your valuable reply!

      Best,

      Irene

      Comment

      Working...
      X