kfpredict() has been renamed to predict_shocks(). It is kept for
backward compatibility, issues a deprecation warning and will be removed in
a future release.
Usage
kfpredict(Sig, SigR, Psi, et, tol = sqrt(.Machine$double.eps), scale = TRUE)Arguments
- Sig
Numeric matrix (M x M, with M = N for one horizon). Covariance matrix of the residuals in
eton policy event days (e.g.Sigfromhetiv()).- SigR
Numeric matrix (M x M). Covariance matrix of the residuals on control (non-event) days. Used to back out the implied shock variances when
scale = TRUE.- Psi
Numeric matrix (M x E) of responses of the residuals in
etto the E structural shocks (e.g.Psifromhetiv()), or an array N x E x M of responses at M horizons, which is stacked by rows.- et
Numeric matrix or data frame (T x M) of forecast errors on event days (e.g.
etfromhetiv()), or an array T x N x M of forecast errors at M horizons, which is stacked by columns. Rows correspond to time periods.- tol
Numeric scalar. Tolerance for the generalized inverse (
MASS::ginv()). Clipped from below atsqrt(.Machine$double.eps).- scale
Logical. If
TRUE(default), shocks are rescaled to unit variance using the implied shock variances recovered fromSigandSigR. This scaling assumes that structural shock variances are diagonal, so thatSig - SigR = sum_i sigma_i Psi_i Psi_i'. IfFALSE, the raw Kalman filter projection is returned.
Value
See predict_shocks().
