Foundations of OR: Time Series Forecasting in R
Gain the theoretical and practical understanding on how to process and model time series data in your analytical and forecasting workflows using R programming language. This course will provide you with essential knowledge to allow wrangling, processing, analysis and forecasting of time series data in the R programming language.
Description
- This tutor-led training course will provide you with essential knowledge to allow wrangling, processing, analysis and forecasting of time series data using specialised libraries such as ts, xts, zoo, tsibble, fable and forecast in the R programming language.
- Whether you wish to analyse financial data, predict sales or revenue, or understand temporal patterns in your social, health or economic data, this course will provide you with theoretical and practical understanding on how to process and model time series data in your workflows using R programming language.
Learning objectives
- Learn to manipulate the imported data and transform the processed data into supported time series R objects.
- Perform essential time series exploratory operations, calculate selected moving/rolling single-value statistics, convert between differing time frequencies, visualise and prepare data for predictions.
- Implement popular industry-standard univariate and multivariate time series forecasting methods such as simple exponential smoothing, Holt’s linear trend and Holt-Winter’s seasonal methods, as well as estimating linear, non-linear and locally-weighted trends with multivariate regression models.
Topics
Day 1 Session 1: Working with time series data in R
- Creating time series objects and data structures in R,
- Converting between different time series objects,
- Importing time series data,
- Pre-processing time series data,
- Plotting time series data with ggplot2 and interactive visualisation packages e.g. plotly and highcharter,
- Downsampling and upsampling time series.
Day 1 Session 2: Time series analysis with R
- Building on exploratory analysis of time series: moving averages, lagged values and rolling statistics,
- Evaluating forecasting accuracy and measuring the error,
- Simple forecasting approaches: naive model, average model, linear trend model.
Day 1 Session 3: Univariate time series forecasting methods
- Introduction to univariate time series methods: simple exponential smoothing, Holt’s linear trend and Holt-Winter’s seasonal methods,
- Exponential smoothing state space models.
Day 1 Session 4: Multivariate time series forecasting methods
- Multiple linear regression with time series data,
- Polynomial regressions with time series data.
Audience
The course is designed for those who wish to develop their time series forecasting skills using R programming language.
Course format
- The live instructor-led tutorial sessions will consist of a mixture of practical demonstrations, computer-based tutorials, presentations, and discussions.
- R packages
- The course doesn’t use any Java-based R packages – this is to avoid certain common issues with Java Virtual Machine and rJava package installation. However, during the course we will be making the most of other (non-Java) R packages which simplify many typical operations or add useful and well-optimised functionalities.
- A list of R packages will be shared prior to the start of the course which you may pre-install if you think you may not have full admin rights to your PC.
- Additional resources and recommended reading
- All resources (R code scripts, presentation slides, and data files used during the course as well as additional materials such as research articles) will be provided to the delegates before the first session of the course.
- The following free online textbook is recommended as the preferred pre-course and also as a follow-up reading:
“Forecasting: Principles and Practice” by Rob J Hyndman and George Athanasopoulos: https://otexts.com/fpp2/ (2nd edition, based on the forecast package) and/or https://otexts.com/fpp3/ (3rd edition, based on the fable package). Both editions contain numerous examples of time series analysis and forecasting methods implemented in R, some of which will be taught in detail during this course.
Related courses
- Data Science for Operational Researchers Using R
- Foundations of OR: Statistical Methods in OR: Forecasting
- Follow on to Forecasting: ARIMA modelling for forecasting