Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Selecting the Order of AR Models | Section
Forecasting With Classical Models

bookSelecting the Order of AR Models

Glissez pour afficher le menu

Selecting the right order for an autoregressive (AR) model is essential for accurate time series forecasting. The order, often denoted as pp in an AR(p) model, represents the number of lagged observations included as predictors. There are several methods to determine this optimal lag order, with the most common being the use of information criteria such as the Akaike Information Criterion (AIC), the Bayesian Information Criterion (BIC), and the Partial Autocorrelation Function (PACF) plot.

AIC and BIC are both statistical measures that balance model fit and complexity:

  • The AIC penalizes models for having more parameters, helping prevent overfitting;
  • The BIC applies an even stricter penalty for model complexity, often favoring simpler models;
  • When using these criteria, you fit AR models with different lag orders and select the one with the lowest AIC or BIC value.

The PACF plot is a graphical tool that helps visualize the partial correlation of a time series with its own lagged values, after removing the effects of earlier lags. In practice, you look for the point where the PACF drops close to zero and stays within the confidence interval—this lag is a strong candidate for the AR order. A sharp cutoff in the PACF after lag p suggests an AR(p) process.

1234567891011121314151617
import pandas as pd import numpy as np import matplotlib.pyplot as plt from statsmodels.graphics.tsaplots import plot_pacf np.random.seed(42) # Using a random walk with a slight upward trend synthetic_values = np.cumsum(np.random.normal(loc=0.2, scale=1.0, size=100)) data = pd.Series(synthetic_values) # Create the figure and axis explicitly to ensure figsize is applied fig, ax = plt.subplots(figsize=(10, 5)) plot_pacf(data, lags=49, method='ywm', ax=ax) plt.title("PACF Plot for Synthetic Time Series (100 points)") plt.xlabel("Lag") plt.ylabel("Partial Autocorrelation") plt.show()
copy
question mark

Which feature of the PACF plot indicates the optimal lag order for an AR model?

Select the correct answer

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 6

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

Section 1. Chapitre 6
some-alt