下面是个模拟数据,看别人的参考文献上说可以用loess 预测后面的数据,我想预测year= 75 85 的active,在sas help上查的代码只有目前数据集year 的预测值,sas 小白请教各位大神
data loe;
input year active @@;
format year f3.1;
format active f3.1;
datalines;
25 33.9
30 27.8
35 28.8
40 38.3
45 38.9
50 31.2
55 37.4
60 36.9
65 29
70 28.6
;
proc sgplot data=loe;
scatter x=year y=active;
run;
proc loess data=loe;
ods output OutputStatistics = loeFit
FitSummary=Summary;
model active = year / degree=2 select=AICC(steps) smooth = 0.6 1.0
direct alpha=.01 all details;
run;
proc loess data=loe;
model active = year / degree=2 smooth = 0.6 1.0
direct alpha=.01;
output out=loeFit p=predval /all row;
run;