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,
  • The course is designed for those who wish to develop their time series forecasting skills using R programming language
  • 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.
    • Data Science for Operational Researchers Using R
    • Foundations of OR: Statistical Methods in OR: Forecasting
    • Follow on to Forecasting: ARIMA modelling for forecasting

     

    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
  • Statistical Methods in OR: Forecasting
  • Follow on to Forecasting: ARIMA modelling for forecasting

 

 

Want to run this course in-house? Enquire about running this course in-house

Meet the tutor

Simon Walkowiak

Simon is the director at Mind Project Limited and a former Ph.D. researcher in Artificial Intelligence at the Bartlett Centre for Advanced Spatial Analysis (University College London) and the Alan Turing Institute in London. Simon holds BSc (First Class Honours) in Psychology with Neuroscience and MSc (Distinction) in Big Data Science.

He conducts and manages research projects on computational optimisation of novel AI approaches applicable to large-scale datasets to predict human behaviour and spatial cognition. Simon is the author of “Big Data Analytics with R” (2016) – a widely used textbook on high-performance computing with R language and its compatibility with ecosystem of Big Data tools e.g. SQL/NoSQL databases, Spark, Hadoop etc.

Apart from research and data management consultancy, during the past several years, Simon has taught at more than 180 in-house or open-to-public statistical training courses (in R, Python, SQL and Scala for Spark languages) in the UK, Europe, Asia and USA. His major clients include organisations from finance and banking (HSBC, RBS, GE Capital, European Central Bank, Credit Suisse etc.), research and academia (GSMA, CERN, UK Data Archive, Agri-Food Biosciences Institute, Newcastle University etc.), health (NHS Improvement, Public Health England, NHS England), transport (TfL, Steer Group), insurance (Liberty IT) and government (Home Office, Ministry of Justice, Department of Health & Social Care, Government Actuary’s Department etc.).