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] 10.58596 0.6289418 9.873576 11.78743
#>
#> $B$equation2
#> mean sd 5% quantile 95% quantile
#> B[2,1] -54.34818 3.144151 -59.31959 -49.79796
#> B[2,2] 37.39258 2.538504 33.58825 40.82855
#>
#> $B$equation3
#> mean sd 5% quantile 95% quantile
#> B[3,1] -44.14697 4.834732 -52.68184 -38.53157
#> B[3,2] -47.45051 3.326023 -52.86897 -42.07421
#> B[3,3] 101.44064 7.433715 93.17360 113.06358
#>
#>
#> $A
#> $A$equation1
#> mean sd 5% quantile 95% quantile
#> lag1_var1 1.2309016 0.015719105 1.2143158 1.2495828
#> lag1_var2 0.1988503 0.009902403 0.1852218 0.2121462
#> lag1_var3 -0.4657044 0.019144286 -0.4883770 -0.4397205
#> const 0.5491578 0.102823389 0.4214100 0.7096505
#>
#> $A$equation2
#> mean sd 5% quantile 95% quantile
#> lag1_var1 0.3984051 0.02743969 0.3598004 0.4442702
#> lag1_var2 1.2793203 0.02269762 1.2479364 1.3172526
#> lag1_var3 -0.7620605 0.03699388 -0.8240471 -0.7118160
#> const 0.6406510 0.19055423 0.3874277 0.9697347
#>
#> $A$equation3
#> mean sd 5% quantile 95% quantile
#> lag1_var1 0.3065699 0.02502751 0.2724296 0.3425950
#> lag1_var2 0.2320335 0.02203158 0.2047520 0.2628622
#> lag1_var3 0.4113975 0.04072096 0.3550634 0.4735537
#> const 0.6508130 0.14295926 0.4983664 0.8668387
#>
#>
#> $hyper
#> $hyper$B
#> mean sd 5% quantile 95% quantile
#> B[1,]_shrinkage 279.4535 177.8205 93.96507 532.1565
#> B[2,]_shrinkage 726.0074 275.7413 388.10410 1077.3320
#> B[3,]_shrinkage 1488.5063 600.3217 735.60690 2463.1713
#> B[1,]_shrinkage_scale 2197.4204 1255.6743 1053.30693 4997.9378
#> B[2,]_shrinkage_scale 3137.8909 1386.5789 1327.73168 5112.2093
#> B[3,]_shrinkage_scale 3453.1740 1760.1083 1313.26728 6761.4796
#> B_global_scale 261.1104 110.4119 102.11854 451.4488
#>
#> $hyper$A
#> mean sd 5% quantile 95% quantile
#> A[1,]_shrinkage 0.5560610 0.2340779 0.2831975 0.9530555
#> A[2,]_shrinkage 0.9025103 0.3682937 0.4620614 1.3447011
#> A[3,]_shrinkage 0.5707678 0.2784821 0.1623766 1.0455047
#> A[1,]_shrinkage_scale 6.8189620 2.0194534 3.6744493 9.5144057
#> A[2,]_shrinkage_scale 8.6539825 2.2308077 5.6838486 12.1113087
#> A[3,]_shrinkage_scale 5.5054275 1.7003552 2.9999186 7.6995466
#> A_global_scale 0.7290078 0.1489147 0.4375521 0.9071557
#>
#>
#> $df
#> mean sd 5% quantile 95% quantile
#> 5.0017311 0.4894042 4.4651058 5.8071892
#>
# 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] 10.58596 0.6289418 9.873576 11.78743
#>
#> $B$equation2
#> mean sd 5% quantile 95% quantile
#> B[2,1] -54.34818 3.144151 -59.31959 -49.79796
#> B[2,2] 37.39258 2.538504 33.58825 40.82855
#>
#> $B$equation3
#> mean sd 5% quantile 95% quantile
#> B[3,1] -44.14697 4.834732 -52.68184 -38.53157
#> B[3,2] -47.45051 3.326023 -52.86897 -42.07421
#> B[3,3] 101.44064 7.433715 93.17360 113.06358
#>
#>
#> $A
#> $A$equation1
#> mean sd 5% quantile 95% quantile
#> lag1_var1 1.2309016 0.015719105 1.2143158 1.2495828
#> lag1_var2 0.1988503 0.009902403 0.1852218 0.2121462
#> lag1_var3 -0.4657044 0.019144286 -0.4883770 -0.4397205
#> const 0.5491578 0.102823389 0.4214100 0.7096505
#>
#> $A$equation2
#> mean sd 5% quantile 95% quantile
#> lag1_var1 0.3984051 0.02743969 0.3598004 0.4442702
#> lag1_var2 1.2793203 0.02269762 1.2479364 1.3172526
#> lag1_var3 -0.7620605 0.03699388 -0.8240471 -0.7118160
#> const 0.6406510 0.19055423 0.3874277 0.9697347
#>
#> $A$equation3
#> mean sd 5% quantile 95% quantile
#> lag1_var1 0.3065699 0.02502751 0.2724296 0.3425950
#> lag1_var2 0.2320335 0.02203158 0.2047520 0.2628622
#> lag1_var3 0.4113975 0.04072096 0.3550634 0.4735537
#> const 0.6508130 0.14295926 0.4983664 0.8668387
#>
#>
#> $hyper
#> $hyper$B
#> mean sd 5% quantile 95% quantile
#> B[1,]_shrinkage 279.4535 177.8205 93.96507 532.1565
#> B[2,]_shrinkage 726.0074 275.7413 388.10410 1077.3320
#> B[3,]_shrinkage 1488.5063 600.3217 735.60690 2463.1713
#> B[1,]_shrinkage_scale 2197.4204 1255.6743 1053.30693 4997.9378
#> B[2,]_shrinkage_scale 3137.8909 1386.5789 1327.73168 5112.2093
#> B[3,]_shrinkage_scale 3453.1740 1760.1083 1313.26728 6761.4796
#> B_global_scale 261.1104 110.4119 102.11854 451.4488
#>
#> $hyper$A
#> mean sd 5% quantile 95% quantile
#> A[1,]_shrinkage 0.5560610 0.2340779 0.2831975 0.9530555
#> A[2,]_shrinkage 0.9025103 0.3682937 0.4620614 1.3447011
#> A[3,]_shrinkage 0.5707678 0.2784821 0.1623766 1.0455047
#> A[1,]_shrinkage_scale 6.8189620 2.0194534 3.6744493 9.5144057
#> A[2,]_shrinkage_scale 8.6539825 2.2308077 5.6838486 12.1113087
#> A[3,]_shrinkage_scale 5.5054275 1.7003552 2.9999186 7.6995466
#> A_global_scale 0.7290078 0.1489147 0.4375521 0.9071557
#>
#>
#> $df
#> mean sd 5% quantile 95% quantile
#> 5.0017311 0.4894042 4.4651058 5.8071892
#>