title: Generate difference between observations as new variable in Stata
body: <p>I am trying to get the difference between the natural logarithms of two consecutive observations for a set of variables.</p>
  
  <p>My approach is as follows </p>
  
  <pre><code>. gen abandon_qry_ln = ln(abandon_qry) - ln(abandon_qry) [_n-1]
  </code></pre>
  
  <p>But I get the error <code>weights not allowed</code>. </p>
  
  <p>Any idea what could be the issue?</p>