This is a simple loop for ETS estimation:

Code: Select all

`%towers2 = "CYVR CYEG CYYC CYXE CYWG CYYZ CYTZ CYOW CYUL CYHZ CYXX CZBB CYBW CYRC CZVL CYFC CYMM CYQX CYHM CYLW CYKF CYNJ CYXU CYQM CYHU CYOO CYPK CYXS CYQB CYQR CYJN CYAM CYYT CYQT CYKZ CYYJ CYXY CYQG CYAV CYZF CYHC"`

%flight_rule2 = "IFR VFR"

for %series1 {%flight_rule2}

!row=2

for %series2 {%towers2}

'Cannot have zeros for any multiplicative analysis, so recode 0 to 0.01

{%series1}_{%series2}_n = @recode({%series1}_{%series2}_n<=0,0.01,{%series1}_{%series2}_n)

smpl @first %history_end_date

freeze(mode=overwrite,{%series1}_{%series2}_stats) {%series1}_{%series2}_n.ets(e=e, t=e, s=e,modsel=aic,graph=cl,table=cl) forecast

smpl %forecast_start_date %forecast_end_date

genr {%series1}_{%series2}_ets_f = @round(forecast)

'Under circumstances of small numbers of observastions (i.e., medium wtc overflights), the ETS framework can make negative forecasts, so recode for this. This is very rare, just check for it

{%series1}_{%series2}_ets_f = @recode({%series1}_{%series2}_ets_f <0,0,{%series1}_{%series2}_ets_f )

'Make an actual series that is only for the forecast period

genr {%series1}_{%series2}_ets_a = {%series1}_{%series2}_n

delete forecast

smpl @all

scalar {%series1}_{%series2}_ets_mape = @mape({%series1}_{%series2}_ets_f,{%series1}_{%series2}_ets_a)

scalar {%series1}_{%series2}_ets_mae = @mae({%series1}_{%series2}_ets_f,{%series1}_{%series2}_ets_a)

if %series1="IFR" then

a_ets_feval_ifr(!row,1) = %series2

a_ets_feval_ifr(!row,2) = {%series1}_{%series2}_ets_mape

a_ets_feval_ifr(!row,3) = {%series1}_{%series2}_ets_mae

!row=!row+1

else

a_ets_feval_vfr(!row,1) = %series2

a_ets_feval_vfr(!row,2) = {%series1}_{%series2}_ets_mape

a_ets_feval_vfr(!row,3) = {%series1}_{%series2}_ets_mae

!row=!row+1

endif

next

next

smpl @all

stop

Any idea what this error means: "Eviews 10 Has Stopped Working" Any way to find out what is really going on?

Note the table has been correctly made in commands prior to what you see here

-Bill