I am trying to decompose the log wage gap between the non-disabled (DISTYPE = 1) and work-limited disabled (DISTYPE =2) into 'explained and unexplained' components for males by a Blinder-Oaxaca decomposition that accounts for those unemployed (GRSSWK = 0) via a Heckman selection method. I have looked at online resources, including Ben Jann, but each alteration made has nevertheless not allowed me to run this.

I created dummy variables for each value of each categorical variable and then tried applying this (simplified) command:

Code:
 oaxaca logGRSSWK1 i.WHITE i.dAGES11 i.dAGES12 i.dAGES13 i.dRES1 i.dRES2 i.dRES3 i.dREGWKR1 i.dREGWKR2 i.dIND1 i.dIND1 if MALE == 1 & inlist(DISTYPE,1,2) model2(heckman, twostep select(lfp = i.WHITE i.dAGES11 i.dAGES12 i.dAGES13 i.dRES1 i.dRES2 i.dRES3 i.MARRIAGE1 i.MARRIAGE2)) pooled
(to note: some dummy variables included in the wage equation = 0 for a categorical variable and the lfp equation excludes any industry variables). The command states that 'option by() required', however I am unconvinced, even if this problem is addressed, Stata will run this.

So I was wondering if any clarity could be provided whether I am anywhere near the correct code for this? Many thanks.