Line for the server...
You can also do this with even less fuss
*****
sysuse auto, clear
_pctile pr, p(25 75)
ret li
*verify result against -summarize-
su pr,d
*****
HTH
Martin
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Lektzian, David
Sent: Tuesday, January 20, 2009 6:29 PM
To: [email protected]
Subject: st: using saved values
Dear Statalist,
I know this is a pretty simple question, but I was wondering if somebody
could tell my how to get the 75th percentile of a variable and then use it
for a future calculation. So, specifically, using a cross-sectional time
series data set organized by country and year, I want to do the following:
By year, generate a variable with the 75th percentile value for
SqMilesOfLand
Then generate another variable =1 if the current value for a country of
SqMilesOfLand > 75th percentile.
Then I want to do the same thing for less than the 25th percentile, and
another dummy for being between the 25th and 75th percentiles.
A more general question is that I can't figure out how to call out saved
values from something like summarize and use them in future calculations.
Any help/instruction would be greatly appreciated.
Dave
*
* 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/