Announcement

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

  • Problem with Fairlie Decomposition Technique

    Hello,
    I have used "Fairlie decomposition technique" to decompose a binary model. However, the result provides difference/gap and total explained gap without their respective significance level. How can I obtain the significance level of overall and explained gap in "Fairlie decomposition technique". Is their any possibility to compute variances of these components?
    Last edited by Rimita Hom Chaudhury; 27 Apr 2019, 02:07.

  • #2
    Dear Rimita,

    I refer to this publication in The Stata Journal: 2011 11 4 556-576 DA Powers H Yoshioka M-S Yun mvdcmp Multivariate decomposition for nonlinear response models. There you will find background information about the mvdcmp package that you first have to install on your system:
    Code:
    * Information about mvdcmp
    net describe st0241, from(http://www.stata-journal.com/software/sj11-4)
    * Get mvdcmp
    net install st0241
    * To download supporting files, first change your working directory/folder and use: cd "C:\type_here_your_folder"
    * Next, download supporting files
     net get st0241
    To exercise fairlie decompostion with the fairlie command and compare the results with that of the mvdcmp command, run this code (assuming that your current working directory/folder holds the required dta file:
    Code:
    * load the dta file
    use pmbnlsy , clear
    * create required variables
    gen medu1 = 0
    replace medu1 = 1 if medu < 12
    gen medu2 = 0
    replace medu2 = 1 if medu == 12
    gen medu3 = 0
    replace medu3 = 1 if medu > 12
    * create weights using adjusted income
    * fake fw
    gen f = round(inc1000) + 1
    * fake pw
    gen p = f/6
    * Save & load your example dta file
    save pmbnlsy_edit, replace
    use pmbnlsy_edit, clear
    * Run fairlie decomposition with fake fw
    fairlie devnt nfamtran medu1 medu3 inc1000 magebir [fw=f], by(blk) reference(1) ro reps(400) nodots
    * Run fairlie decomposition with fake fw using mvdcmp
    mvdcmp blk: logit devnt nfamtran medu1 medu3 inc1000 magebir [fw=f]
    * Run fairlie decomposition with fake pw
    fairlie devnt nfamtran medu1 medu3 inc1000 magebir [pw=p], by(blk) reference(1) ro reps(400) nodots
    * Run fairlie decomposition with fake pw using mvdcmp
    mvdcmp blk: logit devnt nfamtran medu1 medu3 inc1000 magebir [pw=p]
    You will get "the significance level of [the] overall and explained gap" you are looking for with mvdcmp (i.e. E is fairlie's Total explained = -.09137955 and R is fairlie's Difference = -.42336729 (but with their sign inverted). Like (result from the model with fake fw):
    Code:
    Decomposition Results                                     Number of obs =      3644
    ------------------------------------------------------------------------------------------------------
    High outcome group: blk==1 ---  Low outcome group: blk==0
    -------------------------------------------------------------------------------------------------------
                             devnt |      Coef.  Std. Err.       z    P>|z|    [95% Conf. Interval]    Pct.
    -------------------------------+-----------------------------------------------------------------------
                                 E |     .09138    .010113    9.04    0.000     .071559       .1112  21.584
                                 C |     .33199    .015071   22.03    0.000      .30245      .36153  78.416
    -------------------------------+-----------------------------------------------------------------------
                                 R |     .42337    .011613   36.46    0.000      .40061      .44613
    Note that mvdcmp has more to offer for those interested in decomposition.
    http://publicationslist.org/eric.melse

    Comment


    • #3
      Dear Sir Ericmelse,
      Thank you sir for your valuable guidance. Now I am able to run mvdcmp with fairlie and also have obtained the significance level of both explained and total gap. It would be very kind, if you can suggest me how I can run mvdcmp with fairlie using pooled(variable) rather than the single one [reference (1)/reverse].

      When I was using the following command 1
      * Run fairlie decomposition
      fairlie devnt nfamtran medu1 medu3 inc1000 magebir, by(blk) reference(1) ro reps(1000) nodots
      * Run fairlie decompositionusing mvdcmp
      mvdcmp blk: logit devnt nfamtran medu1 medu3 inc1000 magebir


      I was able to obtain same explained and total gap for both fairlie and mvdcmp.

      But when I was using the following command 2,
      * Run fairlie decomposition
      fairlie devnt nfamtran medu1 medu3 inc1000 magebir, by(blk) pooled(blk) ro reps(1000) nodots
      * Run fairlie decompositionusing mvdcmp
      mvdcmp blk: logit devnt nfamtran medu1 medu3 inc1000 magebir


      The value of explained and total gap differed between fairlie and mvdcmp because option pooled () showing not allowed in mvdcmp.
      Kindly suggest me a solution.

      Comment


      • #4
        Dear Rimita,

        I do not think that it is possible with mvdcmp to pool the model in the same manner as fairlie does, as explained in it's help file: "specifies that the coefficients from the pooled model over all cases be used for the decomposition". Experimenting a bit myself, I observe that you will get the Total explained from mvdcmp when you drop the weighting:
        Code:
        mvdcmp blk: logit devnt nfamtran medu1 medu3 inc1000 magebir
        but mvdcmp uses seperate models for each group (blk), hence you will not get the 'explained gap' in the manner that fairlie computes.
        http://publicationslist.org/eric.melse

        Comment


        • #5
          Dear Sir
          Ericmelse
          ,
          Thank you sir. Then if I can find a significant explained gap using both variable seperately. Then can I conclude that the obtained explained gap using fairlie decomposition pooled model is also significant? or is there any way of using boostrap with fairlie?

          Comment


          • #6
            Dear Rimita,

            What I showed in #2 is that fairlie and mvdcmp provide the same result (using an example) noting that I start my interpretation of the analysis with mvdcmp and compare its result with that of fairlie. Meaning that the model decomposes the difference between two groups as such. Using mvdcmp provides you with both the confidence interval as well as the % attributed to the structural difference (E for endowment) and the difference in returns (R), or behavioral responses, i.e. the coefficients. That is what is offered by mvdcmp with various models and set ups, one of which is 'comparible' to what fairlie computes. I suppose that, using your own data, you can conclude that if the set up of #2 gives 'significant' results with mvdcmp that this applies to fairlie as well because that set up of mvdcmp does that (a fairlie decomposition). But, do not pin me on a wall for it as I am not claiming any authority here(!).
            http://publicationslist.org/eric.melse

            Comment


            • #7
              Dear, Sir Ericmelse,
              Thank you sir for your valuable guidance.

              Comment


              • #8
                Dear Eric and Rimita,
                Ýour discussions were helpful to me as well. So, mvdcmp gives the same results as fairlie. Can you help me to know whether fairlie decomposition is also possible for longitudinal data, and not just cross-sectional data? I am aware that fairlie has done his decomposition for longitudinal data, but is there an extensions in STATA that can execute the longitudinal data and get the time effect as well?

                Any help here will be highly appreciated.

                Comment

                Working...
                X