Announcement

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

  • Calculating Wage Gaps for Labour Markets using Blinder-Oaxaca Decomposition

    Dear all,

    I am currently trying to calculate the wage gap for thousands of labour markets using a panel data set. My current plan is to use a for loop where I use an Oaxaca decomposition for each labour market, store the relevant value and then append it to the observations within the relevant labour market.

    While I have been able to calculate the wage gap for the relevant labour market and then store the value by doing:

    oaxaca loghwage educ age race if czocc == 1999 , by(sex)
    scalar A = e(b)[1,3]

    I am struggling to work out how to append it to the relevant observations within the specific labour market. Any suggestions would be greatly appreciated or please let me know if there is an easier way of doing the proposed task.

    Many thanks!

  • #2
    this should work, or something like it.

    g wagegap = .
    forv mkt = 1/Nmarkets {
    run regressions if market = `mkt'
    replace wagegap == e(b)[1,3] if market == `mkt'
    }

    Comment

    Working...
    X