sas lag 使用

View Code
 1 data look_back;
 2 input time temperature;
 3 Diff_tmp=dif(temperature);
 4 datalines;
 5 1 60
 6 2 62
 7 3 65
 8 4 70
 9  ;
10 run;
11 proc print data=look_back;
12 run; 

运行结果

ObstimetemperatureDiff_tmp
1 1 60 .
2 2 62 2
3 3 65 3
4 4 70 5
posted @ 2013-04-25 15:38  xinyonde  阅读(224)  评论(0编辑  收藏  举报