|
Jesper Nyholm wrote:
> /***
> Hi
> Can anybody tell me how to create a new variable that indicate a change
> in amount for every id?
> ***/
> DATA TEST;
> INPUT ID 1-5 AMOUNT 7-11;
> DATALINES;
> 10001 2000
> 10001 2000
> 10001 3000
> 10002 2500
> 10002 3000
> 10003 1000
> 10003 1000
> 10003 1000
> 10003 2000
> 10003 1000
> ;
>
I would direct you to the section in the SAS manual concerned with "RETAIN",
and BY-processing in general.
|