Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: R: % of people lying under a certain percentage of median income - (flag: Stata 9/2 SE)


From   "Carlo Lazzaro" <carlo.lazzaro@tin.it>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: R: % of people lying under a certain percentage of median income - (flag: Stata 9/2 SE)
Date   Sun, 3 Oct 2010 13:37:31 +0200

Dear Caterina, what follows can do the trick:
--------- code begins---------------
set obs 100
g income=100000*uniform()
qui sum income,d
scalar A= r(N)
count if income < .2*r(p50)
di r(N)/A
--------- code ends---------------

Kind Regards and Have a Nice Sunday, 

Carlo
-----Messaggio originale-----
Da: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Per conto di Caterina Astarita
Inviato: domenica 3 ottobre 2010 11.32
A: statalist-digest@hsphsun2.harvard.edu
Oggetto: st: % of people lying under a certain percentage of median income

Dear statalister, 

I would like to calculate the percentage of families having an 
income that lies below a certain percentage below the median 
income, let's say the 20% of the median income. Is there any 
command in Stata that performs this kind of calculus? 

Thank you 

Caterina
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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   |   Site index