Announcement

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

  • Help with Oaxaca, svy and eform

    Dear all,

    I needed some help regarding the -oaxaca- command.

    Whenever used with the svy option, it appears that I cannot use the eform option to bring my results back to the original scale when the dependent variable is in logarithmic scale.

    Is this because of a technical issue in Stata or an econometric reasoning? If I transform my results manually using [(exp(Difference)-1)*100], will it be econometrically sound?

    I was using this article for help but they do not have the answers I am looking for:

    https://www.stata-journal.com/sjpdf....iclenum=st0151

  • #2
    Bump, can anyone please kindly give some advice? Thanks in advance.

    Comment


    • #3
      I can't replicate your problem in Stata 14.2. My advice is to show us your exact code and results, as requested in FAQ 12.
      Code:
      . use http://fmwww.bc.edu/RePEc/bocode/o/oaxaca.dta
      (Excerpt from the Swiss Labor Market Survey 1998)
      . svyset [pw=wt]
      . oaxaca lnwage educ exper tenure, by(female) pooled svy eform
      
      Blinder-Oaxaca decomposition
      
      Number of strata   =         1                  Number of obs     =      1,647
      Number of PSUs     =     1,647                  Population size   = 1,657.1804
                                                      Design df         =      1,646
                                                      Model              =    linear
      Group 1: female = 0                             N of obs 1         =       751
      Group 2: female = 1                             N of obs 2         =       683
      ------------------------------------------------------------------------------
                   |             Linearized
            lnwage |     exp(b)   Std. Err.      t    P>|t|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
      overall      |
           group_1 |   30.13527   .6819954   150.49   0.000     28.82685    31.50307
           group_2 |   24.38205   .6740745   115.53   0.000     23.09513    25.74069
        difference |   1.235961   .0441584     5.93   0.000     1.152314     1.32568
         explained |   1.117128   .0212218     5.83   0.000      1.07627    1.159538
       unexplained |   1.106373   .0349515     3.20   0.001       1.0399    1.177096
      -------------+----------------------------------------------------------------
      explained    |
              educ |   1.055629   .0146094     3.91   0.000      1.02736    1.084677
             exper |   1.033285   .0094647     3.57   0.000     1.014887    1.052017
            tenure |   1.024168   .0066003     3.71   0.000     1.011304    1.037196
      -------------+----------------------------------------------------------------
      unexplained  |
              educ |   .9289048   .1510583    -0.45   0.650     .6752228    1.277895
             exper |    .911896   .0452344    -1.86   0.063     .8273524    1.005079
            tenure |   1.053947   .0300001     1.85   0.065     .9967167    1.114463
            __cons |   1.239272   .2414533     1.10   0.271       .84567    1.816069
      ------------------------------------------------------------------------------
      .
      Steve Samuels
      Statistical Consulting
      [email protected]

      Stata 14.2

      Comment


      • #4
        Originally posted by Steve Samuels View Post
        I can't replicate your problem in Stata 14.2. My advice is to show us your exact code and results, as requested in FAQ 12.
        Code:
        . use http://fmwww.bc.edu/RePEc/bocode/o/oaxaca.dta
        (Excerpt from the Swiss Labor Market Survey 1998)
        . svyset [pw=wt]
        . oaxaca lnwage educ exper tenure, by(female) pooled svy eform
        
        Blinder-Oaxaca decomposition
        
        Number of strata = 1 Number of obs = 1,647
        Number of PSUs = 1,647 Population size = 1,657.1804
        Design df = 1,646
        Model = linear
        Group 1: female = 0 N of obs 1 = 751
        Group 2: female = 1 N of obs 2 = 683
        ------------------------------------------------------------------------------
        | Linearized
        lnwage | exp(b) Std. Err. t P>|t| [95% Conf. Interval]
        -------------+----------------------------------------------------------------
        overall |
        group_1 | 30.13527 .6819954 150.49 0.000 28.82685 31.50307
        group_2 | 24.38205 .6740745 115.53 0.000 23.09513 25.74069
        difference | 1.235961 .0441584 5.93 0.000 1.152314 1.32568
        explained | 1.117128 .0212218 5.83 0.000 1.07627 1.159538
        unexplained | 1.106373 .0349515 3.20 0.001 1.0399 1.177096
        -------------+----------------------------------------------------------------
        explained |
        educ | 1.055629 .0146094 3.91 0.000 1.02736 1.084677
        exper | 1.033285 .0094647 3.57 0.000 1.014887 1.052017
        tenure | 1.024168 .0066003 3.71 0.000 1.011304 1.037196
        -------------+----------------------------------------------------------------
        unexplained |
        educ | .9289048 .1510583 -0.45 0.650 .6752228 1.277895
        exper | .911896 .0452344 -1.86 0.063 .8273524 1.005079
        tenure | 1.053947 .0300001 1.85 0.065 .9967167 1.114463
        __cons | 1.239272 .2414533 1.10 0.271 .84567 1.816069
        ------------------------------------------------------------------------------
        .
        Hi, thanks a lot for replying!

        This is the error message that I am getting:
        Click image for larger version

Name:	capture-20181023-224816.png
Views:	1
Size:	9.4 KB
ID:	1467161


        Things are working fine when I remove the eform option, but two of my variables got dropped due to multicollinearity. I tried running the code again removing those two variables, but still the same error popped up.

        Comment


        • #5
          Originally posted by Steve Samuels View Post
          I can't replicate your problem in Stata 14.2. My advice is to show us your exact code and results, as requested in FAQ 12.
          Code:
          . use http://fmwww.bc.edu/RePEc/bocode/o/oaxaca.dta
          (Excerpt from the Swiss Labor Market Survey 1998)
          . svyset [pw=wt]
          . oaxaca lnwage educ exper tenure, by(female) pooled svy eform
          
          Blinder-Oaxaca decomposition
          
          Number of strata = 1 Number of obs = 1,647
          Number of PSUs = 1,647 Population size = 1,657.1804
          Design df = 1,646
          Model = linear
          Group 1: female = 0 N of obs 1 = 751
          Group 2: female = 1 N of obs 2 = 683
          ------------------------------------------------------------------------------
          | Linearized
          lnwage | exp(b) Std. Err. t P>|t| [95% Conf. Interval]
          -------------+----------------------------------------------------------------
          overall |
          group_1 | 30.13527 .6819954 150.49 0.000 28.82685 31.50307
          group_2 | 24.38205 .6740745 115.53 0.000 23.09513 25.74069
          difference | 1.235961 .0441584 5.93 0.000 1.152314 1.32568
          explained | 1.117128 .0212218 5.83 0.000 1.07627 1.159538
          unexplained | 1.106373 .0349515 3.20 0.001 1.0399 1.177096
          -------------+----------------------------------------------------------------
          explained |
          educ | 1.055629 .0146094 3.91 0.000 1.02736 1.084677
          exper | 1.033285 .0094647 3.57 0.000 1.014887 1.052017
          tenure | 1.024168 .0066003 3.71 0.000 1.011304 1.037196
          -------------+----------------------------------------------------------------
          unexplained |
          educ | .9289048 .1510583 -0.45 0.650 .6752228 1.277895
          exper | .911896 .0452344 -1.86 0.063 .8273524 1.005079
          tenure | 1.053947 .0300001 1.85 0.065 .9967167 1.114463
          __cons | 1.239272 .2414533 1.10 0.271 .84567 1.816069
          ------------------------------------------------------------------------------
          .
          Update:

          I could run the code with eform, but only when I am not attempting detailed decomposition.

          That is, using your example as the reference, whenever I am dropping this option "detail(exp_ten: exper tenure, isco: isco?) categorical(isco?)".

          Otherwise, if I include it, that error pops up as I pointed out earlier.

          Would it be okay to do the transformation manually from non-eform results?

          Comment


          • #6
            Sorry, I'm not familiar enough with oaxaca, to advise. I will say that this thread illustrates why not following the advice in FAQ 12 leads to unsatisfactory answers. That advice asks posters to show exact code and results, between [CODE] and [/CODE] delimiters. I suggest that you write to the author of oaxaca; his email is in the help, but he will also want to see the code and probably the data set.
            Good luck
            Steve Samuels
            Statistical Consulting
            [email protected]

            Stata 14.2

            Comment


            • #7
              Hi, I'm really sorry but the project I was working on is a bit sensitive, hence my reluctance towards sharing the output publicly.

              Thanks a lot for sharing your insights. I'll probably mail the author I think.

              Comment

              Working...
              X