title: Get the variable name that corresponds to the maximum value within an observation
body: <p>I need to find the variable name that corresponds to the highest value in each observation for a given variable list. I know that I can use <code>egen</code> to get the value itself: </p>
  
  <pre><code>egen newvar = rowmax(v1-vn)
  </code></pre>
  
  <p>But I don't know how to get the variable name corresponding to the highest value. </p>