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.1469206 0.006062622 0.1402002 0.1585284
#>
#> $B$equation2
#> mean sd 5% quantile 95% quantile
#> B[2,1] -12.38527 0.740964 -13.62140 -11.48032
#> B[2,2] 40.20519 2.345169 37.32229 44.10876
#>
#> $B$equation3
#> mean sd 5% quantile 95% quantile
#> B[3,1] -38.385481 2.258204 -41.51627 -34.953677
#> B[3,2] -8.951953 2.550733 -12.66373 -5.077967
#> B[3,3] 62.253502 3.438587 56.30151 68.160968
#>
#>
#> $A
#> $A$equation1
#> mean sd 5% quantile 95% quantile
#> lag1_var1 1.0244660 0.02325616 0.9914658 1.05905990
#> lag1_var2 -0.0827699 0.03335015 -0.1183212 -0.02799828
#> lag1_var3 -0.8711731 0.03207860 -0.9177089 -0.82579169
#> const -0.4115923 0.22784055 -0.6370424 -0.01318342
#>
#> $A$equation2
#> mean sd 5% quantile 95% quantile
#> lag1_var1 0.003971754 0.01665495 -0.02132162 0.02358129
#> lag1_var2 0.933395512 0.01525154 0.91770628 0.95563454
#> lag1_var3 -0.257876638 0.02137591 -0.28337887 -0.22059363
#> const -0.489972492 0.11781438 -0.65028828 -0.31168524
#>
#> $A$equation3
#> mean sd 5% quantile 95% quantile
#> lag1_var1 0.04414684 0.01507222 0.02407978 0.06506311
#> lag1_var2 -0.05738968 0.02249465 -0.08594839 -0.02250236
#> lag1_var3 0.38875111 0.01968031 0.36224605 0.41886992
#> const -0.30141027 0.14722754 -0.46388005 -0.07310653
#>
#>
#> $hyper
#> $hyper$B
#> mean sd 5% quantile 95% quantile
#> B[1,]_shrinkage 1203.8542 1107.1196 121.5518 2978.490
#> B[2,]_shrinkage 851.5032 365.3617 398.3216 1582.319
#> B[3,]_shrinkage 1426.3654 1039.9409 385.1111 3611.604
#> B[1,]_shrinkage_scale 8073.1299 4961.1526 1386.9332 15248.222
#> B[2,]_shrinkage_scale 7935.1783 4507.5929 1830.0583 17905.325
#> B[3,]_shrinkage_scale 9019.1146 5236.3729 1887.7240 17584.601
#> B_global_scale 795.6531 449.0971 152.2418 1220.058
#>
#> $hyper$A
#> mean sd 5% quantile 95% quantile
#> A[1,]_shrinkage 0.5235967 0.2227498 0.2666590 0.8226043
#> A[2,]_shrinkage 0.4392824 0.3029605 0.1967496 1.1998566
#> A[3,]_shrinkage 0.5858711 0.2622841 0.2392140 1.0114170
#> A[1,]_shrinkage_scale 5.5126318 1.8178165 3.5266149 7.6545847
#> A[2,]_shrinkage_scale 5.0813030 1.9164053 3.0974824 7.9525957
#> A[3,]_shrinkage_scale 6.4805349 3.3732470 3.5601451 13.8244833
#> A_global_scale 0.6678598 0.1653758 0.4423705 0.9422769
#>
#>
# 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.1469206 0.006062622 0.1402002 0.1585284
#>
#> $B$equation2
#> mean sd 5% quantile 95% quantile
#> B[2,1] -12.38527 0.740964 -13.62140 -11.48032
#> B[2,2] 40.20519 2.345169 37.32229 44.10876
#>
#> $B$equation3
#> mean sd 5% quantile 95% quantile
#> B[3,1] -38.385481 2.258204 -41.51627 -34.953677
#> B[3,2] -8.951953 2.550733 -12.66373 -5.077967
#> B[3,3] 62.253502 3.438587 56.30151 68.160968
#>
#>
#> $A
#> $A$equation1
#> mean sd 5% quantile 95% quantile
#> lag1_var1 1.0244660 0.02325616 0.9914658 1.05905990
#> lag1_var2 -0.0827699 0.03335015 -0.1183212 -0.02799828
#> lag1_var3 -0.8711731 0.03207860 -0.9177089 -0.82579169
#> const -0.4115923 0.22784055 -0.6370424 -0.01318342
#>
#> $A$equation2
#> mean sd 5% quantile 95% quantile
#> lag1_var1 0.003971754 0.01665495 -0.02132162 0.02358129
#> lag1_var2 0.933395512 0.01525154 0.91770628 0.95563454
#> lag1_var3 -0.257876638 0.02137591 -0.28337887 -0.22059363
#> const -0.489972492 0.11781438 -0.65028828 -0.31168524
#>
#> $A$equation3
#> mean sd 5% quantile 95% quantile
#> lag1_var1 0.04414684 0.01507222 0.02407978 0.06506311
#> lag1_var2 -0.05738968 0.02249465 -0.08594839 -0.02250236
#> lag1_var3 0.38875111 0.01968031 0.36224605 0.41886992
#> const -0.30141027 0.14722754 -0.46388005 -0.07310653
#>
#>
#> $hyper
#> $hyper$B
#> mean sd 5% quantile 95% quantile
#> B[1,]_shrinkage 1203.8542 1107.1196 121.5518 2978.490
#> B[2,]_shrinkage 851.5032 365.3617 398.3216 1582.319
#> B[3,]_shrinkage 1426.3654 1039.9409 385.1111 3611.604
#> B[1,]_shrinkage_scale 8073.1299 4961.1526 1386.9332 15248.222
#> B[2,]_shrinkage_scale 7935.1783 4507.5929 1830.0583 17905.325
#> B[3,]_shrinkage_scale 9019.1146 5236.3729 1887.7240 17584.601
#> B_global_scale 795.6531 449.0971 152.2418 1220.058
#>
#> $hyper$A
#> mean sd 5% quantile 95% quantile
#> A[1,]_shrinkage 0.5235967 0.2227498 0.2666590 0.8226043
#> A[2,]_shrinkage 0.4392824 0.3029605 0.1967496 1.1998566
#> A[3,]_shrinkage 0.5858711 0.2622841 0.2392140 1.0114170
#> A[1,]_shrinkage_scale 5.5126318 1.8178165 3.5266149 7.6545847
#> A[2,]_shrinkage_scale 5.0813030 1.9164053 3.0974824 7.9525957
#> A[3,]_shrinkage_scale 6.4805349 3.3732470 3.5601451 13.8244833
#> A_global_scale 0.6678598 0.1653758 0.4423705 0.9422769
#>
#>