You are on page 1of 3

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Generating percentiles


From
To
Subject
Date

Mario Macis <mmacis@gmail.com>


statalist@hsphsun2.harvard.edu
Re: st: Generating percentiles
Sat, 16 Jul 2005 18:39:53 -0500

Hi,
say you want the 25th percentile:
sort year
by year: egen p25 = pctile(price), p(25)
Hope this helps!
Mario
On 7/16/05, Yvonne Capstick <yvonnecapstick@hotmail.com> wrote:
>
> Hi,
>
open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
*
*
*
*
*

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
variable? I know
percentiles, and
it can't be used

how I can generate the 30th and 70th percentile of a


I can use the centile function to display the 30th and 70th
the centile function can definitely be used with "by", but
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/

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/

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

References:
st: Generating percentiles
From: "Yvonne Capstick" <yvonnecapstick@hotmail.com>
Prev by Date: st: Generating percentiles
Next by Date: st: syntax error in forvalues range definition using a tempvar??
Previous by thread: st: Generating percentiles
Next by thread: st: syntax error in forvalues range definition using a tempvar??
Index(es):
Date
Thread
Copyright 19962015 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

You might also like