Provides posterior summary of Structural VAR with t-distributed shocks estimation
Source:R/summary.R
summary.PosteriorBSVART.Rd
Provides posterior mean, standard deviations, as well as 5 and 95 percentiles of the parameters: the structural matrix \(B\), autoregressive parameters \(A\), hyper-parameters, and Student-t degrees-of-freedom parameter \(\nu\).
Usage
# S3 method for class 'PosteriorBSVART'
summary(object, ...)
Arguments
- object
an object of class PosteriorBSVART obtained using the
estimate()
function applied to homoskedastic Bayesian Structural VAR model specification set by functionspecify_bsvar$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\), hyper-parameters, and Student-t degrees-of-freedom parameter \(\nu\).
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_t$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 model |
#> with t-distributed structural skocks |
#> **************************************************|
#> 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 model |
#> with t-distributed structural skocks |
#> **************************************************|
#> 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] 83.08816 7.432982 72.19555 91.92885
#>
#> $B$equation2
#> mean sd 5% quantile 95% quantile
#> B[2,1] -0.5959876 5.426337 -7.852271 8.569945
#> B[2,2] 79.4563110 5.040195 71.187514 84.532685
#>
#> $B$equation3
#> mean sd 5% quantile 95% quantile
#> B[3,1] -33.97542 5.291424 -43.49804 -26.56615
#> B[3,2] -17.43226 3.853681 -23.34845 -11.97249
#> B[3,3] 200.09898 15.868333 179.13264 230.84429
#>
#>
#> $A
#> $A$equation1
#> mean sd 5% quantile 95% quantile
#> lag1_var1 0.95515898 0.01082254 0.94364018 0.973210217
#> lag1_var2 -0.01658253 0.00937834 -0.03029286 -0.002966908
#> lag1_var3 0.05472966 0.01300958 0.03499293 0.071770452
#> const -0.17058367 0.07472968 -0.28676693 -0.082284728
#>
#> $A$equation2
#> mean sd 5% quantile 95% quantile
#> lag1_var1 -0.02539492 0.01407778 -0.040142424 -0.0009308137
#> lag1_var2 0.97163967 0.01153201 0.960738367 0.9885101394
#> lag1_var3 0.03526041 0.01762726 0.003969758 0.0554698741
#> const -0.25601299 0.09970515 -0.344046641 -0.1184152479
#>
#> $A$equation3
#> mean sd 5% quantile 95% quantile
#> lag1_var1 -0.012351306 0.007580670 -0.02239774 0.0003360014
#> lag1_var2 -0.006622576 0.003430107 -0.01225370 -0.0021860068
#> lag1_var3 1.014068782 0.009189047 0.99921105 1.0268460661
#> const -0.072239571 0.030080708 -0.12406986 -0.0362163961
#>
#>
#> $hyper
#> $hyper$B
#> mean sd 5% quantile 95% quantile
#> B[1,]_shrinkage 1538.4521 1086.7148 522.63568 3787.957
#> B[2,]_shrinkage 1344.5971 773.6346 556.55965 2283.403
#> B[3,]_shrinkage 4378.9388 1998.8022 2513.58917 8288.018
#> B[1,]_shrinkage_scale 7242.0050 4524.1381 958.83915 15363.983
#> B[2,]_shrinkage_scale 6799.8176 3659.0235 1430.41042 10309.693
#> B[3,]_shrinkage_scale 8397.8055 5035.6770 2062.87791 16054.700
#> B_global_scale 712.8364 454.3309 94.91977 1397.221
#>
#> $hyper$A
#> mean sd 5% quantile 95% quantile
#> A[1,]_shrinkage 0.2924931 0.11731013 0.1237939 0.4852739
#> A[2,]_shrinkage 0.3176801 0.17044913 0.1235787 0.5810493
#> A[3,]_shrinkage 0.3032528 0.14587096 0.1556416 0.6575046
#> A[1,]_shrinkage_scale 3.9883278 1.59082284 2.3625417 7.3505790
#> A[2,]_shrinkage_scale 4.0441837 1.60295292 2.1928113 7.2486669
#> A[3,]_shrinkage_scale 3.6247049 1.25573437 1.9689292 5.7684156
#> A_global_scale 0.4975190 0.09776025 0.3563678 0.6273223
#>
#>
#> $df
#> mean sd 5% quantile 95% quantile
#> 3.3085244 0.5851244 2.6646985 4.1772968
#>
# workflow with the pipe |>
############################################################
set.seed(123)
us_fiscal_lsuw |>
specify_bsvar_t$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 model |
#> with t-distributed structural skocks |
#> **************************************************|
#> 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 model |
#> with t-distributed structural skocks |
#> **************************************************|
#> 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] 83.08816 7.432982 72.19555 91.92885
#>
#> $B$equation2
#> mean sd 5% quantile 95% quantile
#> B[2,1] -0.5959876 5.426337 -7.852271 8.569945
#> B[2,2] 79.4563110 5.040195 71.187514 84.532685
#>
#> $B$equation3
#> mean sd 5% quantile 95% quantile
#> B[3,1] -33.97542 5.291424 -43.49804 -26.56615
#> B[3,2] -17.43226 3.853681 -23.34845 -11.97249
#> B[3,3] 200.09898 15.868333 179.13264 230.84429
#>
#>
#> $A
#> $A$equation1
#> mean sd 5% quantile 95% quantile
#> lag1_var1 0.95515898 0.01082254 0.94364018 0.973210217
#> lag1_var2 -0.01658253 0.00937834 -0.03029286 -0.002966908
#> lag1_var3 0.05472966 0.01300958 0.03499293 0.071770452
#> const -0.17058367 0.07472968 -0.28676693 -0.082284728
#>
#> $A$equation2
#> mean sd 5% quantile 95% quantile
#> lag1_var1 -0.02539492 0.01407778 -0.040142424 -0.0009308137
#> lag1_var2 0.97163967 0.01153201 0.960738367 0.9885101394
#> lag1_var3 0.03526041 0.01762726 0.003969758 0.0554698741
#> const -0.25601299 0.09970515 -0.344046641 -0.1184152479
#>
#> $A$equation3
#> mean sd 5% quantile 95% quantile
#> lag1_var1 -0.012351306 0.007580670 -0.02239774 0.0003360014
#> lag1_var2 -0.006622576 0.003430107 -0.01225370 -0.0021860068
#> lag1_var3 1.014068782 0.009189047 0.99921105 1.0268460661
#> const -0.072239571 0.030080708 -0.12406986 -0.0362163961
#>
#>
#> $hyper
#> $hyper$B
#> mean sd 5% quantile 95% quantile
#> B[1,]_shrinkage 1538.4521 1086.7148 522.63568 3787.957
#> B[2,]_shrinkage 1344.5971 773.6346 556.55965 2283.403
#> B[3,]_shrinkage 4378.9388 1998.8022 2513.58917 8288.018
#> B[1,]_shrinkage_scale 7242.0050 4524.1381 958.83915 15363.983
#> B[2,]_shrinkage_scale 6799.8176 3659.0235 1430.41042 10309.693
#> B[3,]_shrinkage_scale 8397.8055 5035.6770 2062.87791 16054.700
#> B_global_scale 712.8364 454.3309 94.91977 1397.221
#>
#> $hyper$A
#> mean sd 5% quantile 95% quantile
#> A[1,]_shrinkage 0.2924931 0.11731013 0.1237939 0.4852739
#> A[2,]_shrinkage 0.3176801 0.17044913 0.1235787 0.5810493
#> A[3,]_shrinkage 0.3032528 0.14587096 0.1556416 0.6575046
#> A[1,]_shrinkage_scale 3.9883278 1.59082284 2.3625417 7.3505790
#> A[2,]_shrinkage_scale 4.0441837 1.60295292 2.1928113 7.2486669
#> A[3,]_shrinkage_scale 3.6247049 1.25573437 1.9689292 5.7684156
#> A_global_scale 0.4975190 0.09776025 0.3563678 0.6273223
#>
#>
#> $df
#> mean sd 5% quantile 95% quantile
#> 3.3085244 0.5851244 2.6646985 4.1772968
#>