📚 Introductory Econometrics with MORISTAT

A Practical Guide to Empirical Analysis

Naguib Lallmahomed · naglal@linux-mauritius.com · 2026-06-14


Chapter 9: Time Series Analysis and Forecasting

🎯 Learning Objectives

Upon completing this chapter, you will be able to:

9.1 What is Time Series Data?

Time series data consists of observations of a variable (or variables) recorded over time at regular intervals:

Example: Quarterly GDP data for South Africa (2010–2023).

9.1.1 Components of Time Series

9.2 Stationarity and Unit Roots

9.2.1 What is Stationarity?

A time series is stationary if its statistical properties (mean, variance, autocorrelation) do not change over time.

9.2.2 Why Stationarity Matters

9.2.3 Unit Root Tests

9.3 ARIMA Models

9.3.1 Autoregressive (AR) Models

Yt = δ + φ₁Yt-1 + φ₂Yt-2 + ⋯ + φpYt-p + εt

9.3.2 Moving Average (MA) Models

Yt = μ + εt + θ₁εt-1 + θ₂εt-2 + ⋯ + θqεt-q

9.3.3 ARIMA (p, d, q) Models

Example: ARIMA(1,1,1) model:

ΔYt = δ + φ₁ΔYt-1 + εt + θ₁εt-1

where ΔYt = Yt − Yt-1 (first difference).

9.4 Model Selection and Forecasting

9.4.1 Information Criteria

9.4.2 Forecast Evaluation

9.5 Vector Autoregression (VAR)

VAR models capture the interdependencies between multiple time series variables:

Yt = α₁ + β₁₁Yt-1 + β₁₂Xt-1 + ε1t
Xt = α₂ + β₂₁Yt-1 + β₂₂Xt-1 + ε2t

9.6 MORISTAT Examples

9.6.1 Time Series Data Format

Year,GDP,Inflation,Unemployment
2010,100,5.0,25.0
2011,105,4.5,24.0
2012,110,4.0,23.0
2013,115,3.5,22.0
2014,120,3.0,21.0
2015,125,2.5,20.0

9.6.2 Running a Time Series Regression

MORISTAT> LOAD ts_data.csv
MORISTAT> SUMMARY
MORISTAT> REGRESS GDP ~ Inflation Unemployment

9.7 Practical Exercises

Exercise 9.1: Identifying Time Series Components

You have the following time series data:

  1. Identify the components present in each series.
  2. Which series is likely non-stationary?
  3. Which series might require seasonal adjustment?

Solution:

  • Retail sales: Trend + Seasonality + Irregular → non-stationary
  • GDP: Trend + Cyclical + Irregular → non-stationary
  • Stock prices: Random walk → non-stationary
  • All three series are likely non-stationary
  • Retail sales require seasonal adjustment

Exercise 9.2: ARIMA Model Identification

You observe the following autocorrelation (ACF) and partial autocorrelation (PACF) patterns:

  1. What type of model is suggested?
  2. What if the ACF decays slowly and PACF decays slowly?
  3. What if the ACF cuts off after lag 1 and PACF decays slowly?

Solution:

  • ACF decays slowly, PACF cuts off at lag 1 → AR(1)
  • ACF decays slowly, PACF decays slowly → ARIMA(p, d, q) or AR(p) with p > 1
  • ACF cuts off at lag 1, PACF decays slowly → MA(1)

Exercise 9.3: Forecasting Evaluation

You have two forecasting models with the following errors:

  1. Calculate the RMSE for both models.
  2. Calculate the MAE for both models.
  3. Which model is better?

Solution:

  • Model A RMSE: √((4+9+1+4+16)/5) = √(34/5) = √6.8 = 2.607
  • Model B RMSE: √((1+1+0+1+1)/5) = √(4/5) = √0.8 = 0.894
  • Model A MAE: (2+3+1+2+4)/5 = 12/5 = 2.4
  • Model B MAE: (1+1+0+1+1)/5 = 4/5 = 0.8
  • Model B is better (lower RMSE and MAE)

9.8 Key Terms

Time Series Trend Seasonality Stationarity Unit Root Augmented Dickey-Fuller (ADF) Test ARIMA Autoregressive (AR) Moving Average (MA) Differencing AIC (Akaike Information Criterion) BIC (Bayesian Information Criterion) RMSE MAE MAPE Vector Autoregression (VAR) Granger Causality Impulse Response

9.9 Further Reading

9.10 What's Next?

In Chapter 10, we will cover Limited Dependent Variable Models:

→ Proceed to Chapter 10 (Coming Soon)

🔄 Ready to connect with MORISTAT?