Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Percent distribution using the pweight


From   wying1@umbc.edu
To   statalist@hsphsun2.harvard.edu
Subject   st: Percent distribution using the pweight
Date   Wed, 24 Aug 2005 16:23:16 -0400 (EDT)

Dear list users,

I want to create the percent distribution (both percent and frequency are
needed).  I need sth. like:


. tab hhldpov1
    Poverty |
  status on |
    monthly |
 threshold: |
          1 |
(<100%),2{1 |
00%,200%),3 |
    {200%)' |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |     14,062       13.57       13.57
          2 |     20,343       19.63       33.20
          3 |     69,210       66.80      100.00
------------+-----------------------------------
      Total |    103,615      100.00
------------------------------------------------------------------------

However, the tab command doesn't allow the pweight.

So I did.

---------------------------------------------------------------------

. table hhldpov1 [pweight =whfnwgt], format(%12.0g)

------------------------
Poverty   |
status on |
monthly   |
threshold |
: 1       |
(<100%),2 |
{100%,200 |
%),3{200% |
)'        |        Freq.
----------+-------------
        1 |  5.81216e+11
        2 |  8.55400e+11
        3 |  3.01133e+12
------------------------
-------------------------------------------------------------------------

This only shows the frequency but not the percent.  I know I can simply
calculate the percent distribution by excel, but it would be nice to have
it directly from the Stata output.  Can somebody help me with this?

BTW, is the fweight the inverse of the pweight?



Many thanks,
Ying

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index