Issue with autoarma and forclen option

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator

BCNAV
Posts: 28
Joined: Tue Oct 31, 2017 9:06 am

Issue with autoarma and forclen option

Postby BCNAV » Wed Nov 08, 2017 2:06 pm

I have the following code:

Code: Select all

%m=@left(@date,2)               
%d=@mid(@date,4,2)            
!year=2000+@right(@date,2)      

!annual1=2000
!annual2=2019

wfcreate arima_{!year}.{%m}.{%d} u !annual1 !annual2
%wfsaveloc="R:\Eviews\Workfiles\ARIMA"

'------------------------------------------------------------------Start with the monthly data and forecast------------------------------------------------------------------
pagecreate m !annual1 !annual2
pagerename untitled1 navdat_m

smpl @all

'Get the data and initialize forecast variables
FETCH(d=R:\Eviews\Databases\Main\nav_data_all_ts.edb) ovr_ecu_m11 ovr_ecu_m14 ovr_ecu_m22 ovr_ecu_m23 ovr_ecu_ktk ovr_ecu_oth ter_ecu_m11 ter_ecu_m22 ter_ecu_m33 ter_ecu_m34 ter_ecu_m35 enr_ecu_m11 enr_ecu_m22 enr_ecu_m33 enr_ecu_m34 enr_ecu_m35 dly_tot_dcu fy
'%vars="ovr_ecu_m11 ovr_ecu_m14 ovr_ecu_m22 ovr_ecu_m23 ovr_ecu_ktk ovr_ecu_oth ter_ecu_m11 ter_ecu_m22 ter_ecu_m33 ter_ecu_m34 ter_ecu_m35 enr_ecu_m11 enr_ecu_m22 enr_ecu_m33 enr_ecu_m34 enr_ecu_m35 dly_tot_dcu"

for %series {%vars}
   {%series}.autoarma(tform=auto,diff=1,select=aic,periods=12,maxar=4,maxma=2,maxsar=12,maxsma=12,forclen=12,agraph,atable,fgraph) {%series}_f
next


Historical data goes to 2017M09

I am getting "Number of forecast periods extends outside workfile range"

This should not be the case I don't think, as the workfile goes to the end of 2010. The error comes up even if forclen=1

Any ideas? Something silly I did?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11546
Joined: Tue Sep 16, 2008 5:38 pm

Re: Issue with autoarma and forclen option

Postby EViews Gareth » Wed Nov 08, 2017 2:17 pm

You have to set the estimation sample to be over the historical data. You could probably do:

Code: Select all

for %series {%vars}
   smpl if {%series}<>NA
   {%series}.autoarma(tform=auto,diff=1,select=aic,periods=12,maxar=4,maxma=2,maxsar=12,maxsma=12,forclen=12,agraph,atable,fgraph) {%series}_f
next


or hard code the dates.
Follow us on Twitter @IHSEViews

BCNAV
Posts: 28
Joined: Tue Oct 31, 2017 9:06 am

Re: Issue with autoarma and forclen option

Postby BCNAV » Thu Nov 09, 2017 7:27 am

thanks..that did it!


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 11 guests