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 on April 23, and its replacement, statalist.org is already up and running.


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

st: RE: percentile variables


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: percentile variables
Date   Fri, 9 Jul 2010 22:13:46 +0200

<>

*************
egen, pctile()
*************

does allow -by-.

HTH
Martin

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Maximiliano
Manuel Silva Correa
Sent: Freitag, 9. Juli 2010 20:03
To: statalist@hsphsun2.harvard.edu
Subject: st: percentile variables

Hello everybody,

Im wondering how could i create a variable of percentiles using By

suppose we have power consumption data, our variables are

state

city

power_plant_type

power consumption

day_period

id like to do something like

bys stata city power_plant_type day_period: pctile power, pctile(10(10)90)

Thank u in advance

Max
*
*   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