Model Reference

All models share the general structure

\[y(t) = G(q)\,u(t) + H(q)\,e(t)\]

where \(G(q)\) is the transfer function from external input to output, \(H(q)\) is the noise model, \(q^{-1}\) is the backward-shift operator (\(q^{-k}y(t)=y(t-k)\)), and \(e(t)\) is white noise with variance \(\sigma^2\).

A polynomial of order \(n\) in \(q^{-1}\) is written

\[P(q) = 1 + p_1 q^{-1} + p_2 q^{-2} + \cdots + p_n q^{-n}\]

Univariate models (no external input)

AR — Autoregressive

\[D(q)\,y(t) = e(t)\]

The AR(\(n_d\)) model. Stationary when all roots of \(D(z)=0\) lie outside the unit circle.

pm = pmodel("arma", nc=[0], nd=[nd])

MA — Moving Average

\[y(t) = C(q)\,e(t)\]

The MA(\(n_c\)) model. Invertible when all roots of \(C(z)=0\) lie outside the unit circle.

pm = pmodel("arma", nc=[nc], nd=[0])

ARMA — Autoregressive Moving Average

\[D(q)\,y(t) = C(q)\,e(t)\]
pm = pmodel("arma", nc=[nc], nd=[nd], diff=[0], per=[])

ARIMA — ARMA with Integration

Apply \(d\) regular differences \(\nabla^d = (1-q^{-1})^d\) before fitting ARMA:

\[D(q)\,\nabla^d y(t) = C(q)\,e(t)\]
pm = pmodel("arma", nc=[nc], nd=[nd], diff=[d], per=[])

Seasonal ARIMA

Combines regular and seasonal differences, each with their own ARMA factors:

\[D(q)\,D_s(q^{-s})\,\nabla^d\nabla_s^{d_s}\,y(t) = C(q)\,C_s(q^{-s})\,e(t)\]
# e.g. SARIMA(1,1,1)(1,1,1)_12
pm = pmodel("arma",
            nc=[1, 1], nd=[1, 1],
            diff=[1, 1], per=[0, 12])

Transfer function models (with external input)

ARX — Autoregressive with eXogenous input

\[A(q)\,y(t) = B(q)\,q^{-k}\,u(t) + e(t)\]

The noise enters through the same \(A(q)\) polynomial as the output.

pm = pmodel("arx", na=[na], nb=[nb], delay=[k])

ARMAX — ARX with Moving-Average noise

\[A(q)\,y(t) = B(q)\,q^{-k}\,u(t) + C(q)\,e(t)\]
pm = pmodel("armax", na=[na], nb=[nb], nc=[nc], delay=[k])

BJTF — Box-Jenkins Transfer Function

The most general model. \(G\) and \(H\) are identified independently:

\[y(t) = \frac{B(q)}{F(q)}\,q^{-k}\,u(t) + \frac{C(q)}{D(q)}\,e(t)\]
pm = pmodel("bjtf", nb=[nb], nc=[nc], nd=[nd], nf=[nf], delay=[k])

Regression

Static linear model:

\[y(t) = b_0 + b_1 u_1(t) + \cdots + b_m u_m(t)\]
pm = pmodel("regr", nb=[1]*m)

Model order arguments

All order arguments are lists to support seasonal models with multiple polynomial blocks.

Arg

Meaning

Example

nc

Orders of \(C(q)\) polynomial(s)

[2] or [1, 1] (seasonal)

nd

Orders of \(D(q)\) polynomial(s)

[1]

na

Order of \(A(q)\) (ARX / ARMAX)

[2]

nb

Orders of \(B(q)\) polynomial(s)

[3]

nf

Orders of \(F(q)\) (BJTF only)

[2]

delay

Input delay \(k\) (samples)

[3]

diff

Differencing orders

[1] or [1, 1]

per

Seasonal periods

[] or [0, 12]

Estimation

All models are estimated by minimizing the sum of squared one-step-ahead prediction errors using the Levenberg-Marquardt algorithm:

\[\hat{\theta} = \arg\min_\theta \sum_{t} \hat{e}(t|\theta)^2\]

See estimate() for full API details.