Model Reference¶
All models share the general structure
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
—
Univariate models (no external input)¶
AR — Autoregressive¶
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¶
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¶
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:
pm = pmodel("arma", nc=[nc], nd=[nd], diff=[d], per=[])
Seasonal ARIMA¶
Combines regular and seasonal differences, each with their own ARMA factors:
# 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¶
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¶
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:
pm = pmodel("bjtf", nb=[nb], nc=[nc], nd=[nd], nf=[nf], delay=[k])
Regression¶
Static linear model:
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 |
|---|---|---|
|
Orders of \(C(q)\) polynomial(s) |
|
|
Orders of \(D(q)\) polynomial(s) |
|
|
Order of \(A(q)\) (ARX / ARMAX) |
|
|
Orders of \(B(q)\) polynomial(s) |
|
|
Orders of \(F(q)\) (BJTF only) |
|
|
Input delay \(k\) (samples) |
|
|
Differencing orders |
|
|
Seasonal periods |
|
—
Estimation¶
All models are estimated by minimizing the sum of squared one-step-ahead prediction errors using the Levenberg-Marquardt algorithm:
See estimate() for full API details.