| filter_svp | R Documentation |
Applies Kalman filtering (corrected or Gaussian mixture) and RTS smoothing to extract the latent log-volatility process from an estimated SV(p) model.
filter_svp(
object,
method = c("corrected", "mixture", "particle"),
proxy = c("bayes_optimal", "u"),
K = 7,
M = 1000,
seed = 42,
del = 1e-10
)
object |
An |
method |
Character. Filter method: |
proxy |
Character. Leverage proxy for the state-space prediction
mean |
K |
Integer. Number of mixture components for GMKF. Default 7. |
M |
Integer. Number of particles for BPF. Default 1000. |
seed |
Integer. Random seed for BPF. Default 42. |
del |
Numeric. Small constant for log transformation. Default |
An object of class "svp_filter", a list containing:
Filtered log-volatility (T-vector).
Smoothed log-volatility (T-vector).
Filtered standardized residuals.
Smoothed standardized residuals.
Filtered MSE of first state component.
Predicted MSE of first state component.
Full filtered state vectors (p x T matrix).
Full smoothed state vectors (p x T matrix).
Approximate log-likelihood.
Filter method used.
The input model object.
y <- sim_svp(1000, phi = 0.95, sigy = 1, sigv = 0.2)$y
fit <- svp(y, p = 1)
filt <- filter_svp(fit)
plot(filt$w_smoothed, type = "l")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.