
Get started with R by downloading and installing R and RStudio on Windows, launching them, and preparing your environment to install packages.
Learn how to install packages and import data in RStudio to kickstart time series analysis and forecasting in R.
Learn time series forecasting in R, including forecastable data, irregular and regular frequencies, three models, and steps for installing packages and loading libraries.
Identify what can be forecasted by three factors: understanding, data, and self-fulfilling prophecy. Explore examples like electricity demand and exchange rates, and note simple models plus neural networks.
Forecast using two data types: qualitative data from observations and interviews, and quantitative data from numeric past observations, while understanding how past time series patterns guide future forecasts.
Explore time series data, cross-sectional data, and panel data, with examples like Google stock prices over time, GDP per capita by state in 2020, and panel observations across years.
Explore time series data examples across regular and irregular intervals. Identify frequencies such as daily, monthly, quarterly, and annual for one entity like stock prices or rainfall.
Explore how time series forecasting uses seasonal patterns to predict future values. See how replicating observed patterns yields forecast ranges with 80% and 90% confidence intervals.
Explore three time series forecasting models: using explanatory variables as predictors, using past values as predictors, and dynamic regression that combines both, illustrated by electricity demand.
Define the forecasting problem, gather data, explore patterns and outliers, fit multiple models such as regression, exponential smoothing, ARIMA and dynamic regression, and evaluate accuracy across five steps.
Frame time series forecasting as predicting a range of futures by treating forecasts as random variables and using confidence intervals and prediction intervals to capture uncertainty.
Introduce time-series notations for observations at time t, including lag values y_t-1 and y_t-2, and lead values y_t+1, and explain information sets i_t or omega for forecasting.
Begin by plotting time series data in R to reveal trends, seasonal and cyclical patterns, and outliers, then set up time series objects and explore autocorrelation with the ACF.
Plot time observations to visualize time series, identify trends, seasonality, and anomalies, and tailor forecasting models that capture these patterns using real examples like passenger data and drug sales.
Explore time series patterns: trend, seasonal pattern, and cyclical pattern, learn to identify each type, note fixed frequency seasonal effects like weekend electricity demand, and choose suitable forecasts.
Explore time series patterns by examining four examples of seasonality, trend, and cyclicality. See seasonality without trend, downward trend without seasonality, rising trend with seasonality, and random white noise behavior.
Explore seasonal and seasonal subseries plots in time series analysis using R, uncovering trend and seasonality by comparing monthly observations across years with multiple plotting approaches.
Use scatter plots to explore the relationship between two time series, revealing direction and strength with electricity demand and temperature as examples.
Learn how to assess the direction and strength of the relationship between two time series using the correlation coefficient, from negative to positive correlations, including no and perfect correlations.
Explore autocorrelation in time series by examining correlation coefficients across lags and using plots of the autocorrelation function to reveal trend, seasonality, or white noise.
Learn how the autocorrelation function (ACF) and correlogram quantify a time series' relation to its lagged values, revealing seasonality and statistically significant spikes via a plotted graph.
Explore how the autocorrelation function (ACF) reveals trend and seasonality in time series using ACF plots, and how adjacent values show strong positive correlations that decay with lag.
Explore how to interpret ACF plots to detect trend and seasonality in time series, with R examples showing trend-only, seasonality-only, and both-pattern data.
Explore time series patterns, including trend, seasonal, and cyclical patterns, and learn about white noise series, a cyclical-only pattern with no autocorrelation, assessed via the auto correlation function in R.
Use the Ljung-Box test to determine if time series are white noise or show autocorrelation across lags, guided by p-values and spikes outside blue dashed lines.
Plot time series data as an object to visualize patterns and anomalies, identify trend, seasonal and cyclical patterns, and explore relationships with scatterplots, correlation, autocorrelation function, and the longbox test.
Explore the forecaster's toolbox for time series forecasting, covering four benchmark methods, simple baseline techniques, and how residual diagnostics and accuracy testing sharpen your models.
Explore four benchmark forecasting methods, focusing on the average method where future values equal the historical mean of past observations. Use seasonal naive and drift considerations when data are seasonal.
Explore the naive method of time series forecasting, where each forecast equals the last observed value, illustrated with quarterly sales and stock market examples.
This video explains the seasonal naive method of forecasting, predicting next season's value as the last observed value from the same season, illustrated with quarterly data and holiday sales patterns.
Explore the drift method of time series forecasting, a variant of the naïf method. Incorporate the average change observed over time into the last value for forecast horizons ahead.
Compare mean, naïf, seasonal naïve, and Dreft benchmark methods in R on seasonal quarterly data. This example uses a biotech asset and Australian beer production to forecast 11 quarters.
Explore four simple forecast methods in R, compare mean, naive, and drift against each other on a stock price dataset, and show how drift better captures trend.
Explore residual diagnostics in time series to assess forecast accuracy by analyzing residuals (y minus ŷ), ensuring they are uncorrelated with zero mean, constant variance, and approximate normal distribution.
Learn residual diagnostics in time series forecasting with R: compute residuals, test zero mean, constant variance, autocorrelation, and white noise via the longbox test with a naive method example.
Evaluate forecast accuracy by summarizing errors with MAE, RMSE, and MAPE. Note MAE and RMSE are unit dependent, while MAPE is unit free but undefined at zero.
Split your time series data into training and test sets to evaluate forecast accuracy on out-of-sample data using root mean squared error or mean absolute error.
Apply cross-validation to time series by splitting data into training and test sets, 70/30, and evaluate forecasts with mean squared error. Also use leave-one-out cross-validation by holding out each observation.
Master k-fold cross-validation for time series forecasting in R by splitting data into folds, training on k-1 folds, testing on held-out fold, and averaging mean squared errors to choose method.
Learn to perform time series cross-validation in R using one-step and multi-step horizons, with training and test sets to compute mean squared error and select the best forecasting method.
Compare forecast accuracy in R by splitting data into training and test sets, applying average, naive, and seasonal naive methods, and evaluating with accuracy metrics to choose the best model.
Explore cross-validation for time series forecast accuracy in R, comparing drift method one-step forecasts with in-sample errors and focusing on performance on unseen data.
Explore calendar, population, and inflation adjustments to transform time series data, making it comparable across periods. Learn how mathematical transformations normalize variability and support clearer analysis.
Apply Box-Cox transformation to stabilize non-constant variance in time series, choosing lambda and optionally using log transformation, then reverse the transformation to forecast on the original scale.
Learn how to compute prediction intervals around time series forecasts in R, using sigma and k values to build 80% and 95% confidence ranges for future scenarios.
Compare forecast methods: average, naive, seasonal like, and drift. Validate residuals with diagnostics and cross-validate using training and test splits to judge RMSE, MAE, and MAPE.
Explore time series regression models from simple and multiple linear regression to least squares, r-squared, residual analysis, and dummy variables for seasonal patterns to forecast with predictor selection.
Explore how a simple linear regression links X (explanatory variable) to Y (dependent) and predicts wage from education in a two-variable model.
Explore the graphical representation of a simple linear regression modeling the X–Y relationship, including intercept and slope, with education predicting wage and residuals to be discussed.
Explore predicting y from x using a simple linear regression line, compute fitted values and residuals, and prepare to apply the least squares method for estimating parameters.
Explore how to estimate the slope and intercept in a simple linear regression, and fit the best line by minimizing the sum of squared residuals using ordinary least squares.
Illustrates fitting a simple linear regression in R to model consumption as a function of income in a time series context, with ggplot2 visualization and interpretation of intercept and slope.
Introduce multiple regression models to explain a dependent variable y with several explanatory variables on the right-hand side, improving explanation and prediction by capturing interactions and nonlinear terms.
Explore how to interpret the coefficients in a multiple linear regression with two explanatory variables, including the intercept, and how changes in one predictor affect Y while holding others constant.
Explore goodness of fit in time series regression using R-squared to measure how much variation in Y is explained by X, and why adding predictors can inflate the value.
Extend simple regression to a multiple linear regression in R using time-series data to predict consumption from income, production, unemployment, and saving, and interpret coefficients and R-squared.
Compare fitted values with actual values to assess model fit in time series forecasting. Plot both series, draw a 45-degree line, and use R-squared to gauge goodness of fit.
Evaluate regression models by comparing predicted values to observed values, analyze residuals for autocorrelation with ACF and Ljung-Box or Breusch-Godfrey tests, and inspect residual histograms in R.
Evaluate a multiple linear regression model for consumption by analyzing residuals, testing for heteroscedasticity and serial correlation, and inspecting residual plots against income, production, savings, unemployment, and fitted values.
Explore how to read a regression output in R, including interpreting R-squared, the intercept, and slope coefficients, assessing direction, magnitude, and statistical significance via t-values and p-values.
Include a time trend as a predictor in your regression model to capture the series trend and improve forecast accuracy in time series data.
Learn how dummy variables predict time series outcomes by encoding presence or absence of attributes, including seasonal effects and outliers, to improve regression forecasts in R.
Use dummy variables to capture seasonal patterns in time series regression, modeling the day of the week to explain electricity demand with six dummies, leaving one day as reference.
Model quarterly beer production in R by including a trend and seasonal dummies to capture seasonality and interpret coefficients relative to the reference quarter.
Model intervention effects in time series by using dummy variables to capture periods with ad campaigns or coupons, regressing sales on dummy indicators and expenditures to quantify impact.
Learn how to model intervention effects in time series with dummy variables, covering transitory, permanent, and slope-change cases, using linear models for levels and changes and noting non-linear needs.
Select the best predictors from many candidates in time series regression using cross-validation, adjusted r-squared, aic/bic to optimize forecasting accuracy while considering degrees of freedom.
Use adjusted r-squared to select predictors by penalizing added variables for degrees of freedom, and choose the model with the higher adjusted r-squared when comparing X1 and X2.
Apply Akaike's information criterion (AIC) to select predictors by minimizing residual sum of squares, its log, and model complexity. Choose the lowest AIC among candidates.
Explore selecting predictors in time series forecasting using the corrected Akaike information criterion (AICc) to balance model complexity and residual error, especially with short time spans.
Learn to select predictors by comparing Schwarz’s Bayesian information criterion (BIC) and cross-validation, choosing the model with minimum BIC or CV and/or maximum adjusted R-squared for accurate forecasting.
Compare a four-predictor multiple regression with an income-only model to predict consumption. Use cross-validation and information criteria to select a parsimonious model, prioritizing better predictive accuracy and simplicity.
Explain best subset selection and subset regression with forward and backward stepwise methods, and overview sinkage methods—reach to question, lassalle, and elastic—alongside principal component analysis and partially squares.
Explore forward and backward stepwise regression for time series forecasting in R, using cross-validation to select predictors and improve model accuracy.
Learn to use stepwise and subset regression in R to select predictors, comparing models with regsubsets from the leaps library and the Bayesian information criterion for best accuracy.
Learn how to forecast a dependent variable with regression models by estimating coefficients, plugging in predictor values, and distinguishing ex-post forecasts from genuine forecasts.
Explore scenario-based forecasting in R by using regression models to forecast a variable under defined predictor scenarios, such as income, savings, and unemployment, and compare outcomes.
Explore non-linear regression concepts in time series forecasting, including piecewise regression and spline functions, and learn how log transformations can linearize relationships for forecasting.
Transform nonlinear relationships into linear models by logging the dependent and/or independent variables. Interpret the coefficients as percent changes or elasticities across level, log, and log-log specifications.
Explore non-linear regressions in time series, using linear fits, transformations, exponential piecewise and cubic splines, and piecewise regression with knots to model non-linear trends in Boston Marathon times.
Compare nonlinear time series models in R—linear, exponential, piecewise, and cubic spline—on marathon winning times; apply log and Box-Cox transforms and smoothing splines to forecast 2017–2026 with residual checks.
Compare homoscedasticity and heteroscedasticity in OLS to see where variance is constant versus dependent on education. See how residual patterns affect prediction intervals and when a Box-Cox transformation may help.
Identify and address multicollinearity in regression by using the variance inflation factor (VIF) to detect highly correlated predictors and decide which variables to drop for reliable inference.
Explore time series decomposition by extracting the principal component, seasonal component, and remainder from a time series, using additive or multiplicative models, moving averages, classical and state-of-decomposition methods to forecast.
Explore time series patterns—trend, seasonality, and cyclicality—and learn to decompose a series into these components for clearer forecasting.
Explore decomposing a time series into trend, cyclical, and seasonal components, with a remainder, using additive or multiplicative models to improve forecast accuracy.
Explore the additive model to decompose time series into seasonal, trend cycle, and remainder components, and compare with the upcoming multiplicative model.
Use the multiplicative model to decompose time series into trend, seasonal, and remainder components that vary with the series level, using log transforms to convert to additive form when needed.
Use seasonal adjustment to remove seasonal variation, choosing additive or multiplicative models to isolate the trend, cycle, and remainder components.
Extract the trend-cycle component from time series data with moving averages to smooth randomness, using an order five moving average window shown in the seven-day example in R.
Learn how to create moving averages of moving averages to achieve symmetry in time series analysis of quarterly data, starting with a four-period average and then a two-period average.
Apply moving averages in R to smooth time series and reveal long-term trends using an order-5 example on annual electricity data.
Learn classical decomposition of a time series with additive or multiplicative forms to extract trend, seasonal, and remainder components using moving averages and seasonal indices for quarterly, monthly, or daily.
Apply classical decomposition in R with a multiplicative model to a monthly time series, extracting trend cycle, seasonal, and remainder components, noting end-point gaps and fixed seasonality.
Apply x11 decomposition, an accelerated time series method from the Census Bureau for quarterly or monthly data, decomposing into trend-cycle, seasonal, and remainder components, with a slowly varying seasonal pattern.
Explore the seats decomposition method to extract cycle, seasonal, and remainder components from quarterly or monthly time series data using an R example.
Learn how STL decomposition uses the loess function to split a time series into trend, seasonal, and remainder components in R. Use the method for forecasting with these decomposition methods.
Decompose a time series into cycle, seasonal, and remainder components to understand history, then forecast the seasonal component with a seasonally naive method and the seasonally adjusted component using SDL.
This lecture covers time series decomposition into trend, cycle, seasonal, and remainder components, and contrasts additive versus multiplicative models, plus overview of classical, accelerated, severe, and SDL decompositions for forecasting.
Explore exponential smoothing to forecast time series by weighting recent observations, with weights decaying exponentially. Apply simple methods for no-trend series, extend to trend, and address seasonality with additive model.
Learn simple exponential smoothing for time series without trend or seasonality, using alpha to weight recent observations. Understand how alpha sits between the average method and the naïve last-observation method.
Explore simple exponential smoothing for time series forecasting by adjusting weights with alpha. Learn how forecast and smoothing equations estimate the level and smoothing parameter in R or manually.
apply simple exponential smoothing in R to forecast oil production (1965–2013), estimating alpha and the initial level while minimizing residuals for time series without clear trend or seasonality.
Learn Holt’s linear trend method for time series with a trend, building three equations that model level, slope, and trend changes with smoothing parameters for forecasting.
Apply Holt’s linear trend method in R to forecast Australian air passenger volumes, using 1990–2016 data and a five-year forecast (2017–2021), and interpret alpha and trend smoothing.
Explore Holt’s damped trend method in R and learn how the fire parameter dampens the trend to create more realistic long-term forecasts.
Compare simple exponential smoothing, Holt's linear trend, and the damped Holt in R using cross-validation on no-seasonality livestock dataset; damped Holt yields lower mean squared error and mean absolute error.
Explore Holt-Winters' seasonal method for series with trend and seasonality, including additive and multiplicative forms, and learn to estimate level, trend, and seasonal components with alpha, beta, gamma, and damping.
Apply Holt-Winters' seasonal method in R to forecast seasonal time series with level and trend, compare additive and multiplicative models using alpha, beta, gamma, damping, and RMSE.
Explore exponential smoothing methods for time series in R, including simple, Holt linear and damped trends, and Holt-Winters with additive or multiplicative seasonality, with smoothing and damping parameters.
Explore innovations state-space models (ETS models) as exponential smoothing methods. Understand how unobserved components like level, trend, and seasonality evolve over time, with additive or multiplicative forms and prediction intervals.
Estimate and select ETS models in R using maximum likelihood, incorporating alpha, beta, gamma, and seasonal components, with box-cox transformation and information criteria for best model choice.
Learn to estimate and forecast time series with ETS models in R, using maximum likelihood to tune smoothing parameters for trend and seasonality, and forecast data with strong seasonality.
Summarize exponential smoothing methods, from simple smoothing to Holt’s and Holt-Winters models with or without seasonality, damped trends, and level, trend, and seasonality state components for forecasting.
Forecasting involves making predictions. It is required in many situations: deciding whether to build another power generation plant in the next ten years requires forecasts of future demand; scheduling staff in a call center next week requires forecasts of call volumes; stocking an inventory requires forecasts of stock requirements. Forecasts can be required several years in advance (for the case of capital investments) or only a few minutes beforehand (for telecommunication routing). Whatever the circumstances or time horizons involved, forecasting is an essential aid to effective and efficient planning. This course provides an introduction to time series forecasting using R.
No prior knowledge of R or data science is required.
Emphasis on applications of time-series analysis and forecasting rather than theory and mathematical derivations.
Plenty of rigorous examples and quizzes for an extensive learning experience.
All course contents are self-explanatory.
All R codes and data sets and provided for replication and practice.
At the completion of this course, you will be able to
Explore and visualize time series data.
Apply and interpret time series regression results.
Understand various methods to forecast time series data.
Use general forecasting tools and models for different forecasting situations.
Utilize statistical programs to compute, visualize, and analyze time-series data in economics, business, and the social sciences.
You will learn
Exploring and visualizing time series in R.
Benchmark methods of time series forecasting.
Time series forecasting forecast accuracy.
Linear regression models.
Exponential smoothing.
Stationarity, ADF, KPSS, differencing, etc.
ARIMA, SARIMA, and ARIMAX (dynamic regression) models.
Other forecasting models.