data a;
input Year Item $ P;
cards;
2001 a 100
2002 a 130
2003 a 150
2004 a 170
2001 b 210
2002 b 220
2003 b 230
2004 b 210
2001 c 150
2002 c 200
2003 c 203
2004 c 300
;
run;
proc sort data =a ;
by item;
run;
data b;
set a;
by item;
x=lag(p);
if not first.item then y=round(p/x,0.000001)-1;
drop x;
run;
既然写了,也贴一下吧,哈