ARIMA(p,d,q)

I. Ozkan

Spring, 2025

Non-Stationary Time Series Models

\(X_t=\mu_t + \varepsilon_t\)

where \(\mu_t\) is time-varying trend and \(\varepsilon_t\) is stationary \(ARMA\) process.

Non-Stationary Time Series Models: Trend

set \(W_t=X_t-X_{t-1}=\mu_t-\mu_{t-1}+\varepsilon_t-\varepsilon_{t-1}\)

for the linear trend case,

\(W_t=(\beta_0+\beta_1 t + a_t)-(\beta_0+\beta_1 (t-1) + a_{t-1})\)
\(\implies W_t=\beta_1 + a_t - a_{t-1}\)

and both \(E[W_t]=\beta_1 \; and\; V(W_t)=2 \sigma^2\) are constant (do not change with time)

An Example

An Example: Time Series Display

Generalization

\(X_t=X_{t-1}+a_t \implies (1-B)X_t=a_t \implies \nabla X_t =a_t\)

where differencing operator defined as \(\nabla\equiv(1-B)\)

RW Example

Generalization: Quadratic Trend

\(X_t=\beta_0+\beta_1 t+\beta_2 t^2 + a_t\)

\(w_t=\nabla X_t=X_t - X_{t-1}\)

\(\implies (\beta_0+\beta_1 t+\beta_2 t^2 + a_t)-(\beta_0+\beta_1 (t-1)+\beta_2 (t-1)^2 + a_{t-1})\)

\(\implies \beta_0 - \beta_0 + \beta_1 - \beta_2 +\beta_1 t-\beta_1 t+\beta_2 t^2-\beta_2 t^2 + a_t-a_{t-1}+2 \beta_2t\)

\(\implies w_t=\beta_1-\beta_2+2 \beta_2 t + a_t - a_{t-1}\)

\(w_t-w_{t-1}=2 \beta_2 + a_t - 2 a_{t-1} + a_{t-2}\)

\(V(w_t-w_{t-1})=\sigma^2 + 4 \sigma^2 + \sigma^2=6 \sigma^2\)

The cost of differencing is nothing but inflated variance

Example of Quadratic Trend

Generalization

\(\Phi(B) \nabla^d X_t=\Theta(B) a_t\)

Non-Stationary in Variance

\(X_t=\mu_t + \varepsilon_t\)

\(V(X_t)=V(\varepsilon_t)=h^2(\mu_t) \sigma^2\)

where, \(h(.)\) is unknown function.

\(g(X_t)\approx g(\mu_t) + g'(\mu_t)(X_t-\mu_t)\) where, \(g'(.)\) is the first derivative \(\frac{d}{dx}g(x)\)

\(V(g(X_t))\approx V(g(\mu_t) + g'(\mu_t)(X_t-\mu_t))\)

\(=[g'(\mu_t)]^2 V(X_t) = [g'(\mu_t)]^2 h^2(\mu_t) \sigma^2\)

\(\implies g'(\mu_t)=\frac{1}{h(\mu_t)}\)

For example, if \(h(\mu_t)=\mu_t\) or the standard deviation is proportional to the level of the process,

\(g'(\mu_t)=\frac{1}{\mu_t} \implies g(.)=ln(.)\)

\(g(X_t)=\frac{X_t^\lambda - 1}{\lambda}\) and note that,

\(\lim_{\lambda \to 0} g(X_t) = \lim_{\lambda \to 0} \frac{X_t^\lambda - 1}{\lambda} = ln(X_t)\)

Power Transformation Example

bcPower Transformation to Normality 
  Est Power Rounded Pwr Wald Lwr Bnd Wald Upr Bnd
x     0.196         0.2        0.144        0.248

Likelihood ratio test that transformation parameter is equal to 0
 (log transformation)
                           LRT df       pval
LR test, lambda = (0) 68.39832  1 < 2.22e-16

Likelihood ratio test that no transformation is needed
                           LRT df       pval
LR test, lambda = (1) 511.5032  1 < 2.22e-16
[1]  47 149

[1] 202  47

Another Lambda estimation


 Lambda: 0.1818 

Steps of \(ARIMA(p,d,q)\) Modelling

forecast package functions, tsdisplay() and ggtsdisplay()

\(g(X_t)=\frac{X_t^\lambda - 1}{\lambda}\)

Portmanteau Tests

\(Q_{stat}=n \displaystyle\sum_{k=1}^{h} \rho_k^2\)

\(h\): maximum lag to be considered. Ususally 20 is selected. If residuals are white noise, \(Q_stat \sim \chi^2\) with \(h-m\) degrees of freedom where \(m\) is the number of parameters in the model.

\(Q^*_{stat}=n (n+2)\displaystyle\sum_{k=1}^{h} (n-k)^k \rho_k^2\)

again, \(Q^*_stat \sim \chi^2\) with \(h-m\) degrees of freedom.

Test for Stationary

fUnitRoots package contains all these tests. See, urdfTest(), urersTest(), urkpssTest(), urppTest(), urspTest() and urzaTest() function of this package.

Competition Assignment due to last week:

Seasonal \(ARIMA\) models

This part is left to students as exercise.

Read (i) Forecasting: Principles and Practice, Section 9.9