title: Stacking variables for each unique ID
body: <p>I am using Stata 13 to stack several variables into one variable using</p>
  
  <pre><code>stack stand1-stand10, into(all)
  </code></pre>
  
  <p>However, I need to do it for each unique id which is pasted parallel to <code>all</code>, something like: </p>
  
  <pre><code>bysort familyid: stack stand1-stand10,into(all) keep familyid
  </code></pre>