Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
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/