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

Arguments

object

an object of class PosteriorBSVARMIX obtained using the estimate() function applied to non-normal Bayesian Structural VAR model specification set by function specify_bsvar_mix$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_mix$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-finiteMIX 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-finiteMIX 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.8859504 0.04557373   0.8390233    0.9705268
#> 
#> $B$equation2
#>             mean        sd 5% quantile 95% quantile
#> B[2,1] -14.51780 0.9649436   -16.31072    -13.26978
#> B[2,2]  26.47413 1.7613650    24.24419     29.60215
#> 
#> $B$equation3
#>              mean        sd 5% quantile 95% quantile
#> B[3,1] -24.104179 1.9709510  -27.222219   -21.860571
#> B[3,2] -12.139160 1.4572263  -14.147340    -9.979660
#> B[3,3]   4.694757 0.3745233    4.298605     5.206056
#> 
#> 
#> $A
#> $A$equation1
#>                   mean         sd 5% quantile 95% quantile
#> lag1_var1  0.995520830 0.01379379  0.97880356   1.01789831
#> lag1_var2 -0.009726718 0.01493311 -0.03190701   0.01013020
#> lag1_var3 -0.140151641 0.01709098 -0.16685603  -0.12048095
#> const     -0.093901179 0.12765971 -0.30678376   0.07955208
#> 
#> $A$equation2
#>                  mean         sd 5% quantile 95% quantile
#> lag1_var1 -0.01216069 0.01407726 -0.02894543   0.01419200
#> lag1_var2  0.96204461 0.01466788  0.94028778   0.98128622
#> lag1_var3 -0.06207442 0.01863837 -0.09366021  -0.04089315
#> const     -0.35814747 0.11690882 -0.51223291  -0.18774552
#> 
#> $A$equation3
#>                  mean         sd 5% quantile 95% quantile
#> lag1_var1  0.23526160 0.08565937  0.08332651  0.352730995
#> lag1_var2  0.02331848 0.12389679 -0.15991602  0.183045821
#> lag1_var3 -0.26159894 0.12098253 -0.44146429 -0.008021952
#> const      0.13553997 1.01445366 -1.15857762  1.457816020
#> 
#> 
#> $hyper
#> $hyper$B
#>                            mean        sd 5% quantile 95% quantile
#> B[1,]_shrinkage        69.81477  37.09537    38.37764     121.5577
#> B[2,]_shrinkage       149.03715  69.05517    81.80745     279.0465
#> B[3,]_shrinkage       161.07046  65.07743    87.54984     262.7530
#> B[1,]_shrinkage_scale 645.44736 197.93789   315.88403     994.4652
#> B[2,]_shrinkage_scale 834.60526 294.00010   415.29299    1208.4563
#> B[3,]_shrinkage_scale 860.80737 244.48031   599.95750    1255.5275
#> B_global_scale         76.03565  21.48212    45.89639     104.9907
#> 
#> $hyper$A
#>                            mean        sd 5% quantile 95% quantile
#> A[1,]_shrinkage       0.7581819 0.2851213   0.4624183     1.331598
#> A[2,]_shrinkage       0.9213164 0.6994917   0.3593850     2.237067
#> A[3,]_shrinkage       0.9390282 0.3947502   0.5158148     1.576518
#> A[1,]_shrinkage_scale 8.6563628 2.3525220   5.6104726    10.793061
#> A[2,]_shrinkage_scale 8.4133668 3.1244351   5.4802277    14.226370
#> A[3,]_shrinkage_scale 9.2380758 2.3301440   5.8405356    13.026686
#> A_global_scale        0.9381420 0.1684611   0.7384985     1.251813
#> 
#> 

# workflow with the pipe |>
############################################################
set.seed(123)
us_fiscal_lsuw |>
  specify_bsvar_mix$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-finiteMIX 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-finiteMIX 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.8859504 0.04557373   0.8390233    0.9705268
#> 
#> $B$equation2
#>             mean        sd 5% quantile 95% quantile
#> B[2,1] -14.51780 0.9649436   -16.31072    -13.26978
#> B[2,2]  26.47413 1.7613650    24.24419     29.60215
#> 
#> $B$equation3
#>              mean        sd 5% quantile 95% quantile
#> B[3,1] -24.104179 1.9709510  -27.222219   -21.860571
#> B[3,2] -12.139160 1.4572263  -14.147340    -9.979660
#> B[3,3]   4.694757 0.3745233    4.298605     5.206056
#> 
#> 
#> $A
#> $A$equation1
#>                   mean         sd 5% quantile 95% quantile
#> lag1_var1  0.995520830 0.01379379  0.97880356   1.01789831
#> lag1_var2 -0.009726718 0.01493311 -0.03190701   0.01013020
#> lag1_var3 -0.140151641 0.01709098 -0.16685603  -0.12048095
#> const     -0.093901179 0.12765971 -0.30678376   0.07955208
#> 
#> $A$equation2
#>                  mean         sd 5% quantile 95% quantile
#> lag1_var1 -0.01216069 0.01407726 -0.02894543   0.01419200
#> lag1_var2  0.96204461 0.01466788  0.94028778   0.98128622
#> lag1_var3 -0.06207442 0.01863837 -0.09366021  -0.04089315
#> const     -0.35814747 0.11690882 -0.51223291  -0.18774552
#> 
#> $A$equation3
#>                  mean         sd 5% quantile 95% quantile
#> lag1_var1  0.23526160 0.08565937  0.08332651  0.352730995
#> lag1_var2  0.02331848 0.12389679 -0.15991602  0.183045821
#> lag1_var3 -0.26159894 0.12098253 -0.44146429 -0.008021952
#> const      0.13553997 1.01445366 -1.15857762  1.457816020
#> 
#> 
#> $hyper
#> $hyper$B
#>                            mean        sd 5% quantile 95% quantile
#> B[1,]_shrinkage        69.81477  37.09537    38.37764     121.5577
#> B[2,]_shrinkage       149.03715  69.05517    81.80745     279.0465
#> B[3,]_shrinkage       161.07046  65.07743    87.54984     262.7530
#> B[1,]_shrinkage_scale 645.44736 197.93789   315.88403     994.4652
#> B[2,]_shrinkage_scale 834.60526 294.00010   415.29299    1208.4563
#> B[3,]_shrinkage_scale 860.80737 244.48031   599.95750    1255.5275
#> B_global_scale         76.03565  21.48212    45.89639     104.9907
#> 
#> $hyper$A
#>                            mean        sd 5% quantile 95% quantile
#> A[1,]_shrinkage       0.7581819 0.2851213   0.4624183     1.331598
#> A[2,]_shrinkage       0.9213164 0.6994917   0.3593850     2.237067
#> A[3,]_shrinkage       0.9390282 0.3947502   0.5158148     1.576518
#> A[1,]_shrinkage_scale 8.6563628 2.3525220   5.6104726    10.793061
#> A[2,]_shrinkage_scale 8.4133668 3.1244351   5.4802277    14.226370
#> A[3,]_shrinkage_scale 9.2380758 2.3301440   5.8405356    13.026686
#> A_global_scale        0.9381420 0.1684611   0.7384985     1.251813
#> 
#>