Introduction To Making Forecasts From Time-Series Models in R

Поделиться
HTML-код
  • Опубликовано: 21 авг 2024
  • Data available here: course.naturec...

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

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

    Well done! Very good explanation of time series.

  • @rachelletallman1104
    @rachelletallman1104 Год назад +2

    Is there a way to compare ARIMA models across different variables? I noticed you had 5 variables in your dataframe but when you create the time series object you only select one of the columns. I have hourly temperature data I would like to compare across sites. Is ARIMA still the right way to go?

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

    Why are the argument (0, 0, 0) for the Arima function? great vid btw, subscribed

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

      Thanks! The (0, 0, 0) there is setting the model parameters/structure. Since they are all zeros (no autoregressive component, no integration, no moving average component) the model then just becomes the mean value with normally distributed error. So we're just starting with the simplest model possible. If you're interested in learning more about what those three components of ARIMA models are checkout these two videos:
      * ruclips.net/video/hD13nv8SK6A/видео.html
      * ruclips.net/video/6gmCNGRrRBs/видео.html

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

      @@weecology Thank you!!

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

      @weecology gives a nice answer, but to illustrate, even further suppose you use ARIMA(p,0,q) (i.e. there are no differencing parameters), which is basically an ARMA(p,q):
      the theoretical formula of ARMA(p,q,) is:
      yt = constant + sum of p lags of past y values + sum of q lags of past error terms
      When p = q = 0,
      yt = constant (i.e. your average)

  • @user-vw1gf9fp9l
    @user-vw1gf9fp9l 6 месяцев назад

    Thanks for tthis lecture, i kindly want to ask, is there are larger part of this dataset, i want to explore more approaches from all your lecture series..... i mean like, where cam i get the original dataset

    • @weecology
      @weecology  6 месяцев назад

      You’re welcome!
      The full dataset is available here: zenodo.org/doi/10.5281/zenodo.1215988
      There is a R package designed to make it easy to download and get the pieces of the data you want in useful formats as well: weecology.github.io/portalr/
      Let us know if there is anything else we can do to help as you explore the data. You are welcome to email us at portal@weecology.org

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

    Really nice video! I am trying to to a forecast useing times series regression is this posiable to do useing the forecast package?

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

      Thanks! It depends a bit on what kind of model you're interested in using. Both the ARIMA based models illustrated here and the exponential smoothing models in forecast will take an xreg argument for drivers that will be modeled linearly. If you want to build what I'd call a time-series linear model then that's available in the next generation package that is slated to replace forecast, fable (fable.tidyverts.org/reference/TSLM.html). Fable also lets you do the same things with ARIMA & ETS as forecast (as well as some more complex approaches), so it probably has what you need fable.tidyverts.org/index.html

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

      @@weecology wow thank you for your help. You should make a video on that pack too

  • @jayveemagnaye462
    @jayveemagnaye462 7 месяцев назад

    Hi @weecology thankyou for your excellent explanation of time series this save me for my defense. btw how can i put dygraph for that.

    • @weecology
      @weecology  7 месяцев назад

      You're welcome! Glad it helped! I don't work with the dygraph package frequently, but here's the basic idea based on my understanding. dygraph takes a group of time-series as input. In this case if you want to plot the predictions (like shown in the Predicted Lunch Deaths example on rstudio.github.io/dygraphs/) then we just need to get them in the right format. To make this simpler let's work with a version of the seasonal Arima that only has 1 set of prediction intervals:
      # rerun the forecast with just a single prediction internal
      seasonal_arima_forecast = seasonal_arima_model, h = 36, level = 80)
      # store the data as a group of time-series
      forecasts_for_dygraph = cbind(lower = seasonal_arima_forecast$lower, mean = seaonal_arima_forecast$mean, upper = seasonal_arima_forecast$upper)
      # make a dygraph following the instructions in the example
      dygraph(forecasts_for_dygraph) %>% dySeries(c("lower", "mean", "upper")
      Hope that helps!

  • @Dr.Abasin
    @Dr.Abasin 11 месяцев назад

    Hi
    Is there any chance you can check my assignment report on Forecasting in Business and Economics on time Series and analysis.
    Just corrections and see if it meets the objectives of the report. Thanks

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

    what are basic temporal statistical summaries in time series?

  • @user-om9pw9sw8b
    @user-om9pw9sw8b Год назад

    thanks

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

    Is it possible to make rstudio produce a table vs a plot graph to display the forecasted numbers?
    If I want to forecast 2023 sales, how can I see the values arima is producing in the plot graph?

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

      Definitely. The data for the point forecast is stored in the $mean object, which you can access using your_forecast$mean. The video shows how to extract this information at around 11 minutes. You can also extract the upper and lower prediction intervals using $upper and $lower as shown in ruclips.net/video/hGlnIVYFUgg/видео.html.

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

    Which is the next video please?

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

    Hi, sorry, what is NDVI? I have sales and I can see correlations at 1 month as well as at 5th, and annual.

    • @weecology
      @weecology  10 месяцев назад +1

      NDVI is a remotely sensed measure of greenness that captures how much vegetation there is. See en.wikipedia.org/wiki/Normalized_difference_vegetation_index

    • @user-jg2py7jj8c
      @user-jg2py7jj8c 10 месяцев назад

      Where can i get the dataset you have used. i want to practice while following the video. Thanks@@weecology

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

      @@user-jg2py7jj8c It's posted here course.naturecast.org/data/portal_timeseries.csv. I'll also add a link to the description

    • @user-jg2py7jj8c
      @user-jg2py7jj8c 10 месяцев назад

      @@weecology Thanks alot

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

      @@user-jg2py7jj8c You're welcome! If you're interested in this stuff we have significantly expanded written tutorials using the newer fable R package. Here's the key lessons:
      * course.naturecast.org/lessons/r-time-series-modeling/
      * course.naturecast.org/lessons/r-time-series-modeling-2/
      * course.naturecast.org/lessons/r-time-series-modeling-3/

  • @researchmadeeasybydr.tanvi7663
    @researchmadeeasybydr.tanvi7663 9 месяцев назад

    Hi, my forecast plot looks like a straight line. Can you provide me with an explanation? Great video btw

    • @weecology
      @weecology  9 месяцев назад +1

      Thanks! For which model?

    • @researchmadeeasybydr.tanvi7663
      @researchmadeeasybydr.tanvi7663 9 месяцев назад

      ARIMA @@weecology

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

      @@researchmadeeasybydr.tanvi7663 Is this with the data in the video or your own data? If you run the name of your model what is the output?

    • @researchmadeeasybydr.tanvi7663
      @researchmadeeasybydr.tanvi7663 9 месяцев назад

      thank you for reply. own data.
      Series: cefta_afro_res
      ARIMA(0,1,0)
      sigma^2 = 110.1: log likelihood = -37.7
      AIC=77.4 AICc=77.9 BIC=77.7@@weecology

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

      @@researchmadeeasybydr.tanvi7663 OK, thanks. If we look at the model description is it ARIMA(0, 1, ). Assuming that you fit this with `auto.arima()`, this tells us that model that the best fitting model has no autoregressive component (the first zero), a first order difference (the 1 in the middle), and no moving average component (the last zero). This means that there is a trend, but once it is accounted for there is no meaningful autocorrelation in the time-series. As a result, your forecast is a directional trend with no wiggles in it. Does that help?

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

    what if i want r studio to read data from a .txt file?

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

      It depends on how the data is structure in the .txt file. If it's comma delimited you can do it the exact same way. If there is a different delimiter the you specify that delimiter using the optional `sep` argument in `read.csv`

  • @user-lu5vf6lb4c
    @user-lu5vf6lb4c 3 месяца назад

    can i have the source code please ?

    • @weecology
      @weecology  3 месяца назад +1

      Source code for this lesson is available in the text version of the tutorial here: course.naturecast.org/lessons/r-intro-to-forecasting/r_tutorial/, but note that it's been updated to use the newer fable package. The text version of this tutorial is available in our GitHub history here: github.com/weecology/forecasting-course/blob/2e7be6bc4f0aeb265ab55836cdf535f4a863d6c9/content/lessons/R-intro-to-forecasting/r_tutorial.md
      In general you can find text versions of all tutorials at course.naturecast.org/

    • @user-lu5vf6lb4c
      @user-lu5vf6lb4c 3 месяца назад

      @@weecology thanks for the immediate response !

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

      @@user-lu5vf6lb4c you're welcome!