
Provides posterior summary of structural shocks' conditional standard deviations
Source:R/summary.R
summary.PosteriorSigma.RdProvides posterior summary of structural shocks' conditional standard deviations including their mean, standard deviations, as well as 5 and 95 percentiles.
Usage
# S3 method for class 'PosteriorSigma'
summary(object, ...)Arguments
- object
an object of class PosteriorSigma obtained using the
compute_conditional_sd()function containing posterior draws of conditional standard deviations of structural shocks.- ...
additional arguments affecting the summary produced.
Value
A list reporting the posterior mean, standard deviations, as well as 5 and 95 percentiles of the structural shocks' conditional standard deviations for each of the shocks and periods.
Author
Tomasz Woźniak wozniak.tom@pm.me
Examples
specification = specify_bsvar_sv$new(us_fiscal_lsuw)
#> The identification is set to the default option of lower-triangular structural matrix.
burn_in = estimate(specification, 5)
#> **************************************************|
#> bsvars: Bayesian Structural Vector Autoregressions|
#> **************************************************|
#> Gibbs sampler for the SVAR-SV model |
#> Non-centred SV model is estimated |
#> **************************************************|
#> Progress of the MCMC simulation for 5 draws
#> Every draw is saved via MCMC thinning
#> Press Esc to interrupt the computations
#> **************************************************|
posterior = estimate(burn_in, 5)
#> **************************************************|
#> bsvars: Bayesian Structural Vector Autoregressions|
#> **************************************************|
#> Gibbs sampler for the SVAR-SV model |
#> Non-centred SV model is estimated |
#> **************************************************|
#> Progress of the MCMC simulation for 5 draws
#> Every draw is saved via MCMC thinning
#> Press Esc to interrupt the computations
#> **************************************************|
# compute structural shocks' conditional standard deviations
sigma = compute_conditional_sd(posterior)
sigma_summary = summary(sigma)
sigma_summary$shock1[,1] # access posterior mean of shock1
#> 1 2 3 4 5 6 7 8
#> 1.2320482 1.2900851 1.4415921 1.6092844 1.4774039 1.4295493 1.3248346 1.4167493
#> 9 10 11 12 13 14 15 16
#> 1.4155250 1.2729115 1.2851444 1.3432476 1.2909642 1.6002832 1.5836244 1.5541956
#> 17 18 19 20 21 22 23 24
#> 1.5370362 1.6707219 1.5892322 1.4551070 1.5462829 1.4573698 1.3535512 1.2086040
#> 25 26 27 28 29 30 31 32
#> 1.0122997 1.1695136 1.3703971 1.6684560 1.6823291 1.8501024 1.8705098 1.7217793
#> 33 34 35 36 37 38 39 40
#> 1.7984677 1.7588642 1.4609051 1.4175903 1.4603049 1.3983144 1.5923337 1.8950243
#> 41 42 43 44 45 46 47 48
#> 2.0524102 2.1795973 2.3822344 2.2843551 2.1369742 2.1016582 2.2863930 2.1429600
#> 49 50 51 52 53 54 55 56
#> 2.4952713 2.5782869 2.2678884 1.9897804 2.1577333 2.1419983 1.8495059 1.8102607
#> 57 58 59 60 61 62 63 64
#> 1.9468590 2.0220759 2.1460112 2.1658024 1.7687651 2.0131781 1.3521854 1.4494313
#> 65 66 67 68 69 70 71 72
#> 1.1823610 1.2717897 1.4578220 1.3143453 1.1759444 1.3990247 1.4704985 1.3575373
#> 73 74 75 76 77 78 79 80
#> 1.2802088 1.4295269 1.5941313 1.9800803 2.0313903 1.9321248 2.0145544 2.0604076
#> 81 82 83 84 85 86 87 88
#> 2.1635959 2.2650204 2.3624432 2.3901777 2.3699481 2.1481566 1.8708422 1.6227075
#> 89 90 91 92 93 94 95 96
#> 1.6331052 1.6381358 1.7059764 1.8318996 1.8213890 1.8337466 2.0847837 2.0131444
#> 97 98 99 100 101 102 103 104
#> 2.0152974 2.2686828 2.1994728 2.3110133 2.1828610 1.8760188 1.4970385 1.2770711
#> 105 106 107 108 109 110 111 112
#> 1.2782666 1.2933794 1.2940869 1.1294482 1.2819649 1.1041705 1.2696400 1.2968027
#> 113 114 115 116 117 118 119 120
#> 1.2188873 1.2271418 1.3145600 1.3267747 1.1622047 1.0837977 0.9861940 0.9804213
#> 121 122 123 124 125 126 127 128
#> 0.9291164 0.9865486 1.0403610 1.0480971 1.2301352 1.4237296 1.3186655 1.4840701
#> 129 130 131 132 133 134 135 136
#> 1.4674275 1.3063477 1.1361526 1.1328852 1.1108923 0.9918386 1.0812304 1.0070595
#> 137 138 139 140 141 142 143 144
#> 1.0656984 0.8284007 0.7930960 0.7805217 0.8125455 1.0568985 1.1159967 1.0024447
#> 145 146 147 148 149 150 151 152
#> 1.1687310 1.1718530 1.2776729 1.3970688 1.4508614 1.4110742 1.2761432 1.4467286
#> 153 154 155 156 157 158 159 160
#> 1.3121629 1.3175089 1.2542026 1.3518841 1.2032584 1.0088467 1.1083182 1.4450650
#> 161 162 163 164 165 166 167 168
#> 1.4495731 1.6330758 1.5927634 1.5490864 1.5052911 1.6867672 1.6141378 1.7147032
#> 169 170 171 172 173 174 175 176
#> 1.8665431 2.0798315 1.9144506 1.7452531 1.5499223 1.5157290 1.4925632 1.4934881
#> 177 178 179 180 181 182 183 184
#> 1.2908321 1.4268924 1.4844788 1.3536557 1.1427372 1.0889569 1.1710280 1.2729295
#> 185 186 187 188 189 190 191 192
#> 1.3795740 1.3733361 1.2084262 1.4835308 1.4522128 1.5096867 1.5510659 1.8914393
#> 193 194 195 196 197 198 199 200
#> 1.7127120 1.7054964 1.9745414 1.9923828 1.6990180 1.7051498 1.3330250 1.3699811
#> 201 202 203 204 205 206 207 208
#> 1.4015748 1.4490206 1.3384486 1.3115596 1.2347188 1.2138399 1.4552760 1.4620332
#> 209 210 211 212 213 214 215 216
#> 1.4379092 1.3719909 1.6129181 1.8096194 1.8671234 1.7801850 1.7372138 1.9489300
#> 217 218 219 220 221 222 223 224
#> 2.1337439 1.9582133 1.9769889 1.9408491 1.7482569 1.4211042 1.3481112 1.4154063
#> 225 226 227 228 229 230 231 232
#> 1.5082400 1.5035531 1.4504523 1.6572106 1.8240913 1.4745109 1.9454577 1.8206848
#> 233 234 235 236 237 238 239 240
#> 1.9383937 1.9015978 2.0240728 2.3299903 2.0798230 2.3996123 2.1905141 2.1206477
#> 241 242 243 244 245 246 247 248
#> 2.0039042 2.0023253 1.7921911 1.7869264 1.9957808 2.0207193 1.6953342 1.7495485
#> 249 250 251 252 253 254 255 256
#> 1.7285374 1.6644432 1.3607912 1.1999841 1.2257055 1.2991776 1.5346591 1.5318252
#> 257 258 259 260 261 262 263 264
#> 1.8370583 2.0863084 1.5330375 1.5434749 1.7417602 1.7602284 2.1028753 2.1506829
#> 265 266 267 268 269 270 271 272
#> 2.0220632 2.2960503 1.9680215 1.8758022 1.4762997 1.5566242 1.7455549 1.8595154
#> 273 274 275 276 277 278 279 280
#> 1.7677255 1.5502091 1.5679423 1.9167726 1.7523863 1.4780503 1.4623810 1.3653322
#> 281 282 283 284 285 286 287 288
#> 1.4158546 1.4702466 1.8710441 2.3549721 2.1553742 2.1002663 2.2383668 2.4364681
#> 289 290 291 292 293 294 295 296
#> 2.5341678 2.4554046 2.3901091 2.2116199 2.1307472 2.1919397 2.1060034 2.1701434
#> 297 298 299 300 301 302 303 304
#> 2.1234584 2.2963809 1.8521045 1.5685391 1.8816004 1.5924927 1.3496019 1.3567474
#> 305 306 307 308 309 310 311 312
#> 1.3140025 1.3431630 1.5379240 1.5197867 1.5744903 1.5305890 1.4424107 1.3727730
# workflow with the pipe |>
############################################################
set.seed(123)
us_fiscal_lsuw |>
specify_bsvar_sv$new() |>
estimate(S = 5) |>
estimate(S = 5) |>
compute_conditional_sd() |>
summary() -> sigma_summary
#> The identification is set to the default option of lower-triangular structural matrix.
#> **************************************************|
#> bsvars: Bayesian Structural Vector Autoregressions|
#> **************************************************|
#> Gibbs sampler for the SVAR-SV model |
#> Non-centred SV model is estimated |
#> **************************************************|
#> Progress of the MCMC simulation for 5 draws
#> Every draw is saved via MCMC thinning
#> Press Esc to interrupt the computations
#> **************************************************|
#> **************************************************|
#> bsvars: Bayesian Structural Vector Autoregressions|
#> **************************************************|
#> Gibbs sampler for the SVAR-SV model |
#> Non-centred SV model is estimated |
#> **************************************************|
#> Progress of the MCMC simulation for 5 draws
#> Every draw is saved via MCMC thinning
#> Press Esc to interrupt the computations
#> **************************************************|
sigma_summary$shock1[,1]
#> 1 2 3 4 5 6 7 8
#> 0.9995797 0.9907987 1.0333432 1.0056389 0.9890799 1.0129704 1.0113086 1.0042100
#> 9 10 11 12 13 14 15 16
#> 0.9875870 0.9792241 1.0239223 0.9925408 1.0100609 1.0119726 1.0217879 1.0066246
#> 17 18 19 20 21 22 23 24
#> 1.0097704 1.0062725 1.0042006 0.9749886 1.0036272 0.9937562 1.0168034 0.9931060
#> 25 26 27 28 29 30 31 32
#> 1.0016382 1.0048482 1.0054988 1.0212565 1.0025718 1.0035474 0.9905177 1.0119910
#> 33 34 35 36 37 38 39 40
#> 0.9744304 0.9988828 1.0248323 0.9947745 1.0171832 1.0187820 1.0284141 1.0078739
#> 41 42 43 44 45 46 47 48
#> 1.0025672 1.0433683 1.0144652 1.0194165 0.9921181 1.0142322 0.9787697 0.9985456
#> 49 50 51 52 53 54 55 56
#> 0.9952671 0.9970894 1.0219333 0.9880504 1.0259970 1.0318093 0.9639156 1.0009472
#> 57 58 59 60 61 62 63 64
#> 0.9848662 1.0113465 0.9797767 1.0116921 0.9809364 0.9945740 0.9949384 1.0081301
#> 65 66 67 68 69 70 71 72
#> 1.0093463 1.0213774 0.9973899 0.9827349 0.9943464 0.9787090 1.0082702 1.0013260
#> 73 74 75 76 77 78 79 80
#> 0.9980327 1.0050022 1.0105590 1.0102749 0.9893335 1.0187479 1.0176816 1.0075267
#> 81 82 83 84 85 86 87 88
#> 0.9831465 1.0131654 0.9946144 1.0113535 1.0251193 0.9927540 0.9830666 1.0159658
#> 89 90 91 92 93 94 95 96
#> 0.9835679 0.9872474 0.9836015 0.9966245 0.9725259 1.0063884 0.9923615 1.0152282
#> 97 98 99 100 101 102 103 104
#> 0.9878025 1.0211209 1.0021592 0.9823184 0.9845181 1.0330097 0.9968032 1.0056198
#> 105 106 107 108 109 110 111 112
#> 0.9812048 0.9895657 1.0067556 1.0000410 1.0200684 0.9983821 0.9888661 1.0296554
#> 113 114 115 116 117 118 119 120
#> 1.0209725 1.0032656 0.9907662 1.0419726 0.9991740 0.9672459 0.9721342 0.9869023
#> 121 122 123 124 125 126 127 128
#> 1.0187678 1.0042939 0.9850795 0.9775308 0.9851273 1.0175586 0.9993306 1.0148230
#> 129 130 131 132 133 134 135 136
#> 1.0052186 0.9924049 1.0061790 1.0123146 1.0031198 1.0321070 1.0089908 1.0082334
#> 137 138 139 140 141 142 143 144
#> 0.9902446 1.0192268 0.9820494 1.0218498 0.9876369 1.0014294 1.0153038 1.0064070
#> 145 146 147 148 149 150 151 152
#> 1.0024569 0.9968618 1.0047874 0.9957740 1.0307968 0.9592382 0.9837570 1.0189821
#> 153 154 155 156 157 158 159 160
#> 1.0233771 0.9871063 0.9950182 1.0145642 0.9993084 1.0220991 0.9906577 0.9780194
#> 161 162 163 164 165 166 167 168
#> 0.9818291 0.9992013 1.0076748 0.9812578 1.0075931 1.0235088 0.9888613 1.0015233
#> 169 170 171 172 173 174 175 176
#> 1.0020707 1.0040330 1.0094503 1.0060881 1.0016821 0.9931576 1.0056596 1.0041853
#> 177 178 179 180 181 182 183 184
#> 0.9993109 0.9948477 1.0022075 0.9867116 1.0017388 0.9799722 1.0195770 0.9786491
#> 185 186 187 188 189 190 191 192
#> 0.9957355 1.0166570 0.9877541 0.9874515 0.9799698 1.0131042 0.9902712 0.9991551
#> 193 194 195 196 197 198 199 200
#> 1.0080295 1.0052984 1.0039231 1.0187666 0.9928031 1.0044579 0.9807334 0.9983718
#> 201 202 203 204 205 206 207 208
#> 0.9825832 1.0131866 1.0521403 0.9993856 0.9955249 1.0315373 0.9809063 0.9909232
#> 209 210 211 212 213 214 215 216
#> 0.9988371 0.9949290 0.9940865 0.9766241 1.0088878 0.9968203 1.0010981 1.0231623
#> 217 218 219 220 221 222 223 224
#> 0.9734482 0.9945510 0.9860647 1.0048426 1.0099601 1.0078563 1.0130828 1.0008668
#> 225 226 227 228 229 230 231 232
#> 1.0041042 0.9909437 1.0176846 0.9768738 1.0027035 0.9905742 1.0027211 0.9988264
#> 233 234 235 236 237 238 239 240
#> 1.0106839 0.9972135 1.0032055 1.0189189 0.9985287 1.0300709 1.0008880 0.9844127
#> 241 242 243 244 245 246 247 248
#> 1.0155971 1.0012996 0.9965865 0.9994697 1.0156246 1.0069669 0.9936129 1.0050230
#> 249 250 251 252 253 254 255 256
#> 0.9744321 0.9968574 0.9919179 0.9901510 0.9844473 0.9898948 1.0105419 0.9701011
#> 257 258 259 260 261 262 263 264
#> 1.0083945 1.0432925 0.9889698 1.0073900 1.0021599 0.9763044 0.9935737 1.0044362
#> 265 266 267 268 269 270 271 272
#> 0.9906240 0.9812063 1.0127409 0.9799883 1.0016413 0.9847473 1.0102505 0.9802477
#> 273 274 275 276 277 278 279 280
#> 0.9864370 1.0090499 0.9879532 0.9871459 0.9931395 1.0086673 1.0158492 0.9773150
#> 281 282 283 284 285 286 287 288
#> 1.0109932 0.9899188 1.0143688 1.0032380 1.0125051 0.9976451 0.9817637 1.0318196
#> 289 290 291 292 293 294 295 296
#> 0.9813344 0.9972628 1.0153831 0.9860771 0.9843989 1.0206350 0.9909901 1.0363113
#> 297 298 299 300 301 302 303 304
#> 0.9842909 0.9901439 1.0055680 1.0070971 0.9959717 0.9886288 1.0175898 1.0050974
#> 305 306 307 308 309 310 311 312
#> 0.9954033 1.0023248 1.0088477 1.0138274 1.0101221 0.9940831 0.9775050 0.9998414