Code: Select all
genr tot_ecu_hf=0
group a_results
for %series {%vars}
smpl @first %history_end_date
freeze(mode=overwrite,{%series}_stats) {%series}.autoarma(tform=auto,diff=2,select=aic,periods=12,kpsssig=5,eqname={%series}_eq,maxar=4,maxma=3,maxsar=1,maxsma=1,seed=131071,forclen={!fcst_length},etable,agraph,atable,fgraph) forecast
'Tidy up variable names so that they are named properly and all data stored where you want, could have done {%series}_f above instead of forecast, but below permits custom variable names and content
smpl %forecast_start_date %forecast_end_date
genr {%series}_f=forecast
smpl @all
genr {%series}_hf={%series}
smpl %forecast_start_date %forecast_end_date
{%series}_hf={%series}_f
group a_results a_results {%series}_hf
smpl @all
tot_ecu_hf=tot_ecu_hf+{%series}_hf
smpl @first %history_end_date
next
delete forecast
smpl @all
group a_results a_results tot_ecu_hf
I need to be able to export the r-square from each model to Excel, which will be linked to another Excel later. Any ideas on the best way to do this? Perhaps a table? Or direct export?
thanks