da | R Documentation |
This function, not intended for end-users, implements the following recursions needed in computing scores with respect to regression coefficients:
D a^{(1)}_{t+1} = D a^{(1)}_{t} + D a^{(2)}_{t} - k^{(1)}_t x_t -
k^{(1)}_t D a^{(1)}_{t}
D a^{(2)}_{t+1} = a^{(2)}_{t} - k^{(2)}_t x_t - k^{(2)}_t Da^{(1)}_{t}
where a^{(1)}_{t}
, a^{(2)}_{t}
are the one-step-ahead Kalman filtered
state variables, and k^{(1)}_{t}
, k^{(2)}_{t}
the respective
Kalman gain elements. The symbol $D$ represent the partial derivative with
respect to the regression coefficients and $x_t$ is the vector of regressors.
All variables are passed by reference and, so, no output is needed.
da(k1, k2, X, A1, A2)
k1 |
numeric vector of n elements with the Kalman gain sequence for the first state variable; |
k2 |
numeric vector of n elements with the Kalman gain sequence for the second state variable; |
X |
numeric matrix of dimension |
A1 |
numeric matrix of dimension |
A2 |
numeric matrix of dimension |
It does not return anything as it writes on the A1 and A2 matrices passed as reference.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.