ARDLM Procedure |
@ARDLM generates the state-space system matrices for a univariate autoregressive process whose lag coefficients are provided in a VECTOR. You can also use it to set up the framework (proper dimensions, all the fixed values put in place) based upon an input number of lags (LAGS option) to fill out the non-fixed elements later.
@ARDLM( options ) lagVECT
The simplest state-space (dynamic linear model) representation of
\begin{equation} y_t = \varphi _1 y_{t - 1} + \varphi _2 y_{t - 2} + \ldots + {\rm{ }}\varphi _p y_{t - p} + u_t \end{equation}
has state-vector
\begin{equation} {\bf{X}}_{\rm{t}} {\rm{ = }}\left[ {\begin{array}{*{20}c} {y_t } \\ {y_{t - 1} } \\ \vdots \\ {y_{t - p + 1} } \\ \end{array}} \right] \end{equation}
and
\begin{equation} {\bf{A}} = \left[ {\begin{array}{*{20}c} {\varphi _1 } & {\varphi _2 } & \ldots & {\varphi _p } \\ 1 & 0 & \ldots & 0 \\ 0 & \ddots & 0 & 0 \\ 0 & 0 & 1 & 0 \\ \end{array}} \right] \end{equation}
\begin{equation} {\bf{F}} = \left[ {\begin{array}{*{20}c} 1 \\ 0 \\ \vdots \\ 0 \\ \end{array}} \right] \end{equation}
with \({\bf{C}} = {\bf{F}}\).
Note that the only thing that depends upon the free coefficients is the first row in \({\bf{A}}\). In this form, there is no "measurement" error as the only shock (\(u\)) enters the state equation.
Parameters
|
LagVect (optional, input) |
VECTOR of AR coefficients on consecutive lags |
Options
LAGS=number of lags in model (input)
Can be used as an alternative to the LagVect parameter to set up the framework of the matrices if you don't yet know the coefficients. Note that LAGS=0 will actually include one state regardless.
A=DLM system "A" matrix (output; input/output if used with POKE)
F=DLM system "F" matrix (output)
C=DLM system "C" matrix (output)
POKE/[NOPOKE]
If POKE, assumes that the A option matrix has the framework set up and only changes the first row to insert the coefficients out of LagVect. This avoids repeating the set up of the fixed elements.
Examples
This creates the system matrices for a \(q\) lag autoregression where the coefficients are in the FPHI VECTOR (which at this point are just small random numbers).
dec vect fphi(q)
compute q=%ran(.01)
@ARDLM(a=af,f=ff,c=cf) fphi
and this takes the AF matrix created in the first example and replaces the first row with the current values in FPHI.
@ARDLM(a=af,poke) fphi
This is an alternative to the first example above if the values of the coefficients aren't yet known but the lag length is (that is, you plan to later use the POKE option when you know the coefficients). It sets up the matrices with \(q\) lags.
@ARDLM(a=af,f=ff,c=cf,lags=q)
@ARDLM is used extensively in the Mariano and Murasawa(2003) examples.
Copyright © 2026 Thomas A. Doan