I am currently trying to make a forecast based on past observations of the dependent variable AND external variables at the same time. I know that ARIMAX allows you to do this, however when I use this function it fits the model using the last k lags. What i actually want is to decide on the best model by means of AIC for example that only uses a subset of those k lags. I think that SARIMA allows me to choose lags (but no experience here) but it does not allow me to include external variables. So for example instead of using the last 52 lags of my dependent variable I just want to have a result that would look like lag 1, lag 4 and lag 52 for the dependant variable, lag 1 to lag 4 for external variable number 1 (A) and lag 1, lag 12 and lag 52 for external variable number two(B). I hoped to find a SARIMAX or SARMAX function but i have not succeeded. Does anyone know if it exists, and if not what would be the recommended way to include both external variables and ARMA terms? The integrated part is not that important for me. Though automatic lag selection would be a pre, I may be able to choose the lags manually. -- View this message in context: http://r.789695.n4.nabble.com/SARIMAX-as-extended-AR-I-MAX-tp3898726p3898726.html Sent from the R help mailing list archive at Nabble.com.
SARIMAX as extended AR(I)MAX?
2 messages · testrider
15 days later
Though I have not found the solution anywhere I have come up with a trick that I will post here for future reference: As long as you only want to include AR terms of the external variables (even the dependant variable can be used as an external variable) it is possible to manually lag the variables and then put them together by using ts.union(). Then the normal ARIMA function can be used to solve this problem. -- View this message in context: http://r.789695.n4.nabble.com/SARIMAX-as-extended-AR-I-MAX-tp3898726p3947880.html Sent from the R help mailing list archive at Nabble.com.