title: Reshape data for all values of pid
body: <p>I have the variables below:</p>
  
  <pre><code>rid     revenue     pid     in_stock
  46532   2085405     1013    1
  58914   3964121     1021    1
  </code></pre>
  
  <p>I would like to reshape them as follows:</p>
  
  <pre><code>rid     revenue     pid     in_stock
  46532   2085405     1013    1
  46532   2085405     1021    0
  58914   3964121     1013    0
  58914   3964121     1021    1
  </code></pre>
  
  <p>How can I do this in Stata?</p>