Hello -
Provided I understand correctly what you would like to archive, I think the answer is to run ESM several times using the BACK= option and to merge the results of each run.
Here is an illustration of what I'm referring to: I running ESM 12 times with a lead time of one while decreasing the out-of-sample size for each run and keeping the prediction of each run.
Hope that helps.
Thanks,
Udo
%macro esm(value);
%do i=&value. %to 1 %by -1;
proc esm data=sashelp.air out=_null_ outfor=work.outfor&i. lead=1 back=&i.;
id date interval=month;
forecast air / method=winters;run;
data outfor&i.;
set outfor&i.(keep=actual predict date) end=last;if last;
run;
%end;
data result;
set outfor1-outfor12;
by date;
run;
%mend;
%esm(12)
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.