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

st: Generating percentiles


From   "Yvonne Capstick" <[email protected]>
To   [email protected]
Subject   st: Generating percentiles
Date   Sat, 16 Jul 2005 15:08:04 -0400

Hi,

I am able to generate easily the median of a variable for a given year, e.g.

sort year
by year: egen medianprice = median(price)

Does anyone know how I can generate the 30th and 70th percentile of a
variable? I know I can use the centile function to display the 30th and 70th
percentiles, and the centile function can definitely be used with "by", but
it can't be used with "egen" it seems.

Thanks
Yvonne

_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index