Learn R Programming

pvars (version 1.1.1)

fevd.id: Forecast Error Variance Decomposition

Description

Calculates the forecast error variance decomposition. Respects SVAR models of cases \(S \neq K\), i.e. partially identified or excess shocks, too.

Usage

# S3 method for id
fevd(x, n.ahead = 10, ...)

Value

A list of class 'svarfevd' holding the forecast error variance decomposition of each variables as a 'data.frame'.

Arguments

x

SVAR object of class 'id' or any other that will be coerced to ('id', 'varx').

n.ahead

Integer specifying the steps ahead, i.e. the horizon of the FEVD.

...

Currently not used.

References

Luetkepohl, H. (2005): New Introduction to Multiple Time Series Analysis, Springer, 2nd ed.

Jentsch, Lunsford (2022): "Asymptotically Valid Bootstrap Inference for Proxy SVARs", Journal of Business and Economic Statistics, 40, pp. 1876-1891.

Examples

Run this code
data("PCIT")
names_k = c("APITR", "ACITR", "PITB", "CITB", "GOV", "RGDP", "DEBT")
names_l = c("m_PI", "m_CI")  # proxy names
names_s = paste0("epsilon[ ", c("PI", "CI"), " ]")  # shock names
dim_p   = 4  # lag-order

# estimate and identify proxy SVAR #
R.vars = vars::VAR(PCIT[ , names_k], p=dim_p, type="const")
R.idBL = id.iv(R.vars, iv=PCIT[-(1:dim_p), names_l], S2="MR", cov_u="OMEGA")
colnames(R.idBL$B) = names_s  # labeling

# calculate and plot FEVD under partial identification #
plot(fevd(R.idBL, n.ahead=20))

Run the code above in your browser using DataLab