An update to the dstat package is available from SSC. dstat is a general command to estimate summary statistics (including inequality and poverty measures) and distributions functions. To install the update, type:

Code:
. ssc install dstat, replace
Some changes and additions are as follows:
  • new dstat ccdf command to estimate the complementary CDF (tail distribution, survival function)
  • dstat cdf is now more powerful (several additional options)
  • Lorenz curves and percentile shares can now be expressed as totals (option sum)
  • survey estimation of frequencies and totals wrongly conditioned on the sum of weights, leading to conservative standard errors for these types of statistics; this is fixed
See https://github.com/benjann/dstat for more information.

You may also want to install the latest update of moremata, which is required by dstat:

Code:
. ssc install moremata, replace