Provides posterior summary of heteroskedastic Structural VAR estimation
Source:R/summary.R
summary.PosteriorBSVARSV.Rd
Provides posterior mean, standard deviations, as well as 5 and 95 percentiles of the parameters: the structural matrix \(B\), autoregressive parameters \(A\), and hyper parameters.
Usage
# S3 method for class 'PosteriorBSVARSV'
summary(object, ...)
Arguments
- object
an object of class PosteriorBSVARSV obtained using the
estimate()
function applied to heteroskedastic Bayesian Structural VAR model specification set by functionspecify_bsvar_sv$new()
containing draws from the posterior distribution of the parameters.- ...
additional arguments affecting the summary produced.
Value
A list reporting the posterior mean, standard deviations, as well as 5 and 95 percentiles of the parameters: the structural matrix \(B\), autoregressive parameters \(A\), and hyper-parameters.
Author
Tomasz Woźniak wozniak.tom@pm.me
Examples
# upload data
data(us_fiscal_lsuw)
# specify the model and set seed
set.seed(123)
specification = specify_bsvar_sv$new(us_fiscal_lsuw)
#> The identification is set to the default option of lower-triangular structural matrix.
# run the burn-in
burn_in = estimate(specification, 10)
#> **************************************************|
#> bsvars: Bayesian Structural Vector Autoregressions|
#> **************************************************|
#> Gibbs sampler for the SVAR-SV model |
#> Non-centred SV model is estimated |
#> **************************************************|
#> Progress of the MCMC simulation for 10 draws
#> Every draw is saved via MCMC thinning
#> Press Esc to interrupt the computations
#> **************************************************|
# estimate the model
posterior = estimate(burn_in, 20)
#> **************************************************|
#> bsvars: Bayesian Structural Vector Autoregressions|
#> **************************************************|
#> Gibbs sampler for the SVAR-SV model |
#> Non-centred SV model is estimated |
#> **************************************************|
#> Progress of the MCMC simulation for 20 draws
#> Every draw is saved via MCMC thinning
#> Press Esc to interrupt the computations
#> **************************************************|
summary(posterior)
#> **************************************************|
#> bsvars: Bayesian Structural Vector Autoregressions|
#> **************************************************|
#> Posterior summary of the parameters |
#> **************************************************|
#> $B
#> $B$equation1
#> mean sd 5% quantile 95% quantile
#> B[1,1] 0.1462879 0.005193802 0.1378043 0.1529531
#>
#> $B$equation2
#> mean sd 5% quantile 95% quantile
#> B[2,1] -12.99891 0.5447578 -13.75642 -12.18619
#> B[2,2] 41.61610 1.7240106 39.01878 43.90748
#>
#> $B$equation3
#> mean sd 5% quantile 95% quantile
#> B[3,1] -39.409086 1.733700 -41.93632 -37.111713
#> B[3,2] -8.419286 2.475866 -11.45846 -4.755063
#> B[3,3] 63.435376 2.668723 59.18161 66.867710
#>
#>
#> $A
#> $A$equation1
#> mean sd 5% quantile 95% quantile
#> lag1_var1 0.739471768 0.07573504 0.66773681 0.88867386
#> lag1_var2 -0.009422047 0.02490824 -0.04758496 0.03048698
#> lag1_var3 -0.566930179 0.09036175 -0.74771986 -0.48472762
#> const -0.109364180 0.21652074 -0.45144078 0.22948613
#>
#> $A$equation2
#> mean sd 5% quantile 95% quantile
#> lag1_var1 -0.08172641 0.02292961 -0.1170348 -0.04894066
#> lag1_var2 0.96173285 0.01593118 0.9332478 0.98101415
#> lag1_var3 -0.17296565 0.02854321 -0.2200927 -0.13299316
#> const -0.35813686 0.12662532 -0.5946356 -0.19082468
#>
#> $A$equation3
#> mean sd 5% quantile 95% quantile
#> lag1_var1 -0.141881261 0.05055956 -0.18948464 -0.04496017
#> lag1_var2 -0.007132563 0.01777753 -0.04031295 0.02292552
#> lag1_var3 0.584834523 0.05978226 0.47219672 0.64592374
#> const -0.087751979 0.15452236 -0.36588482 0.18737394
#>
#>
#> $hyper
#> $hyper$B
#> mean sd 5% quantile 95% quantile
#> B[1,]_shrinkage 49.38860 36.20630 5.362346 117.6062
#> B[2,]_shrinkage 284.71505 177.36035 153.252593 473.8493
#> B[3,]_shrinkage 647.27030 436.39225 315.660079 1125.1985
#> B[1,]_shrinkage_scale 527.79917 319.31093 80.976747 1019.8120
#> B[2,]_shrinkage_scale 1004.33834 411.10772 510.010966 1678.4275
#> B[3,]_shrinkage_scale 1097.74281 491.79290 379.410666 1776.2121
#> B_global_scale 81.32742 36.40308 37.295484 127.1522
#>
#> $hyper$A
#> mean sd 5% quantile 95% quantile
#> A[1,]_shrinkage 0.9480643 0.6260121 0.2335475 2.464578
#> A[2,]_shrinkage 0.8596221 0.7745331 0.2327505 2.002212
#> A[3,]_shrinkage 0.9979775 0.8097213 0.4380638 2.404830
#> A[1,]_shrinkage_scale 9.3727336 3.6041905 3.7617984 14.858119
#> A[2,]_shrinkage_scale 9.2838609 6.6911294 2.8715596 20.962737
#> A[3,]_shrinkage_scale 9.3164700 5.1038341 5.0925410 21.082174
#> A_global_scale 1.0331385 0.4364563 0.4845417 1.755186
#>
#>
# workflow with the pipe |>
############################################################
set.seed(123)
us_fiscal_lsuw |>
specify_bsvar_sv$new() |>
estimate(S = 10) |>
estimate(S = 20) |>
summary()
#> The identification is set to the default option of lower-triangular structural matrix.
#> **************************************************|
#> bsvars: Bayesian Structural Vector Autoregressions|
#> **************************************************|
#> Gibbs sampler for the SVAR-SV model |
#> Non-centred SV model is estimated |
#> **************************************************|
#> Progress of the MCMC simulation for 10 draws
#> Every draw is saved via MCMC thinning
#> Press Esc to interrupt the computations
#> **************************************************|
#> **************************************************|
#> bsvars: Bayesian Structural Vector Autoregressions|
#> **************************************************|
#> Gibbs sampler for the SVAR-SV model |
#> Non-centred SV model is estimated |
#> **************************************************|
#> Progress of the MCMC simulation for 20 draws
#> Every draw is saved via MCMC thinning
#> Press Esc to interrupt the computations
#> **************************************************|
#> **************************************************|
#> bsvars: Bayesian Structural Vector Autoregressions|
#> **************************************************|
#> Posterior summary of the parameters |
#> **************************************************|
#> $B
#> $B$equation1
#> mean sd 5% quantile 95% quantile
#> B[1,1] 0.1462879 0.005193802 0.1378043 0.1529531
#>
#> $B$equation2
#> mean sd 5% quantile 95% quantile
#> B[2,1] -12.99891 0.5447578 -13.75642 -12.18619
#> B[2,2] 41.61610 1.7240106 39.01878 43.90748
#>
#> $B$equation3
#> mean sd 5% quantile 95% quantile
#> B[3,1] -39.409086 1.733700 -41.93632 -37.111713
#> B[3,2] -8.419286 2.475866 -11.45846 -4.755063
#> B[3,3] 63.435376 2.668723 59.18161 66.867710
#>
#>
#> $A
#> $A$equation1
#> mean sd 5% quantile 95% quantile
#> lag1_var1 0.739471768 0.07573504 0.66773681 0.88867386
#> lag1_var2 -0.009422047 0.02490824 -0.04758496 0.03048698
#> lag1_var3 -0.566930179 0.09036175 -0.74771986 -0.48472762
#> const -0.109364180 0.21652074 -0.45144078 0.22948613
#>
#> $A$equation2
#> mean sd 5% quantile 95% quantile
#> lag1_var1 -0.08172641 0.02292961 -0.1170348 -0.04894066
#> lag1_var2 0.96173285 0.01593118 0.9332478 0.98101415
#> lag1_var3 -0.17296565 0.02854321 -0.2200927 -0.13299316
#> const -0.35813686 0.12662532 -0.5946356 -0.19082468
#>
#> $A$equation3
#> mean sd 5% quantile 95% quantile
#> lag1_var1 -0.141881261 0.05055956 -0.18948464 -0.04496017
#> lag1_var2 -0.007132563 0.01777753 -0.04031295 0.02292552
#> lag1_var3 0.584834523 0.05978226 0.47219672 0.64592374
#> const -0.087751979 0.15452236 -0.36588482 0.18737394
#>
#>
#> $hyper
#> $hyper$B
#> mean sd 5% quantile 95% quantile
#> B[1,]_shrinkage 49.38860 36.20630 5.362346 117.6062
#> B[2,]_shrinkage 284.71505 177.36035 153.252593 473.8493
#> B[3,]_shrinkage 647.27030 436.39225 315.660079 1125.1985
#> B[1,]_shrinkage_scale 527.79917 319.31093 80.976747 1019.8120
#> B[2,]_shrinkage_scale 1004.33834 411.10772 510.010966 1678.4275
#> B[3,]_shrinkage_scale 1097.74281 491.79290 379.410666 1776.2121
#> B_global_scale 81.32742 36.40308 37.295484 127.1522
#>
#> $hyper$A
#> mean sd 5% quantile 95% quantile
#> A[1,]_shrinkage 0.9480643 0.6260121 0.2335475 2.464578
#> A[2,]_shrinkage 0.8596221 0.7745331 0.2327505 2.002212
#> A[3,]_shrinkage 0.9979775 0.8097213 0.4380638 2.404830
#> A[1,]_shrinkage_scale 9.3727336 3.6041905 3.7617984 14.858119
#> A[2,]_shrinkage_scale 9.2838609 6.6911294 2.8715596 20.962737
#> A[3,]_shrinkage_scale 9.3164700 5.1038341 5.0925410 21.082174
#> A_global_scale 1.0331385 0.4364563 0.4845417 1.755186
#>
#>