Skip to contents

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 'PosteriorBSVARMSH'
summary(object, ...)

Arguments

object

an object of class PosteriorBSVARMSH obtained using the estimate() function applied to heteroskedastic Bayesian Structural VAR model specification set by function specify_bsvar_msh$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_msh$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-stationaryMSH model             |
#> **************************************************|
#>  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-stationaryMSH model             |
#> **************************************************|
#>  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.8791454 0.04225267    0.824303    0.9544864
#> 
#> $B$equation2
#>             mean       sd 5% quantile 95% quantile
#> B[2,1] -14.39417 1.119199   -15.85810    -12.58573
#> B[2,2]  26.42899 2.061810    23.00067     29.19221
#> 
#> $B$equation3
#>              mean        sd 5% quantile 95% quantile
#> B[3,1] -24.183502 1.8238207  -26.353771   -22.058522
#> B[3,2]  -9.970481 1.3481796  -11.983543    -8.187286
#> B[3,3]   4.556295 0.3546924    4.177978     4.990375
#> 
#> 
#> $A
#> $A$equation1
#>                  mean         sd 5% quantile 95% quantile
#> lag1_var1  1.03603469 0.01448456  1.00601197    1.0556971
#> lag1_var2 -0.05707191 0.01826205 -0.08228354   -0.0311250
#> lag1_var3 -0.17393160 0.02009343 -0.20131446   -0.1367982
#> const     -0.43397781 0.17217771 -0.73802882   -0.2372379
#> 
#> $A$equation2
#>                  mean         sd  5% quantile 95% quantile
#> lag1_var1  0.03207832 0.01808707  0.008755884   0.05982562
#> lag1_var2  0.95290281 0.01595871  0.933451696   0.97870847
#> lag1_var3 -0.10751847 0.02502719 -0.143815282  -0.07720829
#> const     -0.37645870 0.13124787 -0.490449740  -0.15234097
#> 
#> $A$equation3
#>                 mean         sd 5% quantile 95% quantile
#> lag1_var1  0.6353398 0.09517387   0.5157742   0.80612925
#> lag1_var2 -0.1732000 0.12313029  -0.3292692   0.02525451
#> lag1_var3 -0.6515248 0.15081138  -0.8976978  -0.46613940
#> const     -1.0189938 1.05173606  -2.6164628   0.64712957
#> 
#> 
#> $hyper
#> $hyper$B
#>                            mean        sd 5% quantile 95% quantile
#> B[1,]_shrinkage        55.60269  29.49570    15.92597     95.54725
#> B[2,]_shrinkage       165.04201  76.52940    75.11856    307.83172
#> B[3,]_shrinkage       136.86404  56.32265    71.88319    215.63172
#> B[1,]_shrinkage_scale 653.51806 365.74631   140.80401   1195.54194
#> B[2,]_shrinkage_scale 990.70480 604.57540   429.65017   1848.93749
#> B[3,]_shrinkage_scale 917.09656 480.35115   281.26672   1608.32753
#> B_global_scale         85.94420  43.94304    36.76815    135.77622
#> 
#> $hyper$A
#>                             mean        sd 5% quantile 95% quantile
#> A[1,]_shrinkage        1.3051823 1.0179544   0.4317802     2.233092
#> A[2,]_shrinkage        0.9378915 0.4435990   0.4960773     1.975226
#> A[3,]_shrinkage        1.4029751 0.6679666   0.6771159     2.551294
#> A[1,]_shrinkage_scale 13.3870314 5.5459891   7.8551699    19.500016
#> A[2,]_shrinkage_scale 11.6692031 5.4402654   6.8138145    20.212811
#> A[3,]_shrinkage_scale 13.6528828 6.6910411   7.2230926    29.552251
#> A_global_scale         1.3705265 0.5958991   0.7990972     2.844731
#> 
#> 

# workflow with the pipe |>
############################################################
set.seed(123)
us_fiscal_lsuw |>
  specify_bsvar_msh$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-stationaryMSH model             |
#> **************************************************|
#>  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-stationaryMSH model             |
#> **************************************************|
#>  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.8791454 0.04225267    0.824303    0.9544864
#> 
#> $B$equation2
#>             mean       sd 5% quantile 95% quantile
#> B[2,1] -14.39417 1.119199   -15.85810    -12.58573
#> B[2,2]  26.42899 2.061810    23.00067     29.19221
#> 
#> $B$equation3
#>              mean        sd 5% quantile 95% quantile
#> B[3,1] -24.183502 1.8238207  -26.353771   -22.058522
#> B[3,2]  -9.970481 1.3481796  -11.983543    -8.187286
#> B[3,3]   4.556295 0.3546924    4.177978     4.990375
#> 
#> 
#> $A
#> $A$equation1
#>                  mean         sd 5% quantile 95% quantile
#> lag1_var1  1.03603469 0.01448456  1.00601197    1.0556971
#> lag1_var2 -0.05707191 0.01826205 -0.08228354   -0.0311250
#> lag1_var3 -0.17393160 0.02009343 -0.20131446   -0.1367982
#> const     -0.43397781 0.17217771 -0.73802882   -0.2372379
#> 
#> $A$equation2
#>                  mean         sd  5% quantile 95% quantile
#> lag1_var1  0.03207832 0.01808707  0.008755884   0.05982562
#> lag1_var2  0.95290281 0.01595871  0.933451696   0.97870847
#> lag1_var3 -0.10751847 0.02502719 -0.143815282  -0.07720829
#> const     -0.37645870 0.13124787 -0.490449740  -0.15234097
#> 
#> $A$equation3
#>                 mean         sd 5% quantile 95% quantile
#> lag1_var1  0.6353398 0.09517387   0.5157742   0.80612925
#> lag1_var2 -0.1732000 0.12313029  -0.3292692   0.02525451
#> lag1_var3 -0.6515248 0.15081138  -0.8976978  -0.46613940
#> const     -1.0189938 1.05173606  -2.6164628   0.64712957
#> 
#> 
#> $hyper
#> $hyper$B
#>                            mean        sd 5% quantile 95% quantile
#> B[1,]_shrinkage        55.60269  29.49570    15.92597     95.54725
#> B[2,]_shrinkage       165.04201  76.52940    75.11856    307.83172
#> B[3,]_shrinkage       136.86404  56.32265    71.88319    215.63172
#> B[1,]_shrinkage_scale 653.51806 365.74631   140.80401   1195.54194
#> B[2,]_shrinkage_scale 990.70480 604.57540   429.65017   1848.93749
#> B[3,]_shrinkage_scale 917.09656 480.35115   281.26672   1608.32753
#> B_global_scale         85.94420  43.94304    36.76815    135.77622
#> 
#> $hyper$A
#>                             mean        sd 5% quantile 95% quantile
#> A[1,]_shrinkage        1.3051823 1.0179544   0.4317802     2.233092
#> A[2,]_shrinkage        0.9378915 0.4435990   0.4960773     1.975226
#> A[3,]_shrinkage        1.4029751 0.6679666   0.6771159     2.551294
#> A[1,]_shrinkage_scale 13.3870314 5.5459891   7.8551699    19.500016
#> A[2,]_shrinkage_scale 11.6692031 5.4402654   6.8138145    20.212811
#> A[3,]_shrinkage_scale 13.6528828 6.6910411   7.2230926    29.552251
#> A_global_scale         1.3705265 0.5958991   0.7990972     2.844731
#> 
#>