Statalist


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

st: using saved values


From   "Lektzian, David" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: using saved values
Date   Tue, 20 Jan 2009 11:28:34 -0600

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/



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