2
$\begingroup$

I've found the internet fairly unhelpful with this issue and thought I'd turn. I have the following arima model:

y = data$produced_diff
regs = data[,c(10,11,12)]
    
ar1ma1x = arima(y, xreg=regs, order=c(1,0,1))

Pretty simple. The data is daily and I'm trying to add a weekly seasonality. I'm currently doing it like this:

ar1ma1xS = arima(y, xreg=regs, order=c(1, 0, 1),
            seasonal = c(0, 0, 7))

I ... think this is right? It runs and gives slightly different output. But I find the documentation fairly opaque.

$\endgroup$
2

1 Answer 1

3
$\begingroup$

You may find it easier to use the Arima() or auto.arima() functions from the forecast package, than using the arima() function from the stats package.

Either way, your time series y should be a ts object with frequency set to 7.

Setting seasonal = c(0,0,7) is unlikely to give a good model. Usually, the seasonal orders would be no more than 2.

If you used the auto.arima() function, the orders will be selected automatically:

fit <- auto.arima(y, xreg=regs)

Documentation for auto.arima() is here: https://otexts.com/fpp2/arima-r.html

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.