Time series prediction using R

前端 未结 4 461
暗喜
暗喜 2021-02-06 08:17

I have the following R code

library(forecast)
value <- c(1.2, 1.7, 1.6, 1.2, 1.6, 1.3, 1.5, 1.9, 5.4, 4.2, 5.5, 6, 5.6, 
6.2, 6.8, 7.1, 7.1, 5.8, 0, 5.2, 4.6,         


        
4条回答
  •  走了就别回头了
    2021-02-06 09:03

    auto.arima() returns the best ARIMA model according to either AIC, AICc or BIC value. Based on your 'value' dataset it has probably chosen an ARMA(1,0) or AR(1) model which as you can see tends to revert back to the mean very quickly. This will always happen with an AR(1) model in the long run and so it's not very useful if you want to predict more than a couple of steps ahead.

    You could look at fitting a different type of model perhaps by analysing the acf and pacf of your value data. You would then need to check to see if your alternative model is a good fit for the data.

提交回复
热议问题