| wex | R Documentation |
This function computes the exact observation weights for the Kalman filter and smoother,
as described by Koopman and Harvey (2003). The implementation of wex builds upon the
existing FKF package (see: https://CRAN.R-project.org/package=FKF).
wex(a0 = NULL, P0 = NULL, Tt, Zt, HHt, GGt, yt, t)
a0 |
A |
P0 |
A |
Tt |
An |
Zt |
An |
HHt |
An |
GGt |
An |
yt |
An |
t |
An observation index for which the weights are returned. |
State space form
\alpha_{t+1} = T_t \alpha_t + H_t \eta_t,
y_t = Z_t \alpha_t + G_t \epsilon_t,
where y_t represents the observed data (possibly with NA's),
and \alpha_t is the state vector.
Weight matrices for filtering (Wt) and smoothing (WtT).
Koopman, S. J., & Harvey, A. (2003). Computing observation weights for signal extraction and filtering. Journal of Economic Dynamics and Control, 27(7), 1317-1333.
# Decompose a local level model (Nile data set)
data(Nile)
y <- Nile
wts <- wex(Tt=matrix(1),
Zt=matrix(1),
HHt = matrix(1385.066),
GGt = matrix(15124.13),
yt = t(y),
t=50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.