Learn R Programming

bpvars (version 1.0)

compute_variance_decompositions.PosteriorBVARs: Computes posterior draws of the forecast error variance decomposition

Description

For each country, each of the draws from the posterior estimation of the model is transformed into a draw from the posterior distribution of the forecast error variance decomposition.

Usage

# S3 method for PosteriorBVARs
compute_variance_decompositions(posterior, horizon)

Value

An object of class PosteriorFEVDPANEL, that is, a list with C elements containing NxNx(horizon+1)xS arrays of class PosteriorFEVD with S draws of country-specific forecast error variance decompositions.

Arguments

posterior

posterior estimation outcome - an object of class PosteriorBVARs obtained by running the estimate function.

horizon

a positive integer number denoting the forecast horizon for the forecast error variance decompositions.

Author

Tomasz Woźniak wozniak.tom@pm.me

References

Lütkepohl, H. (2017). Structural VAR Tools, Chapter 4, In: Structural vector autoregressive analysis. Cambridge University Press.

See Also

estimate.PosteriorBVARs, summary.PosteriorFEVDPANEL, plot.PosteriorFEVDPANEL

Examples

Run this code
# specify the model and set seed
specification  = specify_bvars$new(ilo_dynamic_panel[1:5]) # specify the model

# run the burn-in
burn_in        = estimate(specification, 5)

# estimate the model
posterior      = estimate(burn_in, 5)

# compute forecast error variance decomposition 4 years ahead
fevd           = compute_variance_decompositions(posterior, horizon = 4)

Run the code above in your browser using DataLab