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

Arguments

object

an object of class PosteriorBSVARHMSH obtained using the estimate() function applied to heteroskedastic Bayesian Structural VAR model specification set by function specify_bsvar_hmsh$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

# specify the model
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.1163801 0.004451424   0.1108612    0.1212273
#> 
#> $B$equation2
#>             mean         sd 5% quantile 95% quantile
#> B[2,1] -2.421544 0.09998016   -2.550328    -2.263251
#> B[2,2] 39.789073 1.57195852   37.779871    42.051344
#> 
#> $B$equation3
#>               mean       sd 5% quantile 95% quantile
#> B[3,1] -34.0110036 1.688849  -36.303209   -31.570254
#> B[3,2]  -0.4001968 1.661643   -2.824844     2.070324
#> B[3,3]  68.4256179 3.360682   63.508786    72.696601
#> 
#> 
#> $A
#> $A$equation1
#>                  mean         sd 5% quantile 95% quantile
#> lag1_var1  1.10306348 0.02041255   1.0624204   1.13081453
#> lag1_var2 -0.08743742 0.02500305  -0.1320953  -0.04611642
#> lag1_var3 -1.18674316 0.02454435  -1.2259100  -1.14537133
#> const     -0.44543820 0.25134105  -0.9656655  -0.10493977
#> 
#> $A$equation2
#>                  mean          sd 5% quantile 95% quantile
#> lag1_var1 -0.01236075 0.018642686 -0.03707834   0.01292174
#> lag1_var2  0.95320522 0.009310762  0.94282067   0.96859615
#> lag1_var3 -0.04482425 0.023346341 -0.07697885  -0.01269816
#> const     -0.40822225 0.076319052 -0.51805243  -0.29599571
#> 
#> $A$equation3
#>                  mean         sd 5% quantile 95% quantile
#> lag1_var1  0.06103112 0.01260253  0.04182775   0.07595037
#> lag1_var2 -0.04547133 0.01019487 -0.06443759  -0.03253096
#> lag1_var3  0.39753158 0.01450746  0.37864721   0.41749747
#> const     -0.23945940 0.10818131 -0.46390716  -0.10118892
#> 
#> 
#> $hyper
#> $hyper$B
#>                            mean         sd 5% quantile 95% quantile
#> B[1,]_shrinkage        125.9822   92.77791    38.71095     315.1386
#> B[2,]_shrinkage        339.7281  160.29173   154.04762     578.2734
#> B[3,]_shrinkage        729.5079  387.61158   372.46751    1640.2062
#> B[1,]_shrinkage_scale 1256.9621  694.49677   508.79276    2518.6128
#> B[2,]_shrinkage_scale 1881.3129  746.31906   693.48138    3227.3765
#> B[3,]_shrinkage_scale 2400.4889 1301.74000   917.59523    4519.4948
#> B_global_scale         180.7662   89.94251    66.73597     317.4467
#> 
#> $hyper$A
#>                            mean        sd 5% quantile 95% quantile
#> A[1,]_shrinkage       0.6396548 0.3024713   0.2690203    1.1499078
#> A[2,]_shrinkage       0.3088774 0.1441568   0.1648633    0.5927821
#> A[3,]_shrinkage       0.4943507 0.2818449   0.2360151    1.0514632
#> A[1,]_shrinkage_scale 6.0872159 3.1944465   3.1318910   10.4650317
#> A[2,]_shrinkage_scale 4.3574331 1.7362110   2.3246351    6.4595594
#> A[3,]_shrinkage_scale 6.3073374 2.9858786   3.3786286    9.4582138
#> A_global_scale        0.6547847 0.2478635   0.4375439    1.1695708
#> 
#> 

# workflow with the pipe |>
############################################################
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.1607718 0.005891614   0.1536149    0.1687372
#> 
#> $B$equation2
#>             mean       sd 5% quantile 95% quantile
#> B[2,1] -29.22746 1.721325   -31.66046    -27.04306
#> B[2,2]  18.59747 1.095353    17.21750     20.15970
#> 
#> $B$equation3
#>              mean       sd 5% quantile 95% quantile
#> B[3,1] -14.914205 2.153902   -18.48017  -12.0045324
#> B[3,2]  -1.555131 1.193899    -3.19756    0.6806797
#> B[3,3]  92.593199 5.461584    88.03655  102.6091932
#> 
#> 
#> $A
#> $A$equation1
#>                 mean         sd 5% quantile 95% quantile
#> lag1_var1  0.8960161 0.02657170   0.8556291    0.9409651
#> lag1_var2 -0.1794944 0.02146154  -0.2078793   -0.1461472
#> lag1_var3 -0.5169513 0.02948418  -0.5651454   -0.4802226
#> const     -0.5367944 0.18337438  -0.8003999   -0.2504321
#> 
#> $A$equation2
#>                 mean         sd 5% quantile 95% quantile
#> lag1_var1 -0.1396953 0.05164195  -0.2037452  -0.04867839
#> lag1_var2  0.6880416 0.02458647   0.6528867   0.72532134
#> lag1_var3 -0.8390813 0.05877985  -0.9449228  -0.76849474
#> const     -1.1258089 0.21917124  -1.4349211  -0.83335584
#> 
#> $A$equation3
#>                  mean          sd 5% quantile 95% quantile
#> lag1_var1 -0.02217972 0.010178694 -0.03568952 -0.005271625
#> lag1_var2 -0.03643737 0.004456214 -0.04568300 -0.030152685
#> lag1_var3  0.90627402 0.012594248  0.88436225  0.923449778
#> const     -0.12626945 0.042528507 -0.19250275 -0.062987748
#> 
#> 
#> $hyper
#> $hyper$B
#>                            mean        sd 5% quantile 95% quantile
#> B[1,]_shrinkage        227.9702  211.9849    16.79189     523.4618
#> B[2,]_shrinkage        529.6174  465.7674   135.79428    1173.3340
#> B[3,]_shrinkage        898.5433  346.6595   452.59559    1412.0139
#> B[1,]_shrinkage_scale 2051.3009 1863.7060   179.56130    5497.7522
#> B[2,]_shrinkage_scale 2739.8112 2261.8452   263.68073    6729.8773
#> B[3,]_shrinkage_scale 2984.4597 2449.5591   228.97808    7039.2278
#> B_global_scale         244.5958  198.4488    23.81896     524.1008
#> 
#> $hyper$A
#>                            mean        sd 5% quantile 95% quantile
#> A[1,]_shrinkage       0.6337025 0.2754703   0.2976079     1.195706
#> A[2,]_shrinkage       0.7812351 0.3114975   0.3922602     1.331117
#> A[3,]_shrinkage       0.6229169 0.3252595   0.2440427     1.190655
#> A[1,]_shrinkage_scale 7.2719716 2.5289479   4.4084086    10.961178
#> A[2,]_shrinkage_scale 8.1666259 3.1642161   5.2253351    14.218632
#> A[3,]_shrinkage_scale 7.4733256 2.4655103   4.2789399    11.310315
#> A_global_scale        0.8302290 0.2092657   0.5639435     1.212561
#> 
#>