Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Calculating p20/p80 indicator with weights

From   Anke Weber <>
Subject   st: Calculating p20/p80 indicator with weights
Date   Mon, 18 Jun 2012 15:35:10 +0200

Dear all,

I am using Stata 11, and trying to take into account pweights when constructing the p20/p80 inequality measure, i.e. the ratio of the average income of the richest 20 percent of the population divided by the average income of the bottom 20 percent (using data from the SOEP, USS, and EUSILC databases). Would anyone have a suggestion on how to account for the sampling weight (of the person) in the data? So far, I explored the ineqdeco command, which let's you use aweights but unfortunately there is only an p75/p25 or p90/p10 measure. Then, I tried to use the svy command to calculate separately the 20-percentile and the 80 percentile, using my equivalised income variable (equivincome) but this did not work either:

svyset pidp [pweight=a_psnenus_xw]

      pweight: a_psnenus_xw
          VCE: linearized
  Single unit: missing
     Strata 1: <one>
         SU 1: pidp
        FPC 1: <zero>

svy: egen p20= pctile(equivincome), p(20)

egen is not supported by svy with vce(linearized); see help svy estimation for a list of
Stata estimation commands that are supported by svy

I would be very happy if some one has an idea of how to calculate the p20/p80 indicator with weights!

Many thanks in advance,

Anke Weber

European Commission - Joint Research Centre
Econometrics and Applied Statistics Unit
Institute for the Protection and Security of the Citizen
Via E. Fermi 2749, TP 361
Ispra (VA), I-21027, Italy
Phone: +39 0332 78 5821
Fax: +39 0332 78 5733


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index