Forecasting with Linear Regression Models
Workshop Overview
Welcome to the Forecasting with Linear Regression Models workshop materials!
This workshop focuses on the foundation of feature-based forecasting with linear regression using R. The workshop is beginner-friendly and covers the following topics:
- How to frame a time series as a regression problem
- Feature engineering techniques for time-aware data
- Modeling trend, seasonality, outliers, and breaks
- Practical tips for evaluation and validation
Workshop Materials
The workshop is organized into 7 notebooks:
📊 Part 1: Data Exploration and Analysis
- Data - Introduction to the datasets and time series objects
- Time Series Decomposition - Understanding trend, seasonal, and irregular components
- Correlation Analysis - Analyzing autocorrelation and partial autocorrelation
- Seasonal Analysis - Deep dive into seasonal patterns
🎯 Part 2: Forecasting Models
- Modeling Trend - Building linear and piecewise trend models
- Modeling Seasonality - Incorporating seasonal patterns and structural breaks
- Probabilistic Forecast - Creating simulation-based forecasts with uncertainty quantification
Environment Settings
To ensure a smooth workshop experience, you can set up your R environment using one of the following options:
Option 1: Dev Container (Recommended)
If you’re using VSCode, you can use the Dev Container extension to run the workshop in a pre-configured containerized environment:
- Install Docker Desktop
- Install the Dev Containers extension in VSCode
- Open this repository in VSCode
- When prompted, click “Reopen in Container” or run the command “Dev Containers: Reopen in Container”
The container includes all required R packages and dependencies pre-installed.
Option 2: Using renv
If you prefer to work in your local R environment, you can use renv to install the exact package versions used in the workshop:
Ensure you have R (version 4.0 or higher) installed
Open R in your preferred IDE (Positron/RStudio/VScode) in the project directory
Install renv if not already installed:
install.packages("renv")Restore the environment using the provided
renv.lockfile:renv::restore()
This will automatically install all required packages with the exact versions specified in the renv.lock file.
About the Workshop
When: December 1st, 2025 from 9am to 11am PST
Where: Online
Registration: Eventbrite
This workshop is for practitioners (data analysts/scientists) who wish to learn how to forecast with regression models. It assumes no background in time series analysis and forecasting, but assumes basic knowledge of probability, linear regression, and R programming.