Statalist


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

st: RE: using saved values


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: using saved values
Date   Tue, 20 Jan 2009 17:35:00 -0000

Look at the help for -egen- to see how to generate variables containing
summary measures, in this case percentiles. Then your dummies follow
easily. 

Type -return list- and study the manual entry to see what is left in
memory after -summarize-. 

Nick 
[email protected] 

Lektzian, David

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.


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