title: SAS calulations with multiple observations
body: <p>I'm trying to compute a value across observations.  My data look like</p>
  
  <pre><code>ID LAND DECILE DISTANCE  
  1    85   1       1.5  
  1    85   2       3.4  
  .  
  .  
  1    85   9       13.2  
  2    76   1       0.9
  2    76   2       2.7
  </code></pre>
  
  <p>I'm trying to calculate for each ID with ten deciles, <code>(decile10 - decile(i+1))/(decile10 - decile1)</code>, where i is the ith decile.  I'm not worried about decile 10.  Thanks for any help!  Been struggling with this all day.</p>