ARIMA Forecasting in R Part 2 - Decomposition of the Data

Поделиться
HTML-код
  • Опубликовано: 26 дек 2024

Комментарии •

  • @Patrizsche
    @Patrizsche 4 года назад +10

    It looks like you misinterpreted the result of the ADF test... the alternative is that the series is stationary, and p is low (.016) meaning you reject the null and retain the alternative. Also looking at the plot it looks like mean & variance are constant, consistent with stationarity

    • @vinodkukanur
      @vinodkukanur 3 года назад +2

      Yep! I also confused by the statement. p-value is low (0.016) but still, he says data is non-stationary.

    • @MiClaDa
      @MiClaDa 3 года назад

      Exactly! Would be nice to get some clarity into this!?

  • @shaahidhirfaansha78
    @shaahidhirfaansha78 Год назад

    In the decomposition plot on the right end side we can see some rectangular boxes. What are those and does that signify anything?

  • @affectionlifeaffliction
    @affectionlifeaffliction 5 лет назад +2

    Greetings! First of all, thanks for sharing your awesome videos! I am a beginner in time series analysis . I have a two question regarding the Augmented Dicket-Fuller Test. The first is about the p-value: your test resulted in a p-value of 0.01637, which is below 0.05 (small p-value, reject null hypothesis of non-stationary) However, you affirmed to be non-stationary. The second is about the resulted test of my data as follows:
    Warning message:
    In adf.test(count_ma, alternative = "stationary") :
    p-value smaller than printed p-value
    Looking at my ts plot, I find no way that this can be stationary. After doing some research, it was suggested to add the "diffinv" function (Yet, i dont know what does it means):
    adf.test(diffinv(count_ma), alternative="stationary")
    p-value resulted in 0.77

    • @techknowhow4802
      @techknowhow4802  5 лет назад +1

      the diffinv() function computes the inverse function of the lagged differences function (diff). Using non-stationary time series data in models can produce unreliable and spurious results and leads to poor understanding and forecasting. The solution to the problem is to transform the time series data so that it becomes stationary. This is usually done through differencing. If you look through the videos you will see differencing taken into account in there. This is how you can transform non-stationary time series data to stationary and then do accurate forecasts based upon this. Watch Part 2 in this shorter video series I did afterwards. It will show you more on differencing to make non-stationary data stationary. ruclips.net/video/B-RaY1Dgsfk/видео.html

    • @affectionlifeaffliction
      @affectionlifeaffliction 5 лет назад +1

      @@techknowhow4802 Thank you very much for your kind reply! I have watched all your 6 videos of this topic, as well as the set of videos related to Dealing with Seasonality and Quick ARIMA. Awesome!

  • @sd-nk4ou
    @sd-nk4ou 4 года назад +2

    Thanks for this series. I have a question for you -
    On line 832, why do you use freq = 30? Shouldn't we be using freq=7 since we are considering weekly data (similar to order)?

    • @techknowhow4802
      @techknowhow4802  4 года назад

      Depends upon the length of data also. Look at the type of data and length and then use what works best. :)

    • @hamnetsouthafrica5787
      @hamnetsouthafrica5787 4 года назад

      @@techknowhow4802 I understand the ma portion but as sandi says why not use 7 for a weekly ma? I would think 30 would give a monthly ma.

  • @gphsvideos8296
    @gphsvideos8296 5 лет назад +1

    When creating the ts object in line 832, why is the frequency = 30?

    • @techknowhow4802
      @techknowhow4802  5 лет назад +1

      As a general rule of thumb, the frequencies used here should be 4 for quarterly, 12 for month, 52 for weekly and 365 for yearly. In some cases it depends upon the length of the dataset and the dataset itself. If one has an incomplete or smaller then ideal dataset then using lower numbers is required or necessary. Also, sometimes changing the frequency can work to aid in overfitting the dataset and in mildly improving the accuracy of a model.
      In this case, being that I did this a while ago, I am not sure, but I have run it on datasets with less then a full year and maybe this was left that way from an earlier run? Not sure. Thanks for pointing that out and thanks for watching the videos on my channel. Be sure and check out the new auto arima video I just uploaded for super-quick forecasting in R. ruclips.net/video/iwRtpJDDw5M/видео.html