Announcement

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

  • Oaxaca-Blinder Decomposition for ordinal dependent variables

    Dear Statalist,
    I am trying to find a way to run a detailed Oaxaca-Blinder decomposition for an ordinal dependent variable. I am aware of the user written mvdcmp package, but it does not allow for ologit. nldecompose on the other hand offers only aggregate effects of endowments and coefficients, not separately for each variable in the model.
    I have found one article, where the authors claim to have executed detailed decomposition on an ordinal variable in stata, but they do not provide the code (http://ftp.iza.org/dp6808.pdf). Could anyone give me any guidance with the code?
    Alternatively,
    as I am in fact most interested in the contribution of one specific (categorical) independent variable I thought that I may as well use nldecompose but for a model with only this variable. Still, I would like to control for a set of other important independent variables. Is there a way to somehow filter out the impact of those control variables on the dependent variable in the first step and apply nldecompose in the second step?
    Any suggestions are much appreciated!

  • #2
    Did you find answers to this question yet? That is also what I need!

    Comment


    • #3
      In case anybody else has the same question: one option is to simply code the ordinal variable values as 1,2,3,... and run the standard OLS Oaxaca-Blinder decomposition. It turns out that the results do not depend on the 1,2,3,... cardinalization: they fully respect the ordinal nature of the dependent variable and can be interpreted in terms of a survival function (or CDF) decomposition. The results are in this paper: https://ideas.repec.org/p/umc/wpaper/2404.html
      David M. Kaplan
      Associate Professor & co-DGS, Economics, University of Missouri
      https://kaplandm.github.io/

      Comment


      • #4
        David, the link is bad. I'd like to see that.

        Decomposition makes some fairly standard calculations that can be computed. I've detailed them here. It could be adjusted, I presume, for an ordered treatment approach.

        HTML Code:
        https://www.statalist.org/forums/forum/general-stata-discussion/general/1739797-twofold-oaxaca-blinder-decomposition-interpretation
        Last edited by George Ford; 12 Jul 2024, 14:50.

        Comment


        • #5
          Sorry, I was thinking ordered treatment.

          Other than nldecompose, not sure what else can be done.

          I suppose you could compare 0/1 , 0/2, 0/3, etc... Less efficient but doable.

          Comment


          • #6
            Originally posted by David Kaplan View Post
            In case anybody else has the same question: one option is to simply code the ordinal variable values as 1,2,3,... and run the standard OLS Oaxaca-Blinder decomposition. It turns out that the results do not depend on the 1,2,3,... cardinalization: they fully respect the ordinal nature of the dependent variable and can be interpreted in terms of a survival function (or CDF) decomposition. The results are in this paper: https://ideas.repec.org/p/umc/wpaper/2404.html
            Respected David Kaplan, I want to decompose an ordinal variable with three levels (1,2,3 [increasing order]) following your method proposed in the paper linked in the quote. I checked your replication material but I am a STATA user. Can you please help me to implement the proposed method(s) in STATA? I am sharing shortened real data, where;

            the outcome variable is
            Code:
            cl_ck_htod
            the predictors are
            Code:
              
             religon_d1 q_mpce_d1 q_mpce_d2 q_mpce_d3 q_mpce_d4 q_mpce_d5 age_hh
            group identifier is
            Code:
            residence_d1
            Code:
            * Example generated by -dataex-. To install: ssc install dataex
            clear
            input float cl_ck_htod byte(religon_d1 q_mpce_d1 q_mpce_d2 q_mpce_d3 q_mpce_d4 q_mpce_d5 residence_d1 residence_d2) float age_hh
            3 1 0 0 0 1 0 1 0 44
            3 1 0 0 0 0 1 1 0 40
            1 0 0 1 0 0 0 1 0 50
            3 1 0 0 0 0 1 1 0 67
            2 1 0 0 0 1 0 1 0 50
            1 0 0 1 0 0 0 1 0 60
            3 1 0 0 0 1 0 1 0 40
            3 0 0 0 1 0 0 1 0 38
            3 1 0 0 0 1 0 1 0 60
            3 1 0 0 0 0 1 1 0 55
            3 1 0 0 1 0 0 1 0 32
            3 1 0 0 0 0 1 1 0 36
            3 1 0 0 0 0 1 1 0 80
            3 1 0 0 0 0 1 1 0 56
            2 1 0 0 0 1 0 1 0 30
            2 0 0 1 0 0 0 1 0 35
            3 1 0 1 0 0 0 1 0 62
            2 1 0 0 1 0 0 1 0 55
            3 1 0 0 0 0 1 1 0 46
            3 0 0 0 0 0 1 1 0 60
            2 1 0 0 1 0 0 1 0 46
            3 1 0 0 0 1 0 1 0 32
            3 1 0 0 1 0 0 1 0 69
            3 1 0 0 0 1 0 1 0 28
            2 1 1 0 0 0 0 1 0 46
            3 1 0 0 0 1 0 1 0 62
            2 0 0 0 0 0 1 1 0 46
            3 1 0 0 0 0 1 1 0 37
            1 1 1 0 0 0 0 1 0 65
            3 1 0 0 0 0 1 1 0 46
            3 0 0 0 0 0 1 1 0 39
            3 0 0 0 0 0 1 1 0 26
            3 1 0 0 0 0 1 1 0 25
            2 1 0 1 0 0 0 1 0 37
            3 1 0 0 0 0 1 1 0 35
            3 0 0 0 0 0 1 1 0 38
            3 1 0 0 0 0 1 1 0 57
            3 1 0 0 0 0 1 1 0 40
            1 1 0 1 0 0 0 1 0 50
            3 1 0 0 0 1 0 1 0 40
            3 1 0 0 1 0 0 1 0 31
            3 0 0 0 0 0 1 1 0 56
            3 1 0 0 0 0 1 1 0 90
            3 0 0 0 0 0 1 1 0 61
            2 0 0 0 0 0 1 1 0 42
            2 1 0 0 0 1 0 1 0 43
            3 1 0 0 0 0 1 1 0 55
            2 1 0 0 0 1 0 1 0 35
            3 1 0 0 0 1 0 1 0 51
            2 1 0 0 1 0 0 1 0 31
            2 0 1 0 0 0 0 1 0 69
            2 0 0 0 0 1 0 1 0 53
            2 1 0 0 0 1 0 1 0 43
            2 1 0 1 0 0 0 1 0 47
            3 0 0 0 0 0 1 1 0 53
            2 1 0 0 0 1 0 1 0 46
            3 1 0 0 0 0 1 1 0 47
            3 1 0 0 0 0 1 1 0 34
            3 1 0 0 0 0 1 1 0 65
            2 0 0 0 0 0 1 1 0 67
            2 1 0 0 0 1 0 1 0 65
            3 1 0 0 1 0 0 1 0 65
            3 0 0 1 0 0 0 1 0 34
            3 1 0 0 0 1 0 1 0 46
            2 1 0 0 0 0 1 1 0 55
            3 1 0 0 0 1 0 1 0 55
            2 0 0 0 0 1 0 1 0 56
            3 1 0 0 0 1 0 1 0 62
            3 0 0 0 0 0 1 1 0 61
            3 1 0 0 0 1 0 1 0 36
            2 1 0 0 0 0 1 1 0 26
            3 1 0 0 0 0 1 1 0 49
            3 0 0 1 0 0 0 1 0 50
            3 0 0 0 0 0 1 1 0 57
            2 1 0 0 0 1 0 1 0 47
            2 1 0 0 0 0 1 1 0 66
            3 1 0 0 0 0 1 1 0 47
            2 1 0 0 0 1 0 1 0 58
            3 0 0 0 0 0 1 1 0 42
            2 1 0 0 1 0 0 1 0 36
            2 1 0 0 0 0 1 1 0 62
            2 1 0 0 1 0 0 1 0 26
            3 1 0 0 0 0 1 1 0 60
            2 1 0 0 1 0 0 1 0 40
            2 0 1 0 0 0 0 1 0 55
            2 1 0 0 1 0 0 1 0 40
            3 1 0 0 1 0 0 1 0 53
            3 1 0 0 0 0 1 1 0 69
            1 0 0 0 1 0 0 1 0 40
            3 1 0 0 0 1 0 1 0 43
            3 1 0 0 0 0 1 1 0 71
            3 1 0 0 0 0 1 1 0 50
            3 1 0 0 0 0 1 1 0 41
            1 0 0 0 0 1 0 1 0 16
            3 1 0 0 0 1 0 1 0 38
            2 0 0 1 0 0 0 1 0 69
            3 1 0 1 0 0 0 1 0 33
            2 1 0 0 1 0 0 1 0 72
            1 1 0 1 0 0 0 1 0 55
            2 1 0 1 0 0 0 1 0 46
            3 1 0 0 0 0 1 1 0 50
            3 1 0 0 0 0 1 1 0 49
            1 1 1 0 0 0 0 1 0 65
            2 1 0 0 0 1 0 1 0 40
            3 1 0 0 0 1 0 1 0 46
            3 1 0 0 0 0 1 1 0 28
            3 0 1 0 0 0 0 1 0 60
            3 1 0 0 0 0 1 1 0 35
            3 0 0 0 0 0 1 1 0 53
            2 1 0 0 0 0 1 1 0 40
            3 1 0 0 0 0 1 1 0 50
            2 0 0 0 1 0 0 1 0 64
            1 1 0 1 0 0 0 0 1 37
            1 0 0 0 0 0 1 0 1 25
            2 1 0 0 0 1 0 0 1 42
            1 1 0 1 0 0 0 0 1 75
            2 1 0 0 0 0 1 0 1 68
            1 0 0 0 1 0 0 0 1 36
            1 1 0 1 0 0 0 0 1 35
            2 1 0 0 1 0 0 0 1 52
            2 1 1 0 0 0 0 0 1 43
            2 1 0 0 0 1 0 0 1 74
            1 0 0 0 0 1 0 0 1 45
            1 1 1 0 0 0 0 0 1 40
            2 1 1 0 0 0 0 0 1 40
            2 0 1 0 0 0 0 0 1 50
            2 1 0 1 0 0 0 0 1 67
            1 0 0 1 0 0 0 0 1 70
            2 0 0 0 0 1 0 0 1 54
            2 1 0 0 1 0 0 0 1 33
            2 0 0 0 1 0 0 0 1 38
            1 1 0 0 0 1 0 0 1 72
            3 1 0 1 0 0 0 0 1 50
            2 1 0 1 0 0 0 0 1 65
            2 0 0 0 0 1 0 0 1 61
            2 1 0 1 0 0 0 0 1 45
            3 1 0 0 1 0 0 0 1 55
            1 1 0 1 0 0 0 0 1 34
            1 0 1 0 0 0 0 0 1 28
            1 0 0 0 0 1 0 0 1 43
            3 1 0 0 1 0 0 0 1 51
            2 1 0 0 1 0 0 0 1 73
            1 1 0 0 0 1 0 0 1 65
            3 1 0 0 0 0 1 0 1 54
            1 1 0 1 0 0 0 0 1 38
            1 1 0 0 0 0 1 0 1 27
            2 0 1 0 0 0 0 0 1 65
            2 1 1 0 0 0 0 0 1 48
            1 0 0 0 1 0 0 0 1 35
            3 0 0 0 0 0 1 0 1 39
            1 0 0 0 0 1 0 0 1 51
            2 1 0 0 1 0 0 0 1 43
            1 1 0 0 1 0 0 0 1 38
            2 0 0 0 0 0 1 0 1 36
            1 1 0 0 0 1 0 0 1 50
            3 1 0 0 0 1 0 0 1 37
            1 1 0 0 0 1 0 0 1 65
            2 1 0 0 0 1 0 0 1 59
            1 0 0 0 1 0 0 0 1 53
            1 1 1 0 0 0 0 0 1 50
            1 0 0 1 0 0 0 0 1 43
            1 1 1 0 0 0 0 0 1 42
            2 1 0 0 1 0 0 0 1 60
            1 0 0 1 0 0 0 0 1 41
            1 1 0 0 1 0 0 0 1 58
            1 1 0 1 0 0 0 0 1 38
            2 1 1 0 0 0 0 0 1 42
            1 1 1 0 0 0 0 0 1 25
            2 1 0 0 0 1 0 0 1 45
            2 1 0 0 0 1 0 0 1 28
            2 1 0 0 0 1 0 0 1 50
            1 1 0 0 0 1 0 0 1 75
            3 1 1 0 0 0 0 0 1 55
            2 0 0 1 0 0 0 0 1 40
            3 0 0 0 0 0 1 0 1 54
            1 1 0 1 0 0 0 0 1 54
            2 1 0 0 1 0 0 0 1 50
            1 1 0 0 1 0 0 0 1 25
            2 0 0 0 0 1 0 0 1 37
            2 0 0 0 0 0 1 0 1 53
            1 1 0 1 0 0 0 0 1 59
            2 1 0 0 1 0 0 0 1 65
            1 1 0 0 1 0 0 0 1 48
            2 1 0 0 1 0 0 0 1 40
            2 1 0 0 0 1 0 0 1 84
            1 1 0 0 1 0 0 0 1 36
            1 1 0 1 0 0 0 0 1 45
            1 1 1 0 0 0 0 0 1 37
            3 1 0 1 0 0 0 0 1 49
            1 0 0 1 0 0 0 0 1 73
            2 1 0 0 1 0 0 0 1 43
            2 1 0 1 0 0 0 0 1 72
            1 1 0 0 1 0 0 0 1 52
            2 0 0 0 0 1 0 0 1 50
            1 1 0 0 1 0 0 0 1 48
            2 1 0 0 0 1 0 0 1 30
            2 1 0 0 1 0 0 0 1 53
            2 1 0 1 0 0 0 0 1 62
            2 1 0 1 0 0 0 0 1 43
            2 1 0 1 0 0 0 0 1 55
            1 1 1 0 0 0 0 0 1 42
            1 1 0 1 0 0 0 0 1 33
            2 1 0 0 1 0 0 0 1 36
            1 1 0 1 0 0 0 0 1 37
            2 1 1 0 0 0 0 0 1 55
            2 1 0 0 1 0 0 0 1 37
            2 1 0 0 1 0 0 0 1 65
            1 0 0 0 0 1 0 0 1 51
            1 1 0 1 0 0 0 0 1 35
            3 1 0 0 0 0 1 0 1 27
            3 1 0 1 0 0 0 0 1 39
            3 1 0 0 0 1 0 0 1 56
            3 0 1 0 0 0 0 0 1 32
            1 1 0 0 1 0 0 0 1 56
            2 1 0 1 0 0 0 0 1 69
            2 1 0 0 1 0 0 0 1 45
            3 1 0 0 0 1 0 0 1 38
            1 0 0 1 0 0 0 0 1 72
            1 1 0 1 0 0 0 0 1 45
            1 1 0 0 1 0 0 0 1 45
            3 1 0 1 0 0 0 0 1 48
            3 1 0 0 1 0 0 0 1 53
            1 0 1 0 0 0 0 0 1 60
            2 1 0 0 1 0 0 0 1 40
            1 1 0 1 0 0 0 0 1 50
            2 0 0 0 0 0 1 0 1 45
            1 1 1 0 0 0 0 0 1 55
            2 0 0 0 1 0 0 0 1 56
            1 0 0 0 0 1 0 0 1 26
            1 1 0 1 0 0 0 0 1 43
            2 0 0 0 0 1 0 0 1 49
            1 1 0 0 1 0 0 0 1 55
            1 1 0 0 0 1 0 0 1 76
            2 1 0 1 0 0 0 0 1 40
            2 1 0 0 0 1 0 0 1 34
            1 1 0 0 1 0 0 0 1 61
            2 0 0 1 0 0 0 0 1 45
            1 1 0 0 1 0 0 0 1 23
            2 1 1 0 0 0 0 0 1 29
            2 1 1 0 0 0 0 0 1 53
            1 1 1 0 0 0 0 0 1 35
            2 1 0 0 0 0 1 0 1 27
            1 0 0 0 1 0 0 0 1 41
            3 1 0 1 0 0 0 0 1 42
            2 1 1 0 0 0 0 0 1 38
            1 1 1 0 0 0 0 0 1 60
            1 1 1 0 0 0 0 0 1 34
            1 1 1 0 0 0 0 0 1 32
            2 0 0 0 0 1 0 0 1 72
            2 0 0 0 0 1 0 0 1 68
            end
            label values cl_ck_htod cl_ck_htod
            label def cl_ck_htod 1 "noacs", modify
            label def cl_ck_htod 2 "atlist1", modify
            label def cl_ck_htod 3 "bothcln", modify
            label var cl_ck_htod "fuel access" 
            label var religon_d1 "religon==Hindu" 
            label var q_mpce_d1 "q_mpce==Poorest" 
            label var q_mpce_d2 "q_mpce==Poorer" 
            label var q_mpce_d3 "q_mpce==Middle" 
            label var q_mpce_d4 "q_mpce==Richer" 
            label var q_mpce_d5 "q_mpce==Richest" 
            label var residence_d1 "residence==Urban" 
            label var residence_d2 "residence==Rural" 
            label var age_hh "head age"
            Best regards,
            Mukesh

            Comment


            • #7
              George Ford Sorry the link didn't work (although it works for me?), and for the hugely delayed reply; the paper is also here https://kaplandm.github.io/#od
              Mukesh Punia Our theoretical results say that you can actually just run the standard OLS Kitagawa-Oaxaca-Blinder decomposition (with your 1,2,3-coded ordinal outcome), and the resulting decomposition (like the "% explained") still has a meaningful interpretation, even though ordinal variables/distributions do not have a mean, because the 1,2,3-coded "mean" difference is an average survival function difference (Theorem 1). So, just run the OLS-based decomposition like usual. (We do also have some example R code for a fancier decomposition with series logit distribution regression, but that is just for functional form refinement; if you feel ambitious later, you could try to code something like that in Stata, but you could also just add nonlinear terms in your OLS decomposition as an easier way to get a more flexible functional form, if you think that is important.) Hope that helps, and thanks for asking!
              Last edited by David Kaplan; 05 Sep 2024, 13:36. Reason: hit save by accident...
              David M. Kaplan
              Associate Professor & co-DGS, Economics, University of Missouri
              https://kaplandm.github.io/

              Comment


              • #8
                Thank you, David Kaplan, for your response!

                If you have some time, please elaborate a little more on "series logit distribution regression."
                Best regards,
                Mukesh

                Comment


                • #9
                  Mukesh Punia There are details in Section 4.1 of our paper (linked above), which in turn is based on the work of Chernozhukov, Fernández-Val, and Melly (2013) that we cite. In Stata, first you'd need to estimate the "gamma" coefficients in our (9) using your residence_d1=1 group (call that "group B" in the paper) separately for y=1 and y=2; that is, maybe gen z1=(y<=1) and gen z2=(y<=2), then generate whatever nonlinear transformations of predictors (I'll just write "X"), then logit z1 X to estimate gamma1 in (9) and logit z2 X to estimate gamma2 in (9). Second, plug those into our (10), again for both y=1 and y=2; instead of doing it manually, you can use predict in Stata, and then to take the average over all the "group A" observations use collapse or egen. Third, you'd then still need to compute a summary statistic (like the "mean") for that counterfactual distribution, along with group A and group B, and then compare the three. But again, for now I'd suggest just doing the OLS (which our results justify as a reasonable approximation), and if you want to do this approach later then read through Section 4.1 more. Good luck!
                  David M. Kaplan
                  Associate Professor & co-DGS, Economics, University of Missouri
                  https://kaplandm.github.io/

                  Comment

                  Working...
                  X