Page 1 of 1

Saving forecast from var

Posted: Tue Aug 07, 2012 8:43 am
by nicolau
Hi,

i am trying to save multiplus forecast results from var in to a group but i do not know how. I am doing the following steps:
1 - estimate var models
2 - make model
3 - solve the model
the next step would be to salve the forecasts results in to a group called "forecast". The problem is to change the name of the series forecast of each var in order to save all the resoults. The way i am doing, its overwright the results of each var.

By now, i got the following code:

VAR VAR_2_AIC.LS 1 4 D_IPCA_LIVRE D_IPCA_ADM D_TCR_IPCA SELIC_REAL D_PROD_IND D_M1 'set var model
VAR_2_AIC.MAKEMODEL(MOD2_AIC) 'make the model from var
smpl {%data_inicio_proj} {%data_fim} 'set forecast period
SOLVE MOD2_AIC 'make the forecast


VAR VAR_2_SIC.LS 1 1 D_IPCA_LIVRE D_IPCA_ADM D_TCR_IPCA SELIC_REAL D_PROD_IND D_M1
VAR_2_AIC.MAKEMODEL(MOD2_SIC)
smpl {%data_inicio_proj} {%data_fim} 'determina o período para a projeção
SOLVE MOD2_SIC

group forecast
forecast.add d_ipca_adm_0
forecast.add d_ipca_livre_0
forecast.add d_ipca_adm_0

Tks.

Re: Saving forecast from var

Posted: Tue Aug 07, 2012 9:19 am
by EViews Gareth
Because the endogenous variables are the same in each model, each solve of the models will overwrite the forecast series. The easiest thing to do is to create new series equal to the forecast series between each solve.

Code: Select all

VAR VAR_2_AIC.LS 1 4 D_IPCA_LIVRE D_IPCA_ADM D_TCR_IPCA SELIC_REAL D_PROD_IND D_M1 'set var model VAR_2_AIC.MAKEMODEL(MOD2_AIC) 'make the model from var smpl {%data_inicio_proj} {%data_fim} 'set forecast period SOLVE MOD2_AIC 'make the forecast series forc1 = d_ipca_adm_0 series forc2 = d_ipca_livre_0 series forc3 = d_ipca_adm_0 group forecast forc1 forc2 forc3 VAR VAR_2_SIC.LS 1 1 D_IPCA_LIVRE D_IPCA_ADM D_TCR_IPCA SELIC_REAL D_PROD_IND D_M1 VAR_2_AIC.MAKEMODEL(MOD2_SIC) smpl {%data_inicio_proj} {%data_fim} 'determina o período para a projeção SOLVE MOD2_SIC forecast.add d_ipca_adm_0 forecast.add d_ipca_livre_0 forecast.add d_ipca_adm_0

Re: Saving forecast from var

Posted: Tue Aug 07, 2012 1:34 pm
by nicolau
Thanks