Hi!
I'm wondering if there is a function (probably to be nested in a loop) that would allow me to select the varname from a list of 32 and assign it as value on a new variable.
In particular I got a matrix of 764x32 and for every ocurrence I need:
  1. generate a variable that will select the minimum value across the 32 (in a range of more - containg other data as name, adress, etc. on which I'm not interested to perform the selection);
  2. generate a variable that would select the varname correspondent to the value of the previous point.
Hope someone could give me some hints (also because I think it would not be the real objective of a software like Stata, but I find it very useful to manage data)

Thanks.