Announcement

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

  • SSC updates available for: -ineqdeco-, -ineqdec0-, -ineqfac-, -ineqrbd-, -povdeco, and -sumdist-

    I just updated several of my programs on SSC: -ineqdeco-, -ineqdec0-, -ineqfac-, -ineqrbd-, -povdeco, and -sumdist-. (Thanks as ever to Kit Baum for his SSC work.)

    There are cosmetic changes, e.g. to refer to my current email address in the help files. I now also allow all types of weight to be used.

    More substantively, one can now derive -svy bootstrap- estimates, i.e. with SEs, for all the saved results produced by those programs, drawing on Philippe Van Kerm’s -rhsbsample- (SSC; Repeated half-sample bootstrap sampling). For this I needed to be able to refer to pweights. A common issue when bootstrapping weighted estimates is how to deal with the weights appropriately; PVK’s program addresses that.

    Some example calculations are shown below with one year of UK income data (from Goodman, A. and S. Webb, For Richer, for Poorer: The Changing Distribution of Income in the United Kingdom, 1961–91, Commentary 42, Institute for Fiscal Studies, London, 1994. Available to registered users from the UK Data Service.)

    Reassuringly it turns out that the bootstrapped SEs are very similar to the SEs produced using asymptotic/linearised methods (See my -svylorenz- and -svygei_svyatk- on SSC for Lorenz ordinates, Gini, GE and Atkinson inequality indices.). Examples below

    Stephen

    .
    Code:
    . local R = 500
     
    . forvalues i = 1/`R' {
      2.         qui gen rhsbrw`i' = .
      3.         qui rhsbsample, weight(rhsbrw`i')
      4.         qui replace rhsbrw`i' = rhsbrw`i' * wgt
      5. }
     
    .
    . svyset [pw = wgt], vce(bootstrap) bsrweight(rhsbrw*) mse
     
          pweight: wgt
              VCE: bootstrap
              MSE: on
        bsrweight: rhsbrw1 .. rhsbrw500
      Single unit: missing
         Strata 1: <one>
             SU 1: <observations>
            FPC 1: <zero>
     
    .
    . svy bootstrap gini = (r(gini)) hscv = (r(ge2))  ///
    >                 , nodots ///
    >                 : ineqdec0 HHinc
     
    Bootstrap results                               Number of obs     =      7,635
                                                    Population size   = 56,382.626
                                                    Replications      =        500
     
          command:  ineqdec0 HHinc
             gini:  r(gini)
             hscv:  r(ge2)
     
    ------------------------------------------------------------------------------
                 |   Observed   Bstrap *
                 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
            gini |   .3447334   .0061432    56.12   0.000      .332693    .3567737
            hscv |   .3736323   .0301236    12.40   0.000     .3145911    .4326736
    ------------------------------------------------------------------------------
     
     
    .
    . svy bootstrap gini = (r(gini))  hscv = (r(ge2)) ge0 = (r(ge0)) ///
    >                 ge0B = (r(within_ge0)) ge0W = (r(between_ge0))  ///
    >                 ge0_0 = (r(ge0_0))  ge0_1 = (r(ge0_1))  ge0_2 = (r(ge0_2))  /
    > //
    >                 ge0_3 = (r(ge0_3))  ge0_4 = (r(ge0_4))  ge0_5 = (r(ge0_5))  /
    > //
    >                 , nodots ///
    >                 : ineqdeco HHinc, by(famtype)
     
    Bootstrap results                               Number of obs     =      7,635
                                                    Population size   = 56,382.626
                                                   Replications      =        500
     
          command:  ineqdeco HHinc, by(famtype)
             gini:  r(gini)
             hscv:  r(ge2)
              ge0:  r(ge0)
             ge0B:  r(within_ge0)
             ge0W:  r(between_ge0)
            ge0_0:  r(ge0_0)
            ge0_1:  r(ge0_1)
            ge0_2:  r(ge0_2)
            ge0_3:  r(ge0_3)
            ge0_4:  r(ge0_4)
            ge0_5:  r(ge0_5)
     
    ------------------------------------------------------------------------------
                 |   Observed   Bstrap *
                 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
            gini |   .3447334   .0061432    56.12   0.000      .332693    .3567737
            hscv |   .3736323   .0301236    12.40   0.000     .3145911    .4326736
             ge0 |   .2099721   .0079288    26.48   0.000     .1944319    .2255122
            ge0B |   .1878084   .0074155    25.33   0.000     .1732743    .2023425
            ge0W |   .0221637   .0022436     9.88   0.000     .0177663    .0265611
           ge0_0 |   .2302079   .0167659    13.73   0.000     .1973473    .2630684
           ge0_1 |    .205637   .0149452    13.76   0.000      .176345     .234929
           ge0_2 |    .192224   .0132923    14.46   0.000     .1661717    .2182764
           ge0_3 |   .1349613   .0261765     5.16   0.000     .0836563    .1862664
           ge0_4 |    .105247   .0073959    14.23   0.000     .0907513    .1197428
           ge0_5 |   .1622878   .0175463     9.25   0.000     .1278976     .196678
    ------------------------------------------------------------------------------
     
    .
    . svy bootstrap cush1 = (r(cush1))  cush2 = (r(cush2)) cush3 = (r(cush3)) ///
    >         cush4 = (r(cush4))  cush5 = (r(cush5)) cush6 = (r(cush6)) ///
    >         cush7 = (r(cush7))  cush8 = (r(cush8)) cush9 = (r(cush9)) ///
    >         , nodots ///
    >         : sumdist HHinc
     
    Bootstrap results                               Number of obs     =      7,635
                                                    Population size   = 56,382.626
                                                    Replications      =        500
     
         command:  sumdist HHinc
            cush1:  r(cush1)
            cush2:  r(cush2)
            cush3:  r(cush3)
            cush4:  r(cush4)
            cush5:  r(cush5)
            cush6:  r(cush6)
            cush7:  r(cush7)
            cush8:  r(cush8)
            cush9:  r(cush9)
     
    ------------------------------------------------------------------------------
                 |   Observed   Bstrap *
                 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
           cush1 |   .0304713   .0005963    51.10   0.000     .0293025    .0316401
           cush2 |   .0755657   .0010748    70.31   0.000     .0734592    .0776722
           cush3 |   .1300278   .0016566    78.49   0.000      .126781    .1332747
           cush4 |   .1950421   .0023288    83.75   0.000     .1904777    .1996065
           cush5 |   .2709849   .0030788    88.02   0.000     .2649505    .2770192
           cush6 |   .3587181   .0038956    92.08   0.000     .3510828    .3663534
           cush7 |   .4598146   .0047223    97.37   0.000     .4505591    .4690702
           cush8 |   .5786008   .0055712   103.86   0.000     .5676814    .5895203
           cush9 |   .7250403   .0063702   113.82   0.000     .7125549    .7375257
    ------------------------------------------------------------------------------
     
    .
    . *** linearised SEs for comparison ****
     
    . svyset [pw = wgt]
     
          pweight: wgt
              VCE: linearized
      Single unit: missing
         Strata 1: <one>
             SU 1: <observations>
            FPC 1: <zero>
     
    .
    . svylorenz HHinc
     
     
    Quantile group shares, cumulative shares (Lorenz ordinates),
    generalized Lorenz ordinates, and Gini
     
    Number of strata =          1               Number of obs    =         7635
    Number of PSUs   =       7635               Population size  =     56382.63
                                               Design df        =         7634
     
    ---------------------------------------------------------------------------
      Group  |             Linearized
      share  |   Estimate   Std. Err.     z      P>|z|     [95% Conf. Interval]
    ---------+-----------------------------------------------------------------
        1    |   0.030471   0.000564   54.047    0.000      .0293663   .0315763
        2    |   0.045094   0.000568   79.433    0.000      .0439818   .0462071
        3    |   0.054462   0.000667   81.677    0.000      .0531552    .055769
        4    |   0.065014   0.000754   86.203    0.000      .0635361   .0664925
        5    |   0.075943   0.000825   92.065    0.000       .074326   .0775595
        6    |   0.087733   0.000902   97.221    0.000      .0859646    .089502
        7    |   0.101097   0.000988  102.361    0.000      .0991608    .103032
        8    |   0.118786   0.001107  107.319    0.000       .116617    .120956
        9    |   0.146439   0.001285  113.952    0.000       .143921    .148958
       10   |   0.274960   0.006213   44.256    0.000       .262783    .287137
    ---------+-----------------------------------------------------------------
      Cumul. |
      share  |
        1    |   0.030471   0.000564   54.047    0.000      .0293663   .0315763
        2    |   0.075566   0.001043   72.447    0.000      .0735214     .07761
        3    |   0.130028   0.001622   80.179    0.000       .126849    .133206
        4    |   0.195042   0.002278   85.609    0.000       .190577    .199507
        5    |   0.270985   0.002994   90.514    0.000       .265117    .276853
        6    |   0.358718   0.003761   95.376    0.000       .351347     .36609
        7    |   0.459815   0.004580  100.393    0.000       .450838    .468792
        8    |   0.578601   0.005438  106.402    0.000       .567943    .589259
        9    |   0.725040   0.006213  116.700    0.000       .712863    .737217
        10   |   1.000000
    ---------+-----------------------------------------------------------------
      Gen.   |
      Lorenz |
        1    |     10.689      0.178   60.018    0.000        10.340     11.038
        2    |     26.507      0.290   91.305    0.000        25.938     27.076
        3    |     45.611      0.441  103.345    0.000        44.746     46.476
        4    |     68.416      0.622  109.975    0.000        67.197     69.635
        5    |     95.055      0.818  116.245    0.000        93.452     96.658
        6    |    125.830      1.029  122.269    0.000       123.813    127.847
        7    |    161.292      1.260  128.039    0.000       158.823    163.761
        8    |    202.959      1.537  132.011    0.000       199.946    205.972
        9    |    254.327      1.927  131.949    0.000       250.549    258.104
        10   |    350.776      4.246   82.621    0.000       342.455    359.097
    ---------+-----------------------------------------------------------------
      Gini   |  0.3447334  .00595649   57.875    0.000      .3330589   .3564079
    ---------------------------------------------------------------------------
     
    .
    . svygei HHinc
     
     
    Complex survey estimates of Generalized Entropy inequality indices
     
    pweight: wgt                                   Number of obs    = 7635
    Strata: <one>                                  Number of strata = 1
    PSU: <observations>                            Number of PSUs   = 7635
                                                   Population size  = 56382.626
    ---------------------------------------------------------------------------
    Index    |  Estimate   Std. Err.      z      P>|z|     [95% Conf. Interval]
    ---------+-----------------------------------------------------------------
    GE(-1)   |   1.01961   .29284732     3.48    0.000      .4456402   1.593581
    MLD      |  .2099721   .00755174    27.80    0.000      .1951709   .2247732
    Theil    |  .2307089   .01121549    20.57    0.000       .208727   .2526909
    GE(2)    |  .3736323   .02940012    12.71    0.000      .3160092   .4312555
    GE(3)    |  .9688198   .12483202     7.76    0.000      .7241536   1.213486
    ---------------------------------------------------------------------------
Working...
X