Hello - This is an example for illustration purposes only - using your data using temporal reconciliation might turn out to be more useful. The challenge is to get the boundaries of the different aggregation levels right (otherwise you might end up with not fully observed intervals). As you were wondering about using custom intervals: HPFTEMPRECON currently does not suggest custom intervals. Thanks, Udo *create sample data; data subset(keep=date volume); set sashelp.timedata; date=datepart(datetime); if date lt "01JAN1998"d or date gt "31DEC99"d then delete; format date date9.; run; proc timeseries data=subset out=subset; id date interval=week accumulate=total; var volume; run; *forecast on weekly frequency; proc hpfengine data=subset rep=sashelp.hpfdflt globalselection=tsfsselect out=_null_ outfor=outforwk plot=forecastslead=5; id date interval=week accumulate=total; forecast volume; run; *forecast on monthly frequency - using R445; proc hpfengine data=subset rep=sashelp.hpfdflt globalselection=tsfsselect out=_null_ outfor=outformon plot=forecastslead=1; id date interval=R445MON accumulate=total; forecast volume; run; *convert weekly predictions to daily; proc expand data=outforwk(keep=_name_ actual predict date) out=outforday from=week to=day; id date; convert predict; by _name_; run; *temporal reconcilation of month to day; proc hpftemprecon data=outforday benchdata=outformon outfor=benfor; id date interval=day; benchid date interval=R445MON; run; *aggregate adjusted daily forecast to weekly frequency; proc timeseries data=benfor out=series; id date interval=week accumulate=total; var predict; run; *merge results of weekly forecasts and adjusted weekly forecasts and plot; data result; merge outforwk series(rename=(predict=bench)); by date; run; proc sgplot data=result; series x=date y=actual; series x=date y=predict; series x=date y=bench; run;
... View more