
Squared correlation of the predicted shocks with the true shocks
Source:R/prediction_corr.R
prediction_corr.RdComputes the population squared correlation between the shocks predicted
by predict_shocks() and the true underlying shocks, as a measure of the
precision of the prediction (Burri and Kaufmann, 2026a).
Arguments
- Psi
Numeric matrix (M x E) of responses of the residuals to the E structural shocks (e.g.
Psifromhetiv()).- SigR
Numeric matrix (M x M). Covariance matrix of the residuals on control (non-event) days.
- Sig
Numeric matrix (M x M) or
NULL. Covariance matrix of the residuals on event days, used to rescalePsito one-standard-deviation shocks. IfNULL(default),Psiis assumed to be in these units already.- squared
Logical. If
TRUE(default), the squared correlation is returned. IfFALSE, its square root (the correlation).
Value
A numeric vector of length E with the squared correlation between
each predicted shock and the true shock (the diagonal of
S (I + S)^{-1}), or the correlation if squared = FALSE.
Details
Let the residuals on event days be e_t = Psi eps_t + v_t, with
unit-variance shocks eps_t and non-policy noise v_t with covariance
SigR. The linear prediction of the shocks has covariance with the true
shocks S (I + S)^{-1}, with the signal-to-noise matrix
S = Psi' SigR^{-1} Psi. The diagonal of this matrix is the share of the
shock variance explained by the prediction (one minus the relative mean
squared error), that is, the squared correlation between the predicted
and the true shock.
The correlation itself does not depend on the units of the shocks, but
the formula does: S is the signal-to-noise ratio only if Psi is the
response to a one-standard-deviation shock. The estimators return Psi
normalised to a unit impact response instead, which leaves the variance
of the shocks out of S.
If Sig is supplied, the columns of Psi are therefore rescaled by the
implied standard deviations of the shocks, recovered from Sig - SigR
in the same way as in predict_shocks(). If Sig is NULL, Psi is
used as is.
The measure is a population quantity evaluated at the estimated
parameters. It does not account for estimation error in Psi, Sig and
SigR, and it is informative only if the responses in Psi are
consistently estimated, that is, if the identifying assumptions of the
estimator hold.
The measure also requires a nonsingular covariance SigR. If fewer
non-policy shocks than variables drive the data, SigR is (nearly)
singular, the implied signal-to-noise ratio becomes very large and the
measure approaches one whatever the actual precision. A warning is
issued in this case.
References
Burri, M. and Kaufmann, D. (2026a). Measuring monetary policy shocks. IRENE Working Papers 24-03, IRENE Institute of Economic Research, University of Neuchatel.