enmeng1217 发表于 2011-5-17 23:22 
2# tlw1987
在一般线性回归里也能用forecast命令吗?好像不行的,输进去是红色额,那个命令在arima模型中可以。
of coz you can achieve that in proc reg. but you have to do sth in the dataset.
for example, you data have to looks like
t x
1 1
2 2
3 3
4 4
5 5
last last_x
last+1
.
.
.
last+24
proc reg data=dataset;
model x = t;
output out=output p=ptrend;
run;
in the dataset, you have to input the 24 t's value manually, and then leave x values empty.
quit;