Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: Re: from variable names to values

From   Katie Wilson <>
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,

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index