Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

time series - Auto.arima application in R with sub-daily data - No seasonality given

I'm working on a R code and my aim is to make forecasts with a model chosen by applying auto.arima function on my data. These are recorded every 6 minutes, so we're dealing with sub-daily data.

  Time                  RMS
   <dttm>              <dbl>
 1 2020-05-01 00:00:00  5.2 
 2 2020-05-01 00:06:00  4.77
 3 2020-05-01 00:12:00  4.99
 4 2020-05-01 00:18:00  5.02
 5 2020-05-01 00:24:00  4.57
# ... with 5,750 more rows

I have 10 measures per hour, so 240 observations per day. I converted this dataframe in both xts or ts object, with frequency = 240, since I would like to show a daily seasonality.
When I use xts() and auto.arima, seasonality is not captured, and it returns this model instead:

Series: new_series
ARIMA(2,0,1) with non-zero mean 

Coefficients:
         ar1      ar2      ma1    mean
      1.3250  -0.3340  -0.6808  4.5282
s.e.  0.0265   0.0258   0.0205  0.1678

sigma^2 estimated as 0.1305:  log likelihood=-2306.56
AIC=4623.11   AICc=4623.12   BIC=4656.41

While, when I use ts() with frequency 240 and auto.arima() it gives me this error:

Error in polyroot(c(1, testvec)) : root finding code failed 

Could this be related to the fact that ARIMA models do not work with sub-daily data and multiple seasonalities? Is there a way to extract daily and sub-daily seasonalities with auto.arima command?

Thank you in advance.

question from:https://stackoverflow.com/questions/65848292/auto-arima-application-in-r-with-sub-daily-data-no-seasonality-given

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...