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.1463088 0.009032835   0.1291764    0.1577415
#> 
#> $B$equation2
#>             mean        sd 5% quantile 95% quantile
#> B[2,1] -9.122058 0.5749362   -9.814937    -8.240765
#> B[2,2] 29.337458 1.8448825   26.574637    31.575527
#> 
#> $B$equation3
#>              mean       sd 5% quantile 95% quantile
#> B[3,1] -25.093668 2.128962   -28.78237    -22.87146
#> B[3,2]  -8.671187 1.338821   -10.92238     -6.83709
#> B[3,3]  41.961601 3.227598    37.78359     47.38380
#> 
#> 
#> $A
#> $A$equation1
#>                  mean         sd 5% quantile 95% quantile
#> lag1_var1  1.07848410 0.03742100  1.02289448   1.12821216
#> lag1_var2  0.04793021 0.01002822  0.03314085   0.06038962
#> lag1_var3 -0.99442768 0.04659825 -1.04786504  -0.92079391
#> const      0.45187505 0.09010311  0.31056622   0.60232381
#> 
#> $A$equation2
#>                   mean          sd 5% quantile 95% quantile
#> lag1_var1  0.006528893 0.013118161  -0.0161531   0.03013003
#> lag1_var2  0.978424932 0.008937848   0.9661768   0.99093117
#> lag1_var3 -0.283876436 0.018270584  -0.3119400  -0.24995013
#> const     -0.201258634 0.061025674  -0.2746592  -0.11636077
#> 
#> $A$equation3
#>                 mean          sd 5% quantile 95% quantile
#> lag1_var1 0.07489302 0.028004602  0.03315787   0.11144552
#> lag1_var2 0.03630131 0.008622314  0.02578227   0.04953043
#> lag1_var3 0.31214088 0.035029962  0.27118482   0.36507477
#> const     0.34093693 0.069281883  0.24074181   0.45456348
#> 
#> 
#> $hyper
#> $hyper$B
#>                            mean        sd 5% quantile 95% quantile
#> B[1,]_shrinkage        204.0904  118.7422    42.76632     377.9641
#> B[2,]_shrinkage        418.2846  327.2226   115.76630    1084.1153
#> B[3,]_shrinkage        409.5379  242.6494   166.12470     818.3264
#> B[1,]_shrinkage_scale 1915.5645  994.8332   522.34557    3363.0842
#> B[2,]_shrinkage_scale 2188.1161 1027.6212   640.31230    3615.6016
#> B[3,]_shrinkage_scale 2422.1086 1258.3076   509.63617    4543.4095
#> B_global_scale         207.0792  103.5440    50.29796     338.5183
#> 
#> $hyper$A
#>                            mean        sd 5% quantile 95% quantile
#> A[1,]_shrinkage       0.5456872 0.2967020   0.3112557    1.2465107
#> A[2,]_shrinkage       0.4383701 0.2110306   0.1567067    0.7801562
#> A[3,]_shrinkage       0.5731561 0.2722667   0.3125718    0.9904203
#> A[1,]_shrinkage_scale 6.0147272 2.5500143   3.0301482    9.6348756
#> A[2,]_shrinkage_scale 5.4767823 2.5994272   2.6107193    8.1987593
#> A[3,]_shrinkage_scale 5.6181383 1.5825742   3.4034778    8.1837449
#> A_global_scale        0.6862015 0.1904112   0.4653403    1.0070992
#> 
#> 

# 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.1463088 0.009032835   0.1291764    0.1577415
#> 
#> $B$equation2
#>             mean        sd 5% quantile 95% quantile
#> B[2,1] -9.122058 0.5749362   -9.814937    -8.240765
#> B[2,2] 29.337458 1.8448825   26.574637    31.575527
#> 
#> $B$equation3
#>              mean       sd 5% quantile 95% quantile
#> B[3,1] -25.093668 2.128962   -28.78237    -22.87146
#> B[3,2]  -8.671187 1.338821   -10.92238     -6.83709
#> B[3,3]  41.961601 3.227598    37.78359     47.38380
#> 
#> 
#> $A
#> $A$equation1
#>                  mean         sd 5% quantile 95% quantile
#> lag1_var1  1.07848410 0.03742100  1.02289448   1.12821216
#> lag1_var2  0.04793021 0.01002822  0.03314085   0.06038962
#> lag1_var3 -0.99442768 0.04659825 -1.04786504  -0.92079391
#> const      0.45187505 0.09010311  0.31056622   0.60232381
#> 
#> $A$equation2
#>                   mean          sd 5% quantile 95% quantile
#> lag1_var1  0.006528893 0.013118161  -0.0161531   0.03013003
#> lag1_var2  0.978424932 0.008937848   0.9661768   0.99093117
#> lag1_var3 -0.283876436 0.018270584  -0.3119400  -0.24995013
#> const     -0.201258634 0.061025674  -0.2746592  -0.11636077
#> 
#> $A$equation3
#>                 mean          sd 5% quantile 95% quantile
#> lag1_var1 0.07489302 0.028004602  0.03315787   0.11144552
#> lag1_var2 0.03630131 0.008622314  0.02578227   0.04953043
#> lag1_var3 0.31214088 0.035029962  0.27118482   0.36507477
#> const     0.34093693 0.069281883  0.24074181   0.45456348
#> 
#> 
#> $hyper
#> $hyper$B
#>                            mean        sd 5% quantile 95% quantile
#> B[1,]_shrinkage        204.0904  118.7422    42.76632     377.9641
#> B[2,]_shrinkage        418.2846  327.2226   115.76630    1084.1153
#> B[3,]_shrinkage        409.5379  242.6494   166.12470     818.3264
#> B[1,]_shrinkage_scale 1915.5645  994.8332   522.34557    3363.0842
#> B[2,]_shrinkage_scale 2188.1161 1027.6212   640.31230    3615.6016
#> B[3,]_shrinkage_scale 2422.1086 1258.3076   509.63617    4543.4095
#> B_global_scale         207.0792  103.5440    50.29796     338.5183
#> 
#> $hyper$A
#>                            mean        sd 5% quantile 95% quantile
#> A[1,]_shrinkage       0.5456872 0.2967020   0.3112557    1.2465107
#> A[2,]_shrinkage       0.4383701 0.2110306   0.1567067    0.7801562
#> A[3,]_shrinkage       0.5731561 0.2722667   0.3125718    0.9904203
#> A[1,]_shrinkage_scale 6.0147272 2.5500143   3.0301482    9.6348756
#> A[2,]_shrinkage_scale 5.4767823 2.5994272   2.6107193    8.1987593
#> A[3,]_shrinkage_scale 5.6181383 1.5825742   3.4034778    8.1837449
#> A_global_scale        0.6862015 0.1904112   0.4653403    1.0070992
#> 
#>