Announcement

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

  • Blinder-Oaxaca decomposition for probit model

    Hello,

    I have assessed online materials available for the decomposition of both linear and non-linear models but am not quite understanding the correct code to use in the current context.

    I have obtained results for the average predicted probabilities (of being employed (emp = 1 if employed, 0= otherwise)) of non-disabled (DISTYPE = 4) and work-limited disabled (DISTYPE =1) via:

    Code:
     probit emp DISTYPE SEX ETH AGES1 URESMC1 HDPCH191 IND1 MARSTA1 HIQUAL81 REGWKR1 SKSBN911 FTPTWK1, nolog 
    
    margins, at(DISTYPE=(1 4)) vsquish

    I believe the following format is adequate:
    Code:
     fairlie depvar indepvars [if] [in] [weight], by(groupvar) [ options ]
    But I am struggling how to integrate these results (the average predicted probabilities for both groups) to decompose the differences in observed characteristics and the 'unexplained' gap, for male and female?

    Any help would be greatly appreciated.

  • #2
    Originally posted by Will Murphy View Post
    Hello,

    I have assessed online materials available for the decomposition of both linear and non-linear models but am not quite understanding the correct code to use in the current context.

    I have obtained results for the average predicted probabilities (of being employed (emp = 1 if employed, 0= otherwise)) of non-disabled (DISTYPE = 4) and work-limited disabled (DISTYPE =1) via:

    Code:
     probit emp DISTYPE SEX ETH AGES1 URESMC1 HDPCH191 IND1 MARSTA1 HIQUAL81 REGWKR1 SKSBN911 FTPTWK1, nolog
    
    margins, at(DISTYPE=(1 4)) vsquish

    I believe the following format is adequate:
    Code:
     fairlie depvar indepvars [if] [in] [weight], by(groupvar) [ options ]
    But I am struggling how to integrate these results (the average predicted probabilities for both groups) to decompose the differences in observed characteristics and the 'unexplained' gap, for male and female?

    Any help would be greatly appreciated.
    Hi Murphy,

    Have you tries users-written command Oaxaca by Ben Jann or mvdcmp by Powers and colleagues? The Oaxaca can do both linear and non-linear models, while the mvdcmp gives you another option to deal with non-linear models.

    Best regards,

    Dung Le

    Comment


    • #3
      Originally posted by Dung Le View Post

      Hi Murphy,

      Have you tries users-written command Oaxaca by Ben Jann or mvdcmp by Powers and colleagues? The Oaxaca can do both linear and non-linear models, while the mvdcmp gives you another option to deal with non-linear models.

      Best regards,

      Dung Le
      Thank you for the reply- I am trying to replicate a literature that uses Oaxaca for probit so I think the former is definitely the approach, however the code suggested by online resources such as Ben Jann I can't really understand

      Comment


      • #4
        I assumed using command 'fairlie' was the non-linear (e.g probit) Oaxaca decomposition method

        Comment


        • #5
          To clarify the problem at hand following some alterations: I have obtained the difference in average predicted probabilities in female (FEMALE = 0 if male, =1 if female) employment between the Non-Disabled (ND = 1 if non-disabled, 0 = if otherwise) and Work-limited Disabled (WLD =1 if so, =0 if not) via:

          (N.B: FEMALE = 1 if female, 0 if male
          : ND = 1 if non-disabled, 0 if otherwise
          :WLD = 1 if work-limited disabled, 0 if otherwise )

          Code:
           by FEMALE, sort: probit emp WLD ND ETH AGES1 URESMC1 HDPCH191 IND1 MARSTA1 HIQUAL81 REGWKR1 SKSBN911 FTPTWK1, nolog
           
          margins, at (WLD = 1) at (ND = 1) post
          
          lincom _b[2._at] - _b[1._at]
          I was wondering how I can decompose this difference into explained (due to characteristics) and unexplained (due to parameters)?

          Thank you.

          Comment


          • #6
            That is exactly what Oaxaca does:
            Code:
            use http://fmwww.bc.edu/RePEc/bocode/o/oaxaca.dta
             oaxaca married educ exper age , probit by(female)
            HTH
            Fernando

            Comment


            • #7
              Originally posted by FernandoRios View Post
              That is exactly what Oaxaca does:
              Code:
              use http://fmwww.bc.edu/RePEc/bocode/o/oaxaca.dta
              oaxaca married educ exper age , probit by(female)
              HTH
              Fernando
              Thank you very much. Could I just clarify, if I was to do:

              Code:
               oaxaca emp WLD ND ETH AGES1 URESMC1 HDPCH191 IND1 MARSTA1 HIQUAL81 REGWKR1 SKSBN911 FTPTWK1, probit by(FEMALE)
              Would this take into account the difference in average predicted probability generated in #5?

              Comment


              • #8
                One way to see that oaxaca is doing what you want is to also run this code:
                Code:
                . qui:probit married educ exper age if female==0
                . margins
                . qui:probit married educ exper age if female==1
                . margins

                Comment


                • #9
                  Originally posted by FernandoRios View Post
                  One way to see that oaxaca is doing what you want is to also run this code:
                  Code:
                  . qui:probit married educ exper age if female==0
                  . margins
                  . qui:probit married educ exper age if female==1
                  . margins
                  Thank you very much for the reply Fernando- it worked perfectly.

                  However, I realised- to reconcile results from #5 (i.e to compare WLD and ND) I have to do separate for male and female such that :
                  Code:
                   keep if FEMALE == 1
                    oaxaca emp ETH AGES1 URESMC1 HDPCH191 IND1 MARSTA1 HIQUAL81 REGWKR1 SKSBN911 FTPTWK1, probit by(WLD)
                    qui: probit emp ETH AGES1 URESMC1 HDPCH191 IND1 MARSTA1 HIQUAL81 REGWKR1 SKSBN911 FTPTWK1 if WLD == 0
                    margins
                    qui: probit emp ETH AGES1 URESMC1 HDPCH191 IND1 MARSTA1 HIQUAL81 REGWKR1 SKSBN911 FTPTWK1 if WLD == 1
                   margins
                  This may be a stupid question (and apologies if so, as I may have misunderstood #7) but I'd have to do this for WLD and ND for both male and female. Is there any way I can do the decomposition (and directly compare) for WLD = 1 and ND = 1 when still using only females?

                  I tried to do
                  Code:
                   oaxaca emp ETH AGES1 URESMC1 HDPCH191 IND1 MARSTA1 HIQUAL81 REGWKR1 SKSBN911 FTPTWK1, probit by(WLD=1|ND=1)
                  but it didn't work?

                  Many thanks.
                  Last edited by Will Murphy; 01 Apr 2020, 07:21.

                  Comment


                  • #10
                    Well, the option "by" only allows a single variable. ( in fact, for future reference, if you look in to oaxaca help file, you will see what other options you have, and what type of information it allows).
                    That being said.
                    Oaxaca does a decomposition between two groups, but defined by a single variable.
                    So, you need to create a variable , say wld_nd, that has the value of 1 if wld==1 and value of , say, 2 it nd==1
                    then you would type something like
                    Code:
                    oaxaca emp ETH AGES1 URESMC1 HDPCH191 IND1 MARSTA1 HIQUAL81 REGWKR1 SKSBN911 FTPTWK1 if female==1, probit by(WLD_ND)

                    Comment


                    • #11
                      Originally posted by FernandoRios View Post
                      Well, the option "by" only allows a single variable. ( in fact, for future reference, if you look in to oaxaca help file, you will see what other options you have, and what type of information it allows).
                      That being said.
                      Oaxaca does a decomposition between two groups, but defined by a single variable.
                      So, you need to create a variable , say wld_nd, that has the value of 1 if wld==1 and value of , say, 2 it nd==1
                      then you would type something like
                      Code:
                      oaxaca emp ETH AGES1 URESMC1 HDPCH191 IND1 MARSTA1 HIQUAL81 REGWKR1 SKSBN911 FTPTWK1 if female==1, probit by(WLD_ND)
                      Thank you so much. Can I just clarify that, as WLD and ND were products of DISTYPE:
                      Code:
                        gen WLD = 0
                      replace WLD = 1 if DISTYPE == 1
                      gen ND = 0
                      replace ND = 1 if DISTYPE == 4
                      and because DISTYPE can take 1 if work-limited disabled, 2 if daily activity-limiting disabled and 4 if non-disabled, then to create wld_nd I would definitely have to
                      Code:
                       drop if DISTYPE == 2
                      ? Thank you.

                      Comment


                      • #12
                        Code:
                         
                         oaxaca emp ETH AGES1 URESMC1 HDPCH191 IND1 MARSTA1 HIQUAL81 REGWKR1 SKSBN911 FTPTWK1 if female==1 & inlist(DISTYPE,1,4), probit by(DISTYPE)

                        Comment


                        • #13
                          Thank you very much for the help Fernando it has been greatly appreciated, all the best.
                          Last edited by Will Murphy; 01 Apr 2020, 08:14.

                          Comment


                          • #14
                            Originally posted by FernandoRios View Post
                            Code:
                            oaxaca emp ETH AGES1 URESMC1 HDPCH191 IND1 MARSTA1 HIQUAL81 REGWKR1 SKSBN911 FTPTWK1 if female==1 & inlist(DISTYPE,1,4), probit by(DISTYPE)
                            Sorry Fernando, could I just check that interpreting the following:
                            HTML Code:
                             oaxaca emp ETH AGES1 URESMC1 HDPCH191 IND1 MARSTA1 HIQUAL81 REGWKR1 SKSBN911 FTPTWK1 if FEMALE==1 & inlist(DISTYPE,1,2), probit by(DISTYPE)
                            
                            Blinder-Oaxaca decomposition                    Number of obs     =      2,278
                                                                              Model           =     probit
                            Group 1: DISTYPE = 1                              N of obs 1      =       1879
                            Group 2: DISTYPE = 2                              N of obs 2      =        399
                            
                            ------------------------------------------------------------------------------
                                     emp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                            -------------+----------------------------------------------------------------
                            overall      |
                                 group_1 |   .5069096   .0086662    58.49   0.000     .4899243     .523895
                                 group_2 |   .3294188   .0190523    17.29   0.000      .292077    .3667606
                              difference |   .1774909   .0209306     8.48   0.000     .1364675    .2185142
                              endowments |   .1351331   .0184088     7.34   0.000     .0990526    .1712137
                            coefficients |   .0372206   .0156348     2.38   0.017      .006577    .0678642
                             interaction |   .0051371   .0115974     0.44   0.658    -.0175934    .0278676
                            -------------+----------------------------------------------------------------
                            means that the explained (via differences in observed characteristics) = endowment = .1351331 and the unexplained (via parameter difference) = coefficients + interaction would be correct ? Apologies once again and thank you.

                            Comment


                            • #15
                              Please disregard my last message, as I believe using 'pooled' on the end of each oaxaca input solves this. Many thanks.

                              Comment

                              Working...
                              X