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,
SARIMA script from R to Eviews
Moderators: EViews Gareth, EViews Moderator
-
xprimexinverse
- Posts: 41
- Joined: Fri Sep 18, 2015 11:41 am
- Location: Dublin, Ireland
- Contact:
Re: SARIMA script from R to Eviews
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.
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.
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).
Lastly, if you have a lot of R code to run, you might consider using the xrun command in EViews.
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).
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 Code: Select all
ls d(ENDOG, 0, 12) AR(1) AR(3 to 4) SAR(1) EXOG1 EXOG2 EXOG3 EXOG4 EXOG5 Re: SARIMA script from R to Eviews
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
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
SAR(12).
Who is online
Users browsing this forum: No registered users and 2 guests
