From: Jinto83 on
Hi,

I understand how to use proc expand to get lead and lag variables.
However, suppose I have a file like this:

saledate year price
1988.01.01 1986 15
1988.01.01 1987 16
1988.01.01 1988 17
1988.01.01 1989 18
1988.01.01 1990 19
1988.01.01 1991 20


How do I get the following output, that is find lead lag according to the saledate.
saledate pricelead1 pricelag1
1988.01.01 18 16


--- news://freenews.netfront.net/ - complaints: news(a)netfront.net ---
 | 
Pages: 1
Prev: How do you do this?
Next: SCD type2 on mainframe