Time Series Analysis and Forecasting using ARIMA models in R

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

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

  • @HiltonFernandes
    @HiltonFernandes 4 месяца назад +1

    Great presentation: very clear and yet very informative, far from trivial.
    Congratulations !

  • @nathasyapramudita6312
    @nathasyapramudita6312 5 месяцев назад +1

    Your video is the best explaination about ARIMA model so far in youtube, thanks for the information :)

    • @KunaalNaik
      @KunaalNaik  5 месяцев назад

      Glad it was helpful!

  • @yokokoko9748
    @yokokoko9748 3 года назад +1

    I just learned three weeks of work in 8 minutes. You can't beat expertise!! Thank you, Kunaal!!!

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

      @kunaal, do you offer tutoring? I am a business analytics MS candidate, will need some help

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

    This is all you need to grasp an idea of how to build an ARIMA model using R. No more, no less, great video.

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

    Excellent lesson, I studied the whole semester but you explained it in 10 minutes

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

      I am glad you found it useful :) I usually start by learning in the context in which it is applied and then learn the theory later.

  • @bheemannanayak6728
    @bheemannanayak6728 3 года назад +3

    Very nice explained but I did understand p value from ACF and q value from PACF plot for AR and MA respectively.

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

    Very Impressive.. Alhamdulillah...thank u

  • @talkontech8524
    @talkontech8524 3 года назад +1

    Thank you for Amazing explanation. I had a doubt regarding the forecasting step where the model was passed as paramter, but I read that the time series data can also be passed. Coukd you explain how that works. Thank you

  • @jaelee5805
    @jaelee5805 9 месяцев назад

    This is a 😀😀great video for beginners like me!! Thank you

  • @shakirullah5840
    @shakirullah5840 4 года назад +1

    Thank you very much for the nice video that is so much helpful. Would you please explain the out put as the forecast results? What is really mean by Lo 80, Hi 80, Lo 95, Hi 95 and Point Forecast?

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

      Those are just upper and lower ranges of the forecast.

  • @chenstephen636
    @chenstephen636 3 года назад +1

    Great video! I wonder if we would need to transform the predicted value, given our data has been differenced twice? If so, how can we do it in R?

  • @raminguyen7940
    @raminguyen7940 Год назад +1

    Can you explain more about how to determine the p and q values? I am not quite understanding. Thanks.

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

    Nicely explained but don't we get p value from ACF plot and q value from PACF plot for AR and MA respectively?

  • @parasnathverma1405
    @parasnathverma1405 3 года назад +3

    Sir, I did the same steps, but my forecasted value is showing constant for upcoming years. How to solve this issue. Please guide

  • @bumpagab
    @bumpagab 2 года назад +1

    So well done. Thank you so much!

  • @danielgutierrez536
    @danielgutierrez536 3 года назад +1

    It seems that the series contain seasonality as the coefficients for the MA part are significant for t=12,24,.... Could expand on this issue? Thank you.

  • @daphnechindundu1838
    @daphnechindundu1838 3 месяца назад

    Thank you so much

  • @rabinthapa9006
    @rabinthapa9006 3 года назад +1

    Thank you its amazing

    • @KunaalNaik
      @KunaalNaik  3 года назад +1

      I am glad you liked it :)

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

      @@KunaalNaik I was not sure how to predict the p,d and q value but now I know with Akaike information we can know which is the best p d and q order to be set using R

    • @rabinthapa9006
      @rabinthapa9006 3 года назад +1

      @@KunaalNaik I am trying it for a secular trend i.e yearly, for this how shall I set the time in command?

    • @kunaal_coaching
      @kunaal_coaching 3 года назад +1

      @@rabinthapa9006 For d (stationarity test) p(pacf plot) and p (acf plot) This is the method used to select the p,d,q. Hope this helps.

    • @KunaalNaik
      @KunaalNaik  3 года назад +1

      @@rabinthapa9006 You can skip that argument if it's yearly.

  • @ravindrasinghs3014
    @ravindrasinghs3014 3 года назад +1

    Nice one & Simple

    • @KunaalNaik
      @KunaalNaik  3 года назад +1

      I am glad you liked it!

    • @ravindrasinghs3014
      @ravindrasinghs3014 3 года назад +1

      @@KunaalNaik Yes Understood. Thanks. Looking for the same using Python from your end!

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

      @@ravindrasinghs3014 Will work on a Video :)

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

    Hi, wondering why do we need check stationary so many times? The orginal, then the diff = 1, then diff = 2?
    Feel like it is a stubborn way, once it is not stationary after testing the original, it should be regards as not stationary. We should stop but not so insist to prove that it is while it is not.
    Sorry I am new :D
    Can anyone help to explain?

    • @hilmanhilmi5789
      @hilmanhilmi5789 2 года назад

      By applying the diff = 1 or diff = 2, it will help the series to be stationary thus making the forecast reliable

    • @paulobritto681
      @paulobritto681 2 года назад

      Also, this tells you how far you should as far as differentiating in order to set the d parameter.

    • @paulobritto681
      @paulobritto681 2 года назад

      plus, If I am not mistaken, there is a function (ndiff?) which retrieves the best d in order to turn your series into a stationary one.

  • @sachithralakshani3509
    @sachithralakshani3509 2 года назад

    Nice explanation on ARIMA...

  • @katerina8287
    @katerina8287 3 года назад +1

    Very good work! One question only. Does the ADF test you did recognizes that there is unit root? You mentioned only the stationarity problem. And if there is unit root how can we deal it?

    • @KunaalNaik
      @KunaalNaik  3 года назад +1

      You can try some other tests such as Elliott-Rothenberg-Stock Test, Schmidt-Phillips Test, Phillips-Perron (PP) Test and Zivot-Andrews test.

  • @somnaik1819
    @somnaik1819 3 года назад +1

    The k value in the adf function refers to the number of lags to be used when calculating the test statistic. How do we know this is 12?

    • @paulinetan3395
      @paulinetan3395 3 года назад +1

      12 refers to monthly data. there is 12 months in one year.

  • @shakirullah5840
    @shakirullah5840 4 года назад +1

    The link you provided for code and data download is not working. can you pls help me ?

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

      Here is the link for Data - github.com/KunaalNaik/YT_R_Shiny_Dashboards/tree/master/1%20Basic%20App

  • @phamvuquynhnhu2089
    @phamvuquynhnhu2089 3 года назад +1

    Can you help me to illustrate the way to automatically select (p, d, f) quickly without having to go through each step of running ACF and PACF to choose?

    • @KunaalNaik
      @KunaalNaik  3 года назад +1

      I am afraid that won't be possible. We need to identify the parameters. You could try Auto Arima. However, it does not get it right often.

    • @phamvuquynhnhu2089
      @phamvuquynhnhu2089 3 года назад +1

      @@KunaalNaik Thank you Sir. However, can we use this model for multiple items at the same time?

    • @KunaalNaik
      @KunaalNaik  3 года назад +1

      @@phamvuquynhnhu2089 Do one model for one item at a time. This way the model is better interpretable.

    • @phamvuquynhnhu2089
      @phamvuquynhnhu2089 3 года назад +1

      @@KunaalNaik Thank you Sir for your support.

    • @KunaalNaik
      @KunaalNaik  3 года назад +1

      @@phamvuquynhnhu2089 Let me know how it goes or want to connect on your analysis. We could brainstorm together.

  • @ryanthompson638
    @ryanthompson638 3 года назад +1

    what about 7 tells you it has a high significance to the model? the bar associated to 7 on the pacf looks unassuming compared to the other bars. How did you choose 7?

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

      We can choose either 5,6 or 7. Went with 7 as is was the nearest and highest among the 3. We can choose others too. You want to check the MAPE. Choose the p which has the highest MAPE.

  • @ainafaqihah8328
    @ainafaqihah8328 3 года назад +1

    do you have codes on arima for electric consumption

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

      I don't have the directly. However, you can follow the method shown above. If it does not work try other methods such Holt's winter or ARIMAX.

  • @sunbreezy3935
    @sunbreezy3935 3 года назад +1

    Thank you for this. It's a really helpful tutorial. My ACF and PACF plots seem to follow the same distribution as yours. However, the scale of my lag axis is between 0 and 2. Do you know why this might be the case? I have a feeling its something to do with setting the frequency to 12 for the sales_ts variable that we did at the start.

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

    > emas_ts

  • @avijitghorai5535
    @avijitghorai5535 3 года назад +1

    if is it stationary then how can i get the "d" value???

    • @KunaalNaik
      @KunaalNaik  3 года назад +1

      Then d = 0 if the series is already Stationery :)

  • @nikhiljagtap6799
    @nikhiljagtap6799 4 года назад +1

    sir my project is crime forecasting
    i use auto.arima code in r then my ARIMA model is (0,0,0)
    so i confuse the forecasting
    plz ans to me

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

      I also face the same problem. If your problem is solved then please tell me how can I do??

  • @megaladevi4430
    @megaladevi4430 10 месяцев назад

    Hello sir
    My arima model order (1, 0,0) with non zero mean sir
    What can i do
    It is arima model are Ar model

  • @avijitghorai5535
    @avijitghorai5535 3 года назад +1

    when i use the auto arima function in my data, the adq value given "000". and when i forecast by this adq value(000) the next all years forecasting data given same. why the adq value given "000"?? and why the all future forecasting value is given same???

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

      Avijit Auto Arima is not reliable in many cases. Do you want to connect and lets see the data together and figure what we can do?
      Email me at fxexcel@gmail.com

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

      @@KunaalNaik i just sent a mail in this id please check.

    • @avijitghorai5535
      @avijitghorai5535 3 года назад +1

      @@KunaalNaik sir, please check your email, i have sent a mail to you.

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

      @@avijitghorai5535 Got your mail. let me check and get back to you.

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

      @@KunaalNaik ok sir.. thank you

  • @nitigyahanda3516
    @nitigyahanda3516 2 года назад

    For stationarity, do we not take the log of the time series values before differentiating?

  • @juniorclick4718
    @juniorclick4718 3 года назад +1

    Why did you use the original data rather than the differenced data to fit the arima model ?

    • @KunaalNaik
      @KunaalNaik  3 года назад +1

      In the ARIMA (p,d,q) The "d" is the difference. It automatically does the differencing :)

    • @lawanadamuismail6283
      @lawanadamuismail6283 3 года назад +1

      Because differenced data is no longer the original data that needed to make forecast

  • @new.challenges
    @new.challenges 3 года назад +1

    what if I have more than one product and data in days ?

    • @KunaalNaik
      @KunaalNaik  3 года назад +1

      Hi Dhanunjay, you can then build one model for each product. Also, days could used as a support to build models. However, it might be very volatile.

    • @new.challenges
      @new.challenges 3 года назад

      @@KunaalNaik thank you

  • @antonioaugustocamargo6246
    @antonioaugustocamargo6246 2 года назад

    I'm having this error:
    Error in UseMethod("forecast") : no applicable method for 'forecast' applied to an object of class "c('forecast_ARIMA', 'ARIMA', 'Arima')"
    Please, do you know how to fix this?

  • @farisabubackarshabukker8703
    @farisabubackarshabukker8703 3 года назад +1

    Which sales data is it ,cananyone reply

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

      I took this as sample. This is Sales of Milk :P

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

    Thank you!

  • @loversvtloki5835
    @loversvtloki5835 2 года назад +1

    How about sarima sir

    • @KunaalNaik
      @KunaalNaik  2 года назад

      ARIMA does not handle the Seasonal Component well. It is always slower than the original seasonality. SARIMA help fix that.

  • @nikeshdubey4129
    @nikeshdubey4129 3 года назад +1

    ❤️❤️

  •  2 года назад

  • @avijitghorai5535
    @avijitghorai5535 5 месяцев назад +2

    Sir, please send me your email id??

    • @KunaalNaik
      @KunaalNaik  5 месяцев назад

      kunaal@datasciencemasterminds.com

    • @avijitghorai5535
      @avijitghorai5535 5 месяцев назад

      @@KunaalNaik sir please see your email. I have sent an email to you

    • @avijitghorai5535
      @avijitghorai5535 5 месяцев назад

      Sir please check my email