我正在学习处理时间序列数据,如下程序源于高惠旋主编的《sas系统-sas/ets软件使用手册》page30:
data cpicity;
input city $ 11. date monyy7. cpi;
format date monyy7.;
cards;
New York Nov1989 133.2
New York Dec1989 133.3
New York Jan1990 135.1
New York Feb1990 135.3
New York Mar1990 136.6
New York Apr1990 137.3
New York May1990 137.2
New York Jun1990 137.1
New York Jul1990 138.4
Chicago Nov1989 126.7
Chicago Dec1989 126.5
Chicago Jan1990 128.1
Chicago Feb1990 129.2
Chicago Mar1990 129.5
Chicago Apr1990 130.4
Chicago May1990 130.4
Chicago Jun1990 131.7
Chicago Jul1990 132
Los AngelesNov1989 130
Los AngelesDec1989 130.6
Los AngelesJan1990 132.1
Los AngelesFeb1990 133.6
Los AngelesMar1990 134.5
Los AngelesApr1990 134.2
Los AngelesMay1990 134.6
Los AngelesJun1990 135
Los AngelesJul1990 135.6
run;
proc sort data=cpicity;
by city date;
run;
proc forecast data=cpicity interval=month lead=2 out=foreout outfull outresid;
var cpi;
id date;
by city;
run;
proc print data=foreout;
run;
运行后,log窗口提示:
[color=red:ee085]ERROR: Too few observations to fit model. At least 11 observations are required. Check your data.
NOTE: The above message was for the following by-group:
city=Chicago
ERROR: Too few observations to fit model. At least 11 observations are required. Check your data.
NOTE: The above message was for the following by-group:
city=Los Angeles
ERROR: Too few observations to fit model. At least 11 observations are required. Check your data.
NOTE: The above message was for the following by-group:
city=New York[/color:ee085]我想知道为什么要求至少有11个观测?哪位dx可以给小弟指点一二。谢谢!
btw,对于时间序列,我刚开始接触,很多东西不懂,现在只是在看sas/ets使用手册,对理论没什么了解,也不知道该从哪里入手,如果有人推荐一些好的入门参考书,更是求之不得!再次3x a lot!:)