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: from variable names to values


From   Katie Wilson <collectmoments@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: from variable names to values
Date   Fri, 1 Jun 2012 15:33:17 -0700

Hi all,

I have a data set with 41 variables: a unique identifier and then 40
variables containing population size.  I got the minimum poplation of
all forty just using egen minpop=rowmin(area1-area40).  Now I need to
create a new variable which has a code for the area with the smallest
population, ideally the value would be the same as the variable name
for the area.  The problem I run into, of course, is that STATA never
captures a variable name, only its own value.

Any help would be much appreciated.

Thank you,
Katie

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