SARIMA script from R to Eviews

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

Franpaz
Posts: 3
Joined: Wed Dec 02, 2015 5:09 am

SARIMA script from R to Eviews

Postby Franpaz » Fri Dec 04, 2015 2:26 am

I've recibed this R script

Modelo3 = arima(Data$Table, xreg = Table[,5:9], order = c(4, 0, 0), seasonal = list(order = c(1, 1, 0) , period = 12), include.mean = F , fixed = c(NA, 0, NA, NA, NA, NA, NA, NA, NA, NA) )

and I want to replicate it in Eviews. Do you know how can i do this?

Thanks a lot,

xprimexinverse
Posts: 41
Joined: Fri Sep 18, 2015 11:41 am
Location: Dublin, Ireland
Contact:

Re: SARIMA script from R to Eviews

Postby xprimexinverse » Sat Dec 05, 2015 8:32 am

The model (Modelo3) is a SARIMAX model. That is, a seasonal ARIMA model with exogenous variables.

Let's break down the R code and then figure out what needs to be done in EViews.
  • Data$Table is a univariate time-series. It is the dependent (left-hand side) variable in the model.
  • Table[,5:9] refers to 5 exogenous variables.
  • c(4,0,0) refers to the non-seasonal part of the SARIMA model for Data$Table. It specifies an AR(4).
  • c(1, 1, 0) refers to the seasonal part of the SARIMA model for Data$Table. It specifies AR(1) with first seasonal differencing.
  • include.mean = F just means do not include an intercept term (which is usual if the series being modelled has been differenced).
  • fixed = c(NA, 0, NA, NA, NA, NA, NA, NA, NA, NA) is used to impose a constraint on the second parameter in the model (second argument is set equal to zero).
Now that we can interpret the R code correctly and understand the econometric model(!)... we can go to EViews.

To specify the general model, the code should like what follows. Obviously, you'll have to change the names of the variables, but that's easy.

Code: Select all

ls d(ENDOG, 0, 12) AR(1 to 4) SAR(1) EXOG1 EXOG2 EXOG3 EXOG4 EXOG5
If I'm not mistaken, the 0 constraint is on the second AR term, so you can impose this constraint by adjusting the EViews code slightly. (Double check this).

Code: Select all

ls d(ENDOG, 0, 12) AR(1) AR(3 to 4) SAR(1) EXOG1 EXOG2 EXOG3 EXOG4 EXOG5
Lastly, if you have a lot of R code to run, you might consider using the xrun command in EViews.

Franpaz
Posts: 3
Joined: Wed Dec 02, 2015 5:09 am

Re: SARIMA script from R to Eviews

Postby Franpaz » Mon Dec 14, 2015 8:06 am

Thank you very much.

xprimexinverse
Posts: 41
Joined: Fri Sep 18, 2015 11:41 am
Location: Dublin, Ireland
Contact:

Re: SARIMA script from R to Eviews

Postby xprimexinverse » Mon Dec 14, 2015 1:00 pm

No problem. Actually, you may want to check that the EViews code is SAR(1) or SAR(12). Maybe one of the EViews guys can confirm the correct one. Good luck!

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

Re: SARIMA script from R to Eviews

Postby EViews Gareth » Mon Dec 14, 2015 3:14 pm

SAR(12).


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests