2

Is there a auto.sarima function in R programming. I know there is auto.arima function in r programming. But I am not sure if there is also auto.sarima function or program. If there is a way to generate the order of p,d,q and P,D,Q values, please let me know. I appreciate you help.

> data("departures")
> auto.arima(Enrolled_COUNT, D=1)
Series: Enrolled_COUNT 
ARIMA(0,1,1) 

Coefficients:
          ma1
      -0.4169
s.e.   0.1777
Phil
  • 7,287
  • 3
  • 36
  • 66
KApril
  • 632
  • 1
  • 8
  • 20
  • Doesn't auto.arima cover this already? – Dason Aug 31 '20 at 14:20
  • auto.arima generates only p,d,q values but not seasonal order (P,D,Q) values. I am trying to find out if there is a way to auto generate those values. – KApril Aug 31 '20 at 14:23
  • Are you sure about that? Seems like P,D,Q are there to me https://www.rdocumentation.org/packages/forecast/versions/8.12/topics/auto.arima – Dason Aug 31 '20 at 14:24
  • Added my program and results. As you can see just the ARIMA order was generated but not the seasonal order. – KApril Aug 31 '20 at 14:28
  • 1
    Just because you didn't end on a seasonal model doesn't mean it didn't consider seasonal models. – Dason Aug 31 '20 at 14:37
  • Attach a reproducible example for the data `departures`. https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example – cdcarrion Aug 31 '20 at 14:49

1 Answers1

1

The function auto.arima can detect the seasonal part by using the parameter seasonal = T as in the answer here.

cdcarrion
  • 574
  • 6
  • 22
  • Hi, Yes it works, thank you. Great to have you here!! – KApril Aug 31 '20 at 14:54
  • but though I have got some warning after I used ```seasonal=T```. Any idea why? ```Warning message: The chosen seasonal unit root test encountered an error when testing for the second difference. From stl(): series is not periodic or has less than two periods 1 seasonal differences will be used. Consider using a different unit root test``` – KApril Aug 31 '20 at 14:55
  • you can see [this](https://stats.stackexchange.com/a/404737/249601). – cdcarrion Aug 31 '20 at 15:00