Statalist


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

st: RE: RE: using xtile and qreg to find the median income for individuals between certain income percentiles


From   Holly Kosiewicz <HKosiewicz@epe.org>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: RE: using xtile and qreg to find the median income for individuals between certain income percentiles
Date   Thu, 24 Sep 2009 09:58:04 -0400

Yes - that works. Thanks. However, output generated after the sum command shows N to be my sample, and not the estimated population. Thoughts? 

-----Original Message-----
From: Nick Cox [mailto:n.j.cox@durham.ac.uk] 
Sent: Thursday, September 24, 2009 5:25 AM
To: statalist@hsphsun2.harvard.edu
Subject: st: RE: using xtile and qreg to find the median income for individuals between certain income percentiles

Why not just use -summarize, detail- with -aweights-? 

Nick 
n.j.cox@durham.ac.uk 

Holly Kosiewicz, M.A. 

I have a database that contains information on a sample of individuals.
The database includes a final weight that is used to produce estimates
for the population.

I have to used the xtile command to generate 10 percentiles for a
variable that measures income conditioned on a group of individual
characteristics: working age, dropout, and lives in a particular area;
the exact command I use is:  
xtile ten=pincp	[aweight=pwgtp] if agerange==1 & puma=="02200" &
dropout==1,nq(10)

I would like to find the weighted median income for individuals that
fall between the 1-10th percentile, 11th-20th percentile, 21-30th
percentile of the income variable. 

Martin, Nick, and Austin have shown me that the qreg command can be used
to obtain the median income level for the entire population. I have
tried to use this command to find the median income for individuals that
fall between certain income percentiles, but Stata gives me an error
stating that my income variable is dropped due to collinearity
(something I should have expected from the get-go). This is the command
I use: qreg pincp [aweight=pwgtp] if agerange==1 & puma=="02200" &
dropout==1  & ten==1

I have looked at different posts about topics dealing with percentiles
and weights but none of them directly tackles this issue.


*
*   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   |   What's new   |   Site index