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.1457447 0.009314145   0.1293442    0.1579257
#> 
#> $B$equation2
#>             mean        sd 5% quantile 95% quantile
#> B[2,1] -8.526607 0.7646093    -9.54723     -7.44683
#> B[2,2] 27.593535 2.4748858    24.09579     30.86426
#> 
#> $B$equation3
#>              mean       sd 5% quantile 95% quantile
#> B[3,1] -24.371301 1.927371   -26.69286    -21.93406
#> B[3,2]  -7.144051 1.125330    -8.81883     -5.68333
#> B[3,3]  40.138549 3.181920    36.56111     43.58322
#> 
#> 
#> $A
#> $A$equation1
#>                 mean          sd 5% quantile 95% quantile
#> lag1_var1  1.0688039 0.020651971  1.04008892   1.10076201
#> lag1_var2 -0.0289662 0.007017126 -0.03805791  -0.02054552
#> lag1_var3 -0.9631348 0.027250477 -1.00779944  -0.92577840
#> const     -0.1699146 0.068046314 -0.26210118  -0.08297315
#> 
#> $A$equation2
#>                  mean          sd 5% quantile 95% quantile
#> lag1_var1  0.00259267 0.010770886 -0.01111269   0.02101303
#> lag1_var2  0.95201365 0.007731751  0.94134191   0.96163491
#> lag1_var3 -0.26718560 0.013782516 -0.28720807  -0.25391881
#> const     -0.38892076 0.056124667 -0.46014828  -0.31626036
#> 
#> $A$equation3
#>                  mean          sd 5% quantile 95% quantile
#> lag1_var1  0.06632431 0.014533592  0.04484724  0.085360340
#> lag1_var2 -0.01537847 0.004268758 -0.02217867 -0.009766971
#> lag1_var3  0.33609339 0.018788824  0.31218481  0.364500572
#> const     -0.07519547 0.051930331 -0.16318020  0.025019092
#> 
#> 
#> $hyper
#> $hyper$B
#>                            mean         sd 5% quantile 95% quantile
#> B[1,]_shrinkage        214.1591  315.46169    30.75986     509.8715
#> B[2,]_shrinkage        210.1952  151.70044    80.91627     525.3034
#> B[3,]_shrinkage        360.1923  150.22035   207.42146     636.5635
#> B[1,]_shrinkage_scale 1439.1323 1216.66180   353.80046    2923.7151
#> B[2,]_shrinkage_scale 1372.5247  749.63231   427.12363    2508.2925
#> B[3,]_shrinkage_scale 1727.6229 1049.75707   600.78956    3407.1613
#> B_global_scale         133.6762   84.63039    41.09738     269.5907
#> 
#> $hyper$A
#>                            mean        sd 5% quantile 95% quantile
#> A[1,]_shrinkage       0.4579148 0.4319430   0.1432773    0.8497848
#> A[2,]_shrinkage       0.4358701 0.2043693   0.2061438    0.8446141
#> A[3,]_shrinkage       0.4611586 0.2957567   0.1636154    1.0013833
#> A[1,]_shrinkage_scale 4.0808902 1.3225609   2.1484565    5.9644275
#> A[2,]_shrinkage_scale 5.1880456 2.3993311   2.2539966    8.8684154
#> A[3,]_shrinkage_scale 4.8676175 2.3082269   1.9203296    9.5986153
#> A_global_scale        0.5545031 0.1630473   0.3707168    0.7558593
#> 
#> 

# 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.1457447 0.009314145   0.1293442    0.1579257
#> 
#> $B$equation2
#>             mean        sd 5% quantile 95% quantile
#> B[2,1] -8.526607 0.7646093    -9.54723     -7.44683
#> B[2,2] 27.593535 2.4748858    24.09579     30.86426
#> 
#> $B$equation3
#>              mean       sd 5% quantile 95% quantile
#> B[3,1] -24.371301 1.927371   -26.69286    -21.93406
#> B[3,2]  -7.144051 1.125330    -8.81883     -5.68333
#> B[3,3]  40.138549 3.181920    36.56111     43.58322
#> 
#> 
#> $A
#> $A$equation1
#>                 mean          sd 5% quantile 95% quantile
#> lag1_var1  1.0688039 0.020651971  1.04008892   1.10076201
#> lag1_var2 -0.0289662 0.007017126 -0.03805791  -0.02054552
#> lag1_var3 -0.9631348 0.027250477 -1.00779944  -0.92577840
#> const     -0.1699146 0.068046314 -0.26210118  -0.08297315
#> 
#> $A$equation2
#>                  mean          sd 5% quantile 95% quantile
#> lag1_var1  0.00259267 0.010770886 -0.01111269   0.02101303
#> lag1_var2  0.95201365 0.007731751  0.94134191   0.96163491
#> lag1_var3 -0.26718560 0.013782516 -0.28720807  -0.25391881
#> const     -0.38892076 0.056124667 -0.46014828  -0.31626036
#> 
#> $A$equation3
#>                  mean          sd 5% quantile 95% quantile
#> lag1_var1  0.06632431 0.014533592  0.04484724  0.085360340
#> lag1_var2 -0.01537847 0.004268758 -0.02217867 -0.009766971
#> lag1_var3  0.33609339 0.018788824  0.31218481  0.364500572
#> const     -0.07519547 0.051930331 -0.16318020  0.025019092
#> 
#> 
#> $hyper
#> $hyper$B
#>                            mean         sd 5% quantile 95% quantile
#> B[1,]_shrinkage        214.1591  315.46169    30.75986     509.8715
#> B[2,]_shrinkage        210.1952  151.70044    80.91627     525.3034
#> B[3,]_shrinkage        360.1923  150.22035   207.42146     636.5635
#> B[1,]_shrinkage_scale 1439.1323 1216.66180   353.80046    2923.7151
#> B[2,]_shrinkage_scale 1372.5247  749.63231   427.12363    2508.2925
#> B[3,]_shrinkage_scale 1727.6229 1049.75707   600.78956    3407.1613
#> B_global_scale         133.6762   84.63039    41.09738     269.5907
#> 
#> $hyper$A
#>                            mean        sd 5% quantile 95% quantile
#> A[1,]_shrinkage       0.4579148 0.4319430   0.1432773    0.8497848
#> A[2,]_shrinkage       0.4358701 0.2043693   0.2061438    0.8446141
#> A[3,]_shrinkage       0.4611586 0.2957567   0.1636154    1.0013833
#> A[1,]_shrinkage_scale 4.0808902 1.3225609   2.1484565    5.9644275
#> A[2,]_shrinkage_scale 5.1880456 2.3993311   2.2539966    8.8684154
#> A[3,]_shrinkage_scale 4.8676175 2.3082269   1.9203296    9.5986153
#> A_global_scale        0.5545031 0.1630473   0.3707168    0.7558593
#> 
#>