Announcement

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

  • Graphing options for decomposition results

    Hi statalist,

    I am using the nldecompose command to examine intra cohort change and cohort replacement. I haven't been able to find any post estimation commands that would allow me to graph the "Char" (cohort replacement) and "Coef" (intracohort change). I have run the following commands where I get two separate outputs, one where I control for an individual's education and one where I don't:
    Code:
    nldecompose, by(Period): logit ideology1 YOB dmarital1  dchild2 dchild3 dchild4
    Code:
    nldecompose, by(Period): logit ideology1 YOB dmarital1  dchild2 dchild3 dchild4 deduc2 deduc3 deduc4
    Can anyone suggest if there is a way to graph these results?

    I have tried following the advice in this post: https://www.statalist.org/forums/for...%80%9D-package

    However, using the "coefplot" stata command returns the error:
    "no coefficients found"

  • #2
    Sherine,

    I'm not that familiar with the nldecompose command (by Sinning et al, available on SSC). I installed the package and the stock dataset, and skimmed the author's paper in Stata Journal (appears to be free). The package doesn't return the e(b) or e(V) matrices, which coefplot requires for automatic plotting of results after a regression command. Also, nldecompose doesn't appear to estimate the specific effects of each independent variable.

    The package does return a series of scalars. coefplot will allow you to plot a matrix, and it would be possible to manually construct a matrix of results from the returned scalars if you know what they mean. Unfortunately, I do not know what they mean, and the process of manually generating a matrix isn't that simple.

    I should point out that the oaxaca command (by Ben Jann, available on SSC) does allow a logit decomposition, so this may be a better option for you. For example, using the stock dataset nldecompose, available after you install the nldecompose package:

    Code:
    use nldecompose
    nldecompose, by(group) threefold: logit y_logit x?
    
    
                                                       Number of obs (A) =     773
                                                       Number of obs (B) =     971
    
    ------------------------------------------------------------------------------
          Results |      Coef.  Percentage
    --------------+---------------------------------------------------------------
     Omega = 1    |
             Char |   .0482973   20.64731%
             Coef |   .2469787   105.5846%
              Int |  -.0613604  -26.23187%
    --------------+---------------------------------------------------------------
     Omega = 0    |
             Char |  -.0130632  -5.584561%
             Coef |   .1856182   79.35269%
              Int |   .0613604   26.23187%
    --------------+---------------------------------------------------------------
              Raw |   .2339155        100%
    ------------------------------------------------------------------------------
    
    
    
    oaxaca y_logit x?, by(group) logit
    Blinder-Oaxaca decomposition                    Number of obs     =      1,744
                                                      Model           =      logit
    Group 1: group = 0                                N of obs 1      =        971
    Group 2: group = 1                                N of obs 2      =        773
    
    ------------------------------------------------------------------------------
         y_logit |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    overall      |
         group_1 |   .3728115    .015554    23.97   0.000     .3423264    .4032967
         group_2 |    .606727   .0175184    34.63   0.000     .5723916    .6410625
      difference |  -.2339155   .0234269    -9.98   0.000    -.2798314   -.1879996
      endowments |   .0130632   .0087727     1.49   0.136     -.004131    .0302573
    coefficients |  -.1856182   .0198973    -9.33   0.000    -.2246162   -.1466203
     interaction |  -.0613604   .0095967    -6.39   0.000    -.0801695   -.0425513
    -------------+----------------------------------------------------------------
    endowments   |
              x1 |   .0293506   .1462056     0.20   0.841    -.2572072    .3159083
              x2 |  -.0333759   .2213568    -0.15   0.880    -.4672273    .4004755
              x3 |   .0170885   .0877887     0.19   0.846    -.1549742    .1891512
    -------------+----------------------------------------------------------------
    coefficients |
              x1 |   .0034164   .0037492     0.91   0.362    -.0039319    .0107647
              x2 |  -.0010985   .0018081    -0.61   0.543    -.0046424    .0024453
              x3 |   .0060882   .0089941     0.68   0.498    -.0115399    .0237164
           _cons |  -.1940244   .0193573   -10.02   0.000    -.2319641   -.1560847
    -------------+----------------------------------------------------------------
    interaction  |
              x1 |  -.0233574   .0323167    -0.72   0.470     -.086697    .0399823
              x2 |   .0094793   .0198255     0.48   0.633    -.0293779    .0483366
              x3 |  -.0474824   .0334381    -1.42   0.156    -.1130198    .0180551
    ------------------------------------------------------------------------------
    For these versions of the decomposition, the results appear equivalent. Clearly, the raw disparity is equal (albeit the reference group may be different between the commands), and the oaxaca command produces results equal to omega = 0 (whatever that means) in the nldecompose command.

    However, for pooled decompositions (where, I believe, we assume the effects of all the independent variables are equal across each group), oaxaca with the pooled option doesn't apear to produce equivalent results to nldecompose with its default option, where omega isn't specified. There may be other nldecompose options that produce equivalent results, but I don't understand the options, so until I need a non-linear Oaxaca decomposition in my work and I read and comprehend them, I'm going to have to defer to anybody more experienced in this issue.
    Last edited by Weiwen Ng; 08 Apr 2019, 14:06.
    Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

    When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

    Comment

    Working...
    X