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

From |
Holly Kosiewicz <HKosiewicz@epe.org> |

To |
"statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |

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

Date |
Wed, 23 Sep 2009 16:45:17 -0400 |

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. Thoughts? Holly Kosiewicz, M.A. * * 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/

**Follow-Ups**:**st: RE: using xtile and qreg to find the median income for individuals between certain income percentiles***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

- Prev by Date:
**Re: st: rregfit (Robust Regression)** - Next by Date:
**st: svyset problem 1** - Previous by thread:
**st: truncreg and discontinous likelihood** - Next by thread:
**st: RE: using xtile and qreg to find the median income for individuals between certain income percentiles** - Index(es):

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