The class PosteriorBSVAR contains posterior output and the specification including
the last MCMC draw for the homoskedastic bsvar model.
Note that due to the thinning of the MCMC output the starting value in element last_draw
might not be equal to the last draw provided in element posterior
.
Public fields
last_draw
an object of class BSVAR with the last draw of the current MCMC run as the starting value to be passed to the continuation of the MCMC estimation using
estimate()
.posterior
a list containing Bayesian estimation output collected in elements an
NxNxS
arrayB
, anNxKxS
arrayA
, and a5xS
matrixhyper
.
Methods
Method new()
Create a new posterior output PosteriorBSVAR.
Usage
specify_posterior_bsvar$new(specification_bsvar, posterior_bsvar)
Method get_posterior()
Returns a list containing Bayesian estimation output collected in elements
an NxNxS
array B
, an NxKxS
array A
, and a 5xS
matrix hyper
.
Examples
data(us_fiscal_lsuw)
specification = specify_bsvar$new(us_fiscal_lsuw)
set.seed(123)
estimate = estimate(specification, 50)
estimate$get_posterior()
Method get_last_draw()
Returns an object of class BSVAR with the last draw of the current MCMC run as
the starting value to be passed to the continuation of the MCMC estimation using estimate()
.
Examples
data(us_fiscal_lsuw)
# specify the model and set seed
specification = specify_bsvar$new(us_fiscal_lsuw, p = 4)
set.seed(123)
# run the burn-in
burn_in = estimate(specification, 10)
# estimate the model
posterior = estimate(burn_in, 10)
Method is_normalised()
Returns TRUE
if the posterior has been normalised using normalise_posterior()
and FALSE
otherwise.
Examples
# upload data
data(us_fiscal_lsuw)
# specify the model and set seed
specification = specify_bsvar$new(us_fiscal_lsuw, p = 4)
set.seed(123)
# estimate the model
posterior = estimate(specification, 10, thin = 1)
# check normalisation status beforehand
posterior$is_normalised()
# normalise the posterior
BB = posterior$last_draw$starting_values$B # get the last draw of B
B_hat = diag((-1) * sign(diag(BB))) %*% BB # set negative diagonal elements
normalise_posterior(posterior, B_hat) # draws in posterior are normalised
# check normalisation status afterwards
posterior$is_normalised()
Method set_normalised()
Sets the private indicator normalised
to TRUE.
Examples
# This is an internal function that is run while executing normalise_posterior()
# Observe its working by analysing the workflow:
# upload data
data(us_fiscal_lsuw)
# specify the model and set seed
specification = specify_bsvar$new(us_fiscal_lsuw, p = 4)
set.seed(123)
# estimate the model
posterior = estimate(specification, 10, thin = 1)
# check normalisation status beforehand
posterior$is_normalised()
# normalise the posterior
BB = posterior$last_draw$starting_values$B # get the last draw of B
B_hat = diag(sign(diag(BB))) %*% BB # set positive diagonal elements
normalise_posterior(posterior, B_hat) # draws in posterior are normalised
# check normalisation status afterwards
posterior$is_normalised()
Examples
# This is a function that is used within estimate()
data(us_fiscal_lsuw)
specification = specify_bsvar$new(us_fiscal_lsuw, p = 4)
#> The identification is set to the default option of lower-triangular structural matrix.
set.seed(123)
estimate = estimate(specification, 50)
#> **************************************************|
#> bsvars: Bayesian Structural Vector Autoregressions|
#> **************************************************|
#> Gibbs sampler for the SVAR model |
#> **************************************************|
#> Progress of the MCMC simulation for 50 draws
#> Every draw is saved via MCMC thinning
#> Press Esc to interrupt the computations
#> **************************************************|
class(estimate)
#> [1] "PosteriorBSVAR" "R6"
## ------------------------------------------------
## Method `specify_posterior_bsvar$get_posterior`
## ------------------------------------------------
data(us_fiscal_lsuw)
specification = specify_bsvar$new(us_fiscal_lsuw)
#> The identification is set to the default option of lower-triangular structural matrix.
set.seed(123)
estimate = estimate(specification, 50)
#> **************************************************|
#> bsvars: Bayesian Structural Vector Autoregressions|
#> **************************************************|
#> Gibbs sampler for the SVAR model |
#> **************************************************|
#> Progress of the MCMC simulation for 50 draws
#> Every draw is saved via MCMC thinning
#> Press Esc to interrupt the computations
#> **************************************************|
estimate$get_posterior()
#> $B
#> , , 1
#>
#> [,1] [,2] [,3]
#> [1,] 8.662167 0.000000 0.00000
#> [2,] 1.938469 11.719456 0.00000
#> [3,] -8.257903 1.431661 2.14347
#>
#> , , 2
#>
#> [,1] [,2] [,3]
#> [1,] 30.665689 0.000000 0.00000
#> [2,] 2.170310 32.937622 0.00000
#> [3,] -7.321201 2.177172 14.53752
#>
#> , , 3
#>
#> [,1] [,2] [,3]
#> [1,] 32.6932186 0.000000 0.00000
#> [2,] 0.1084961 35.112609 0.00000
#> [3,] -12.1636858 3.571312 57.44829
#>
#> , , 4
#>
#> [,1] [,2] [,3]
#> [1,] 31.8895623 0.0000000 0.00000
#> [2,] 0.3971475 41.1849294 0.00000
#> [3,] -14.1756107 -0.3802925 98.11497
#>
#> , , 5
#>
#> [,1] [,2] [,3]
#> [1,] 35.1271800 0.000000 0.00000
#> [2,] -0.7708185 41.731739 0.00000
#> [3,] -9.6275449 2.289482 95.78223
#>
#> , , 6
#>
#> [,1] [,2] [,3]
#> [1,] 36.4076344 0.0000000 0.00000
#> [2,] 0.7324476 39.3608174 0.00000
#> [3,] -13.1424661 -0.1627647 97.76397
#>
#> , , 7
#>
#> [,1] [,2] [,3]
#> [1,] 37.29254 0.0000000 0.00000
#> [2,] -4.92782 37.7245887 0.00000
#> [3,] -13.86282 -0.2080503 97.76958
#>
#> , , 8
#>
#> [,1] [,2] [,3]
#> [1,] 35.3607708 0.000000 0.00000
#> [2,] 0.2621701 40.064484 0.00000
#> [3,] -16.3694770 1.437798 97.57485
#>
#> , , 9
#>
#> [,1] [,2] [,3]
#> [1,] 35.585390 0.000000 0.00000
#> [2,] -1.921768 39.210794 0.00000
#> [3,] -13.562292 2.556881 96.95352
#>
#> , , 10
#>
#> [,1] [,2] [,3]
#> [1,] 32.907416 0.000000 0.0000
#> [2,] 3.988762 40.495182 0.0000
#> [3,] -12.758959 -1.779168 100.5858
#>
#> , , 11
#>
#> [,1] [,2] [,3]
#> [1,] 34.7973042 0.000000 0.0000
#> [2,] -0.9053354 37.891286 0.0000
#> [3,] -16.0776826 1.648439 100.3118
#>
#> , , 12
#>
#> [,1] [,2] [,3]
#> [1,] 34.025339 0.0000000 0.0000
#> [2,] -2.677401 41.6669047 0.0000
#> [3,] -13.697003 -0.2756703 94.8679
#>
#> , , 13
#>
#> [,1] [,2] [,3]
#> [1,] 32.55771 0.00000 0.00000
#> [2,] -2.52915 40.40486 0.00000
#> [3,] -14.39484 -1.92988 94.93118
#>
#> , , 14
#>
#> [,1] [,2] [,3]
#> [1,] 33.5935985 0.000000 0.00000
#> [2,] -0.9493395 36.119026 0.00000
#> [3,] -10.4397123 4.753352 93.00665
#>
#> , , 15
#>
#> [,1] [,2] [,3]
#> [1,] 36.880294 0.000000 0.00000
#> [2,] 1.686558 39.832301 0.00000
#> [3,] -14.911759 -2.046415 99.11315
#>
#> , , 16
#>
#> [,1] [,2] [,3]
#> [1,] 35.450798 0.000000 0.0000
#> [2,] -1.342376 39.264545 0.0000
#> [3,] -16.119942 -3.243802 91.9473
#>
#> , , 17
#>
#> [,1] [,2] [,3]
#> [1,] 35.0770658 0.000000 0.00000
#> [2,] -0.2494709 41.551734 0.00000
#> [3,] -14.1058627 1.755131 89.30961
#>
#> , , 18
#>
#> [,1] [,2] [,3]
#> [1,] 34.54620 0.000000 0.0000
#> [2,] 3.37013 38.545075 0.0000
#> [3,] -13.11945 -2.639217 94.6314
#>
#> , , 19
#>
#> [,1] [,2] [,3]
#> [1,] 34.8854474 0.000000 0.00000
#> [2,] -0.2236394 38.877170 0.00000
#> [3,] -14.0676902 1.952563 89.15566
#>
#> , , 20
#>
#> [,1] [,2] [,3]
#> [1,] 33.2823904 0.000000 0.0000
#> [2,] -0.7953774 40.158551 0.0000
#> [3,] -15.2347094 4.379604 93.2496
#>
#> , , 21
#>
#> [,1] [,2] [,3]
#> [1,] 34.634302 0.000000 0.0000
#> [2,] -1.400685 36.956882 0.0000
#> [3,] -13.438284 1.359299 103.0149
#>
#> , , 22
#>
#> [,1] [,2] [,3]
#> [1,] 36.19569 0.000000 0.00000
#> [2,] -1.58669 40.500480 0.00000
#> [3,] -11.01133 -1.759044 97.81132
#>
#> , , 23
#>
#> [,1] [,2] [,3]
#> [1,] 32.375893 0.000000 0.0000
#> [2,] -2.874419 39.217151 0.0000
#> [3,] -14.715665 3.903051 101.1957
#>
#> , , 24
#>
#> [,1] [,2] [,3]
#> [1,] 36.573667 0.0000000 0.000
#> [2,] 3.330501 41.0834282 0.000
#> [3,] -14.416351 -0.5822583 101.122
#>
#> , , 25
#>
#> [,1] [,2] [,3]
#> [1,] 36.466122 0.000000 0.0000
#> [2,] -1.281989 41.705802 0.0000
#> [3,] -18.888412 -2.040201 108.4092
#>
#> , , 26
#>
#> [,1] [,2] [,3]
#> [1,] 38.6685018 0.000000 0.00000
#> [2,] -0.8562812 40.541311 0.00000
#> [3,] -16.9452701 -2.813895 89.96929
#>
#> , , 27
#>
#> [,1] [,2] [,3]
#> [1,] 36.013475 0.000000 0.00000
#> [2,] -4.663414 38.874961 0.00000
#> [3,] -13.695234 1.501722 94.90054
#>
#> , , 28
#>
#> [,1] [,2] [,3]
#> [1,] 33.0058080 0.000000 0.00000
#> [2,] -0.3276779 40.784101 0.00000
#> [3,] -15.4387909 -1.674639 93.94495
#>
#> , , 29
#>
#> [,1] [,2] [,3]
#> [1,] 34.4909429 0.0000000 0.00000
#> [2,] 0.1435734 42.9436411 0.00000
#> [3,] -12.5784016 -0.3756234 98.25361
#>
#> , , 30
#>
#> [,1] [,2] [,3]
#> [1,] 38.3401093 0.000000 0.00000
#> [2,] 0.5417507 37.513361 0.00000
#> [3,] -14.4620007 1.400685 94.74042
#>
#> , , 31
#>
#> [,1] [,2] [,3]
#> [1,] 37.8522375 0.000000 0.00000
#> [2,] 0.4682023 37.923335 0.00000
#> [3,] -13.5060530 -2.148566 99.16818
#>
#> , , 32
#>
#> [,1] [,2] [,3]
#> [1,] 35.0536878 0.00000000 0.00000
#> [2,] -0.8397925 41.05736515 0.00000
#> [3,] -14.3123437 -0.08830506 97.24206
#>
#> , , 33
#>
#> [,1] [,2] [,3]
#> [1,] 34.382560 0.0000000 0.0000
#> [2,] -0.331774 40.4104874 0.0000
#> [3,] -12.951299 -0.6540644 99.5799
#>
#> , , 34
#>
#> [,1] [,2] [,3]
#> [1,] 33.2831821 0.0000000 0.0000
#> [2,] -0.9367652 39.5408995 0.0000
#> [3,] -14.2828208 0.6681871 101.9179
#>
#> , , 35
#>
#> [,1] [,2] [,3]
#> [1,] 33.7612619 0.000000 0.0000
#> [2,] 0.1208969 39.692111 0.0000
#> [3,] -11.8927912 2.301272 103.7556
#>
#> , , 36
#>
#> [,1] [,2] [,3]
#> [1,] 36.69845 0.000000 0.0000
#> [2,] 2.25167 37.275527 0.0000
#> [3,] -11.97066 -3.382259 102.6574
#>
#> , , 37
#>
#> [,1] [,2] [,3]
#> [1,] 33.054091 0.000000 0.00000
#> [2,] -3.040899 39.038812 0.00000
#> [3,] -13.931240 2.270599 94.44981
#>
#> , , 38
#>
#> [,1] [,2] [,3]
#> [1,] 34.423038 0.000000 0.00000
#> [2,] -1.905069 35.690436 0.00000
#> [3,] -14.149529 -1.715041 99.26037
#>
#> , , 39
#>
#> [,1] [,2] [,3]
#> [1,] 35.001132 0.000000 0.00000
#> [2,] -1.153953 36.298428 0.00000
#> [3,] -12.319947 2.966679 98.45844
#>
#> , , 40
#>
#> [,1] [,2] [,3]
#> [1,] 32.725562 0.000000 0.00000
#> [2,] 2.796588 38.790723 0.00000
#> [3,] -17.271237 -3.810498 99.92416
#>
#> , , 41
#>
#> [,1] [,2] [,3]
#> [1,] 36.292498 0.000000 0.00000
#> [2,] -2.516089 37.009172 0.00000
#> [3,] -13.337667 1.151402 96.32619
#>
#> , , 42
#>
#> [,1] [,2] [,3]
#> [1,] 31.9789021 0.0000000 0.00000
#> [2,] 0.9758585 37.9018855 0.00000
#> [3,] -15.0271378 -0.2968109 95.20229
#>
#> , , 43
#>
#> [,1] [,2] [,3]
#> [1,] 32.4354749 0.000000 0.00000
#> [2,] 0.2396978 37.861717 0.00000
#> [3,] -16.9256655 2.046997 96.21263
#>
#> , , 44
#>
#> [,1] [,2] [,3]
#> [1,] 35.4443193 0.000000 0.00000
#> [2,] 0.8679765 39.029994 0.00000
#> [3,] -16.4760019 2.449663 99.64965
#>
#> , , 45
#>
#> [,1] [,2] [,3]
#> [1,] 35.226732 0.000000 0.00000
#> [2,] 2.992025 38.899216 0.00000
#> [3,] -15.225899 3.060608 92.80367
#>
#> , , 46
#>
#> [,1] [,2] [,3]
#> [1,] 36.410384 0.0000000 0.00000
#> [2,] 2.459248 38.7312728 0.00000
#> [3,] -14.742020 0.7960476 95.87301
#>
#> , , 47
#>
#> [,1] [,2] [,3]
#> [1,] 34.396986 0.000000 0.00000
#> [2,] 4.343234 38.778457 0.00000
#> [3,] -15.868865 3.957751 95.45388
#>
#> , , 48
#>
#> [,1] [,2] [,3]
#> [1,] 33.259306 0.000000 0.00000
#> [2,] 2.552468 36.641647 0.00000
#> [3,] -15.176873 5.288228 99.73356
#>
#> , , 49
#>
#> [,1] [,2] [,3]
#> [1,] 34.597376 0.000000 0.0000
#> [2,] 2.025386 39.307866 0.0000
#> [3,] -12.925665 -2.281834 101.1866
#>
#> , , 50
#>
#> [,1] [,2] [,3]
#> [1,] 34.93991 0.000000000 0.0000
#> [2,] -3.67415 42.016450941 0.0000
#> [3,] -16.26755 -0.001730577 100.3098
#>
#>
#> $A
#> , , 1
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 1.2361217 0.1752888 -0.6162843 -0.6867387
#> [2,] 0.8504753 0.7770437 -0.9992269 -1.6864404
#> [3,] 0.3259054 -0.1527592 0.7520143 -0.2689724
#>
#> , , 2
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.82996905 -0.02380466 0.19202188 -0.3964919
#> [2,] 0.02627421 0.97616196 -0.03061677 -0.2179907
#> [3,] -0.82808589 -0.01416856 1.96067039 -0.7215810
#>
#> , , 3
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.835903225 -0.0004406107 0.19607352 -0.07315619
#> [2,] 0.002486396 0.9596781550 0.00614115 -0.32900364
#> [3,] -0.169524723 -0.0077594396 1.21034908 -0.09466564
#>
#> , , 4
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.81938752 0.017414940 0.21760043 0.109006709
#> [2,] -0.02584033 0.948960925 0.04356713 -0.422811999
#> [3,] -0.03681255 0.003156208 1.04189349 0.003377465
#>
#> , , 5
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.873602399 0.014461639 0.155904662 0.13038713
#> [2,] 0.006017143 0.957940292 -0.004033097 -0.39015262
#> [3,] -0.020367387 -0.003574109 1.025198526 -0.03426247
#>
#> , , 6
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.89520916 0.008237471 0.12416210 0.02996813
#> [2,] -0.05435342 0.965035449 0.07195469 -0.31838698
#> [3,] -0.02330021 -0.011413855 1.02932123 -0.10825789
#>
#> , , 7
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.950362536 -0.014912946 0.06501144 -0.1234906
#> [2,] -0.027149339 0.959073926 0.03620728 -0.3909383
#> [3,] -0.008138258 -0.009877254 1.00854483 -0.1074524
#>
#> , , 8
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.927324110 -0.010668856 0.091295261 -0.10200422
#> [2,] 0.009724565 0.973279851 -0.008956162 -0.23677380
#> [3,] 0.003791606 -0.002952608 0.990781664 -0.05949437
#>
#> , , 9
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.971456945 0.019429721 0.02530757 0.11899359
#> [2,] -0.034657783 0.955676771 0.05001583 -0.38920422
#> [3,] -0.007982375 -0.007933742 1.00855196 -0.08514353
#>
#> , , 10
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.928187887 0.013686848 0.08836213 0.1293122
#> [2,] -0.045229323 0.952468066 0.06050110 -0.4423853
#> [3,] -0.009715283 -0.007647118 1.01044987 -0.0844271
#>
#> , , 11
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.938999246 -0.021891200 0.077682201 -0.20526541
#> [2,] 0.002698828 0.944311139 0.001077208 -0.51714678
#> [3,] -0.013643667 -0.004632601 1.014829074 -0.05893511
#>
#> , , 12
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.897022023 -0.02226432 0.13627176 -0.1630503
#> [2,] -0.006530651 0.95295195 0.02436634 -0.3430183
#> [3,] -0.027228638 -0.01242714 1.03609617 -0.1048858
#>
#> , , 13
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.912779856 0.011861885 0.10320127 0.07255249
#> [2,] -0.005270663 0.944220460 0.01728843 -0.47547166
#> [3,] -0.020944777 -0.004552653 1.02449481 -0.05543587
#>
#> , , 14
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.909077749 0.001537603 0.11244203 0.004219768
#> [2,] -0.006597046 0.947098683 0.01923554 -0.441942541
#> [3,] -0.006568708 -0.003868147 1.00539342 -0.055644861
#>
#> , , 15
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.946390394 0.017847301 0.05606118 0.09948307
#> [2,] -0.006420203 0.938194163 0.01728142 -0.54174962
#> [3,] -0.035291827 -0.002427424 1.04337702 -0.02584270
#>
#> , , 16
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.87291098 0.011066180 0.15520017 0.08370741
#> [2,] -0.04346097 0.948600816 0.06295496 -0.44568102
#> [3,] -0.01853853 -0.009235246 1.02548471 -0.07111545
#>
#> , , 17
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.941852415 -0.007978908 0.08331033 0.004627405
#> [2,] -0.021773407 0.960824397 0.02460936 -0.408439098
#> [3,] -0.001801907 -0.005026160 1.00488530 -0.026425222
#>
#> , , 18
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.93117010 0.004231817 0.086411053 0.04779940
#> [2,] -0.00497843 0.957048144 0.006463979 -0.42464521
#> [3,] -0.02430829 -0.003362217 1.027464188 -0.05236418
#>
#> , , 19
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.89244977 0.003862542 0.12840850 -0.005085882
#> [2,] -0.01885142 0.938004417 0.03108008 -0.562031097
#> [3,] -0.01972824 -0.005752202 1.02391704 -0.059602985
#>
#> , , 20
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.92701157 -0.007916014 0.09032357 -0.08066189
#> [2,] -0.05780443 0.967254036 0.07234216 -0.32307732
#> [3,] -0.01112924 -0.003972614 1.01512286 -0.02689493
#>
#> , , 21
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.89491498 0.001955838 0.13253430 0.03219964
#> [2,] -0.02322033 0.944875280 0.03477903 -0.50751096
#> [3,] -0.02703256 -0.007821200 1.03304643 -0.08008510
#>
#> , , 22
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.88806456 0.004099631 0.13888703 0.03512316
#> [2,] -0.06421773 0.953969156 0.08736775 -0.40509627
#> [3,] -0.02421041 -0.006804078 1.02876748 -0.07620122
#>
#> , , 23
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.89505520 0.009765306 0.1228948 0.03475145
#> [2,] -0.02239154 0.976349362 0.0288893 -0.22716115
#> [3,] -0.02177225 -0.002081917 1.0237725 -0.04353656
#>
#> , , 24
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.91141147 -0.007580668 0.10655413 -0.10845854
#> [2,] -0.04026062 0.949117691 0.05124138 -0.50155233
#> [3,] -0.01861016 -0.005184949 1.02019273 -0.07185348
#>
#> , , 25
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.94285693 -0.0002074573 0.06626772 -0.03878748
#> [2,] -0.03648133 0.9592995630 0.05388223 -0.34111391
#> [3,] -0.01300112 -0.0005347009 1.01233894 -0.03147943
#>
#> , , 26
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.932845752 0.005217248 0.08025740 0.027182883
#> [2,] -0.012608551 0.960579557 0.01472627 -0.399805385
#> [3,] -0.008047499 -0.002043957 1.01110151 -0.009207929
#>
#> , , 27
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.93448449 -0.0007037976 0.08024712 -0.01703308
#> [2,] -0.04613141 0.9523403474 0.06034144 -0.45346615
#> [3,] -0.01481054 -0.0096785935 1.01940035 -0.08572528
#>
#> , , 28
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.91723623 -0.028212487 0.10735197 -0.25015645
#> [2,] -0.01150985 0.961608175 0.01560503 -0.37189240
#> [3,] -0.01971206 -0.002939275 1.02256440 -0.04102651
#>
#> , , 29
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.914135769 0.003011831 0.10626231 0.02242828
#> [2,] -0.015428431 0.946828374 0.02560372 -0.48189698
#> [3,] -0.008762331 -0.008656471 1.01098645 -0.08208198
#>
#> , , 30
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.94496838 0.014412399 0.06440561 0.1163740
#> [2,] -0.03730739 0.936067231 0.05959117 -0.5377661
#> [3,] -0.01021600 -0.003099066 1.01114898 -0.0382756
#>
#> , , 31
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.938625126 0.012455509 0.06571873 0.04606311
#> [2,] -0.054632874 0.958407073 0.07639939 -0.35006169
#> [3,] -0.004288104 -0.003631184 0.99962510 -0.07583137
#>
#> , , 32
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.94325735 -0.006695145 0.0617686 -0.1326770
#> [2,] -0.03158964 0.980821072 0.0454460 -0.1460484
#> [3,] -0.02259314 -0.012418568 1.0287866 -0.1166431
#>
#> , , 33
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.92156493 -0.021354282 0.10051108 -0.19161706
#> [2,] -0.02940890 0.951089102 0.04093845 -0.45261421
#> [3,] -0.01578227 -0.008834276 1.02037217 -0.07896203
#>
#> , , 34
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.930275845 -0.003344202 0.090703941 -0.00593822
#> [2,] 0.007579006 0.972063782 -0.008195317 -0.26516317
#> [3,] -0.017977982 -0.008526747 1.023345194 -0.07520154
#>
#> , , 35
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.92569323 -0.006763323 0.09521661 -0.04723568
#> [2,] -0.02450414 0.946889611 0.04069663 -0.45086264
#> [3,] -0.01530281 -0.002855576 1.01811536 -0.03245868
#>
#> , , 36
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.91454830 -0.009298057 0.11457161 -0.03192301
#> [2,] -0.06274810 0.937480077 0.08870209 -0.54283535
#> [3,] -0.01708506 -0.004460324 1.01844068 -0.06384471
#>
#> , , 37
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.90642958 0.009438427 0.10565976 0.01183042
#> [2,] -0.06003484 0.946957395 0.08293758 -0.46916877
#> [3,] -0.01585357 -0.012344957 1.02045075 -0.11413592
#>
#> , , 38
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.91131181 -0.0080416304 0.10730356 -0.10434989
#> [2,] -0.02447448 0.9506996627 0.03589806 -0.44892301
#> [3,] -0.01187840 -0.0008415361 1.00856549 -0.05173602
#>
#> , , 39
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.91235653 0.023613404 0.08453664 0.04795509
#> [2,] -0.06898755 0.969702324 0.07538352 -0.38427399
#> [3,] -0.01377628 -0.004629803 1.01430774 -0.06397211
#>
#> , , 40
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.95757417 0.008599803 0.04288932 0.013483140
#> [2,] -0.04002566 0.950834691 0.05573971 -0.445649476
#> [3,] -0.01271977 0.002095982 1.01165166 -0.007581603
#>
#> , , 41
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.93563939 0.003340558 0.08134544 0.04772287
#> [2,] -0.02238666 0.938904195 0.03677040 -0.54357611
#> [3,] -0.01807627 -0.005563915 1.02141937 -0.06036340
#>
#> , , 42
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.93344104 0.009004273 0.07714788 0.05036585
#> [2,] -0.05386515 0.955128468 0.07110018 -0.42125286
#> [3,] -0.01732638 -0.007448802 1.02012782 -0.08099079
#>
#> , , 43
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.96084859 -0.023454702 0.05681890 -0.16830069
#> [2,] 0.01256072 0.963604377 -0.01323525 -0.34198880
#> [3,] -0.02005867 -0.007628887 1.02292263 -0.08719138
#>
#> , , 44
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.90987583 -0.004263686 0.1065296 -0.08673092
#> [2,] -0.05063372 0.957084239 0.0630050 -0.42853747
#> [3,] -0.02054447 -0.012318329 1.0263765 -0.11395380
#>
#> , , 45
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.91589416 0.008356872 0.09959782 0.04047366
#> [2,] -0.04133322 0.952011000 0.06437124 -0.37759958
#> [3,] -0.02831196 -0.003284438 1.03241759 -0.05218057
#>
#> , , 46
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.93760683 0.004309375 0.07141395 -0.0034830341
#> [2,] -0.05416795 0.973255183 0.07443532 -0.2134082071
#> [3,] -0.02640834 0.001756793 1.03035775 0.0005025318
#>
#> , , 47
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.92371440 -1.998929e-06 0.08478939 -0.08074420
#> [2,] -0.02733722 9.647091e-01 0.03532662 -0.34221565
#> [3,] -0.02675372 -9.921290e-03 1.03428017 -0.08934778
#>
#> , , 48
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.908485855 -0.020778466 0.119253151 -0.1695092
#> [2,] -0.004220853 0.954035469 0.005288475 -0.4553722
#> [3,] -0.018953260 -0.008067098 1.025405937 -0.0647499
#>
#> , , 49
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.917191302 0.003019668 0.09479906 -0.03478903
#> [2,] 0.008180561 0.953019277 -0.01032092 -0.46498875
#> [3,] -0.008920102 -0.005365497 1.00938371 -0.06284306
#>
#> , , 50
#>
#> [,1] [,2] [,3] [,4]
#> [1,] 0.91860068 -0.017605886 0.09751484 -0.20792541
#> [2,] -0.01968401 0.953174558 0.02690556 -0.44821022
#> [3,] -0.01469813 -0.004953221 1.01631019 -0.06246983
#>
#>
#> $hyper
#> , , 1
#>
#> [,1] [,2]
#> [1,] 2.234132 1.1306314
#> [2,] 6.153157 1.0546211
#> [3,] 3.382887 0.4929745
#> [4,] 22.651755 17.4748071
#> [5,] 26.013064 15.6841633
#> [6,] 41.449674 10.0039639
#> [7,] 2.962011 0.8364195
#>
#> , , 2
#>
#> [,1] [,2]
#> [1,] 12.697195 2.9010629
#> [2,] 11.334442 0.5127081
#> [3,] 9.385133 0.9558535
#> [4,] 55.098353 15.3672848
#> [5,] 77.471700 6.7061649
#> [6,] 30.977607 8.2629077
#> [7,] 6.154964 1.2140976
#>
#> , , 3
#>
#> [,1] [,2]
#> [1,] 59.354097 0.7295580
#> [2,] 89.404551 0.3979416
#> [3,] 36.718318 1.0419660
#> [4,] 84.572213 13.5765333
#> [5,] 84.094391 8.0755522
#> [6,] 51.835943 9.1810524
#> [7,] 6.342308 0.9930535
#>
#> , , 4
#>
#> [,1] [,2]
#> [1,] 53.654901 0.6932222
#> [2,] 100.938909 1.4191822
#> [3,] 580.841449 0.4730413
#> [4,] 151.889350 8.9287918
#> [5,] 155.275803 7.6169865
#> [6,] 87.474512 8.8877439
#> [7,] 7.846559 1.3327088
#>
#> , , 5
#>
#> [,1] [,2]
#> [1,] 159.47557 0.6059247
#> [2,] 131.11564 0.6241559
#> [3,] 853.08973 0.3867862
#> [4,] 260.31322 13.0930047
#> [5,] 256.06337 8.2990051
#> [6,] 250.66081 8.2683231
#> [7,] 20.69742 0.9548696
#>
#> , , 6
#>
#> [,1] [,2]
#> [1,] 125.60452 0.5970214
#> [2,] 135.82088 0.9329966
#> [3,] 604.43851 0.4498226
#> [4,] 353.08370 6.1393038
#> [5,] 529.70668 4.7111890
#> [6,] 379.79635 10.8385177
#> [7,] 27.11918 0.8407702
#>
#> , , 7
#>
#> [,1] [,2]
#> [1,] 146.10333 1.2717946
#> [2,] 186.92138 0.1902119
#> [3,] 465.47368 0.4682378
#> [4,] 344.69968 8.8340213
#> [5,] 654.86041 3.2718282
#> [6,] 485.69050 5.2347663
#> [7,] 34.86746 1.0097801
#>
#> , , 8
#>
#> [,1] [,2]
#> [1,] 427.72468 0.5315996
#> [2,] 168.38506 0.4871070
#> [3,] 906.30491 0.6392649
#> [4,] 668.73354 13.4399892
#> [5,] 674.80534 4.5803190
#> [6,] 765.44908 9.0826906
#> [7,] 39.71636 0.6952069
#>
#> , , 9
#>
#> [,1] [,2]
#> [1,] 301.34233 1.3203496
#> [2,] 240.07986 1.0218571
#> [3,] 2078.88359 0.4248696
#> [4,] 1375.45442 7.0531438
#> [5,] 969.03660 10.1025204
#> [6,] 944.45243 8.2569880
#> [7,] 75.42752 0.7281827
#>
#> , , 10
#>
#> [,1] [,2]
#> [1,] 286.4313 0.6225025
#> [2,] 195.7979 0.6840784
#> [3,] 2112.2177 0.9134778
#> [4,] 1330.1979 9.3546097
#> [5,] 894.8604 7.6304544
#> [6,] 1893.5206 6.4020358
#> [7,] 101.2634 0.9712093
#>
#> , , 11
#>
#> [,1] [,2]
#> [1,] 436.5124 0.2702589
#> [2,] 137.9113 1.3311861
#> [3,] 659.2034 0.6295918
#> [4,] 2320.6854 4.7998078
#> [5,] 1862.5135 7.6983812
#> [6,] 2122.7962 9.9203750
#> [7,] 136.9445 0.9957525
#>
#> , , 12
#>
#> [,1] [,2]
#> [1,] 276.1265 0.2434048
#> [2,] 217.3501 0.7611800
#> [3,] 1065.8974 0.2547570
#> [4,] 1183.7822 4.3936737
#> [5,] 1747.0126 9.0088110
#> [6,] 3106.3954 3.4259772
#> [7,] 180.7214 0.6557416
#>
#> , , 13
#>
#> [,1] [,2]
#> [1,] 162.7552 0.6277565
#> [2,] 224.2763 0.5257897
#> [3,] 842.6598 0.3198413
#> [4,] 1570.7110 4.1167177
#> [5,] 2989.1640 6.9850104
#> [6,] 2857.5474 4.4282626
#> [7,] 219.8818 0.7164458
#>
#> , , 14
#>
#> [,1] [,2]
#> [1,] 258.0833 0.3636634
#> [2,] 546.9316 0.6270242
#> [3,] 673.2868 0.2468470
#> [4,] 1526.2030 4.9982708
#> [5,] 2413.2133 5.6784187
#> [6,] 2217.5338 3.6968718
#> [7,] 216.8274 0.5444768
#>
#> , , 15
#>
#> [,1] [,2]
#> [1,] 602.5769 0.5677850
#> [2,] 425.0185 0.3558079
#> [3,] 1049.8247 0.3425996
#> [4,] 2858.8783 3.4018302
#> [5,] 3691.6410 5.3589305
#> [6,] 3707.7634 4.8622131
#> [7,] 258.6542 0.5732297
#>
#> , , 16
#>
#> [,1] [,2]
#> [1,] 912.7773 0.2332311
#> [2,] 660.9845 0.4931664
#> [3,] 999.0183 0.3531582
#> [4,] 4334.6421 4.6411285
#> [5,] 3939.8305 6.6118636
#> [6,] 2890.2240 3.5951864
#> [7,] 445.7580 0.4540135
#>
#> , , 17
#>
#> [,1] [,2]
#> [1,] 528.1901 0.2461129
#> [2,] 566.5405 0.4512170
#> [3,] 1142.0680 0.4177547
#> [4,] 3755.1482 3.2771565
#> [5,] 3058.2621 4.4648560
#> [6,] 4544.9817 4.7080808
#> [7,] 320.2935 0.4291022
#>
#> , , 18
#>
#> [,1] [,2]
#> [1,] 341.8850 0.3746061
#> [2,] 556.9043 0.4779926
#> [3,] 852.2711 0.5351438
#> [4,] 3883.1416 4.6886438
#> [5,] 4200.1882 5.2064370
#> [6,] 4087.9731 5.4041352
#> [7,] 449.7784 0.5578488
#>
#> , , 19
#>
#> [,1] [,2]
#> [1,] 914.4227 0.2038010
#> [2,] 419.6303 0.3688911
#> [3,] 1220.8915 0.1158029
#> [4,] 5955.9263 2.9023082
#> [5,] 5500.1469 3.7958109
#> [6,] 7819.0424 2.3337065
#> [7,] 490.0945 0.5464274
#>
#> , , 20
#>
#> [,1] [,2]
#> [1,] 726.1287 0.22872712
#> [2,] 468.7496 0.23307500
#> [3,] 1670.9590 0.06744377
#> [4,] 7152.2581 4.16446347
#> [5,] 5271.4612 2.68392906
#> [6,] 8584.1251 1.42582085
#> [7,] 875.3457 0.36534673
#>
#> , , 21
#>
#> [,1] [,2]
#> [1,] 586.0756 0.25492118
#> [2,] 1395.6459 0.13959362
#> [3,] 1757.4386 0.06480366
#> [4,] 5681.6330 1.86242234
#> [5,] 6759.0827 2.57462401
#> [6,] 14129.1863 1.42777227
#> [7,] 833.5931 0.33154120
#>
#> , , 22
#>
#> [,1] [,2]
#> [1,] 1035.7852 0.4288910
#> [2,] 720.2747 0.1150456
#> [3,] 2564.9530 0.1367836
#> [4,] 7795.1453 3.4270136
#> [5,] 9441.8380 2.1877907
#> [6,] 7144.9927 1.1167785
#> [7,] 836.3748 0.3163495
#>
#> , , 23
#>
#> [,1] [,2]
#> [1,] 997.2481 0.2109550
#> [2,] 837.0016 0.1029814
#> [3,] 1789.5306 0.1448429
#> [4,] 6088.6696 2.3051812
#> [5,] 6668.9514 2.1802225
#> [6,] 9825.7438 1.1833264
#> [7,] 875.1625 0.2388799
#>
#> , , 24
#>
#> [,1] [,2]
#> [1,] 2311.0077 0.07744494
#> [2,] 1687.0480 0.24221873
#> [3,] 3683.0916 0.23453139
#> [4,] 11301.5571 2.24564689
#> [5,] 15075.9439 1.78063414
#> [6,] 12631.4205 2.04863085
#> [7,] 901.4215 0.25847935
#>
#> , , 25
#>
#> [,1] [,2]
#> [1,] 1024.529 0.05869375
#> [2,] 1265.755 0.39157141
#> [3,] 4728.709 0.15638972
#> [4,] 10412.138 1.10365200
#> [5,] 16607.344 3.92552634
#> [6,] 30692.542 4.20721427
#> [7,] 1484.095 0.39748278
#>
#> , , 26
#>
#> [,1] [,2]
#> [1,] 1532.238 0.1043324
#> [2,] 3241.115 0.4054476
#> [3,] 2955.486 0.2016102
#> [4,] 21342.443 2.3460795
#> [5,] 11806.295 4.8085706
#> [6,] 17165.618 1.6937846
#> [7,] 1477.998 0.5163088
#>
#> , , 27
#>
#> [,1] [,2]
#> [1,] 2529.127 0.1532676
#> [2,] 1849.797 0.2172270
#> [3,] 2790.096 0.2588102
#> [4,] 30488.923 1.5756165
#> [5,] 21829.570 3.9850153
#> [6,] 19317.106 3.6803290
#> [7,] 1547.677 0.3505482
#>
#> , , 28
#>
#> [,1] [,2]
#> [1,] 1460.090 0.1641495
#> [2,] 1285.677 0.2206189
#> [3,] 4194.869 0.3439869
#> [4,] 21544.499 2.2137576
#> [5,] 15180.466 4.4068840
#> [6,] 19509.731 3.9772824
#> [7,] 2431.190 0.4348660
#>
#> , , 29
#>
#> [,1] [,2]
#> [1,] 1469.7893 0.2759532
#> [2,] 515.7228 0.1411751
#> [3,] 1423.6321 0.7430605
#> [4,] 10081.5679 4.8466743
#> [5,] 8645.0048 2.2661708
#> [6,] 10053.7606 5.0904384
#> [7,] 1252.5427 0.3911144
#>
#> , , 30
#>
#> [,1] [,2]
#> [1,] 872.3647 0.2698580
#> [2,] 1333.5092 0.1660798
#> [3,] 1455.2527 0.3253489
#> [4,] 11372.8544 3.5133551
#> [5,] 7996.7097 1.8371086
#> [6,] 11563.2451 4.6517520
#> [7,] 1105.8945 0.4208362
#>
#> , , 31
#>
#> [,1] [,2]
#> [1,] 735.3454 0.29708540
#> [2,] 2285.6952 0.09933596
#> [3,] 2885.4434 0.40688939
#> [4,] 7468.9668 3.91279497
#> [5,] 12668.2757 1.95129179
#> [6,] 13490.6246 3.11503352
#> [7,] 1253.4275 0.31721196
#>
#> , , 32
#>
#> [,1] [,2]
#> [1,] 545.0045 0.2036069
#> [2,] 1057.5725 0.1559720
#> [3,] 2232.1460 0.4706640
#> [4,] 8682.3917 2.8148553
#> [5,] 8518.3189 2.2866725
#> [6,] 17486.2487 3.7041561
#> [7,] 1309.8433 0.3432174
#>
#> , , 33
#>
#> [,1] [,2]
#> [1,] 1826.974 0.1930250
#> [2,] 1606.524 0.2419213
#> [3,] 4448.369 0.3337165
#> [4,] 11802.239 3.3128818
#> [5,] 11898.145 1.9305591
#> [6,] 17561.551 3.1785084
#> [7,] 1607.708 0.3584972
#>
#> , , 34
#>
#> [,1] [,2]
#> [1,] 1012.2008 0.2184783
#> [2,] 996.3252 0.1073443
#> [3,] 1869.4641 0.2289172
#> [4,] 14402.3168 2.9106516
#> [5,] 9165.7042 1.9724020
#> [6,] 22028.6724 2.6550570
#> [7,] 1098.6473 0.3191133
#>
#> , , 35
#>
#> [,1] [,2]
#> [1,] 2412.001 0.1642022
#> [2,] 2973.250 0.3072449
#> [3,] 2161.390 0.2940402
#> [4,] 18146.925 3.4858692
#> [5,] 12598.662 2.6066318
#> [6,] 19342.922 2.4707800
#> [7,] 1966.760 0.4550297
#>
#> , , 36
#>
#> [,1] [,2]
#> [1,] 1804.643 0.2038487
#> [2,] 1524.337 0.4861783
#> [3,] 5579.583 0.7497855
#> [4,] 24411.934 2.7916774
#> [5,] 15719.659 6.0354751
#> [6,] 27146.789 7.0919510
#> [7,] 1486.518 0.4525139
#>
#> , , 37
#>
#> [,1] [,2]
#> [1,] 2115.347 0.2226385
#> [2,] 1364.155 0.5156791
#> [3,] 4892.501 0.5226752
#> [4,] 19663.250 3.7892174
#> [5,] 27846.754 5.8256435
#> [6,] 28926.098 8.3847773
#> [7,] 2950.757 0.6230956
#>
#> , , 38
#>
#> [,1] [,2]
#> [1,] 2297.6202 0.1763585
#> [2,] 880.6362 0.2741773
#> [3,] 2274.5623 1.1397602
#> [4,] 36356.5821 3.0484321
#> [5,] 19976.6509 5.8384150
#> [6,] 30525.2482 7.7258700
#> [7,] 2767.3482 0.7188684
#>
#> , , 39
#>
#> [,1] [,2]
#> [1,] 2764.796 0.3086404
#> [2,] 1138.147 0.1285604
#> [3,] 1530.338 0.7924124
#> [4,] 29739.603 3.7886096
#> [5,] 17484.291 2.5021971
#> [6,] 24357.150 5.1667256
#> [7,] 2767.502 0.3792697
#>
#> , , 40
#>
#> [,1] [,2]
#> [1,] 3605.749 0.5570123
#> [2,] 1671.895 0.3704317
#> [3,] 6779.065 0.4066226
#> [4,] 21056.125 5.9386725
#> [5,] 15837.735 2.8014769
#> [6,] 27679.209 4.5799081
#> [7,] 2269.579 0.5967884
#>
#> , , 41
#>
#> [,1] [,2]
#> [1,] 3371.901 0.6348870
#> [2,] 3542.705 0.4465906
#> [3,] 2476.004 0.3200748
#> [4,] 20043.549 7.9240232
#> [5,] 19764.691 4.4318846
#> [6,] 23204.708 5.5976678
#> [7,] 2068.006 0.6153929
#>
#> , , 42
#>
#> [,1] [,2]
#> [1,] 11451.732 0.2840738
#> [2,] 2129.117 0.3128784
#> [3,] 2755.932 0.3217450
#> [4,] 32435.119 5.3720160
#> [5,] 21099.743 4.1830633
#> [6,] 28992.697 4.5135903
#> [7,] 2210.684 0.6864718
#>
#> , , 43
#>
#> [,1] [,2]
#> [1,] 7472.630 0.4493476
#> [2,] 2495.842 0.4733812
#> [3,] 2294.049 0.4742468
#> [4,] 55332.721 5.7275810
#> [5,] 23805.400 5.5612654
#> [6,] 26144.269 4.9814562
#> [7,] 3193.138 0.8293443
#>
#> , , 44
#>
#> [,1] [,2]
#> [1,] 6941.398 0.6734198
#> [2,] 1672.300 0.3385635
#> [3,] 3431.997 0.6465256
#> [4,] 49848.281 6.1292208
#> [5,] 28531.650 10.5293492
#> [6,] 30315.836 9.1628520
#> [7,] 3263.668 0.9860935
#>
#> , , 45
#>
#> [,1] [,2]
#> [1,] 4327.431 0.5705719
#> [2,] 4424.950 0.2232875
#> [3,] 8433.241 0.6893614
#> [4,] 46482.912 7.2772325
#> [5,] 30880.420 3.7002436
#> [6,] 39713.467 9.3262766
#> [7,] 3317.772 1.1059434
#>
#> , , 46
#>
#> [,1] [,2]
#> [1,] 2626.525 0.2802596
#> [2,] 1001.864 0.1674025
#> [3,] 2995.338 0.5437667
#> [4,] 33850.467 4.4935837
#> [5,] 28436.777 2.6270914
#> [6,] 35318.417 8.9720862
#> [7,] 3576.820 0.7636716
#>
#> , , 47
#>
#> [,1] [,2]
#> [1,] 2903.6239 0.4229977
#> [2,] 873.0569 0.1835070
#> [3,] 1603.5769 1.3546808
#> [4,] 22323.3485 6.0731345
#> [5,] 13613.1886 3.1350203
#> [6,] 21353.2819 6.8916599
#> [7,] 3013.2102 0.6547815
#>
#> , , 48
#>
#> [,1] [,2]
#> [1,] 3242.662 0.6872214
#> [2,] 2333.802 0.5352828
#> [3,] 2632.292 0.5322148
#> [4,] 33296.059 6.9134536
#> [5,] 11085.780 3.3885783
#> [6,] 10937.737 7.2301735
#> [7,] 1946.753 0.5562448
#>
#> , , 49
#>
#> [,1] [,2]
#> [1,] 2794.914 2.0699061
#> [2,] 1225.936 0.3252430
#> [3,] 1709.143 1.1722442
#> [4,] 20141.265 8.4550777
#> [5,] 21137.500 7.1454956
#> [6,] 21986.072 8.8923292
#> [7,] 1650.884 0.6976961
#>
#> , , 50
#>
#> [,1] [,2]
#> [1,] 1365.393 1.2851231
#> [2,] 1531.519 0.4313465
#> [3,] 2403.171 1.2099493
#> [4,] 33288.856 15.1726098
#> [5,] 15083.161 4.7930353
#> [6,] 14331.809 11.3911468
#> [7,] 2892.036 0.8907264
#>
#>
## ------------------------------------------------
## Method `specify_posterior_bsvar$get_last_draw`
## ------------------------------------------------
data(us_fiscal_lsuw)
# specify the model and set seed
specification = specify_bsvar$new(us_fiscal_lsuw, p = 4)
#> The identification is set to the default option of lower-triangular structural matrix.
set.seed(123)
# run the burn-in
burn_in = estimate(specification, 10)
#> **************************************************|
#> bsvars: Bayesian Structural Vector Autoregressions|
#> **************************************************|
#> Gibbs sampler for the SVAR 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, 10)
#> **************************************************|
#> bsvars: Bayesian Structural Vector Autoregressions|
#> **************************************************|
#> Gibbs sampler for the SVAR model |
#> **************************************************|
#> Progress of the MCMC simulation for 10 draws
#> Every draw is saved via MCMC thinning
#> Press Esc to interrupt the computations
#> **************************************************|
## ------------------------------------------------
## Method `specify_posterior_bsvar$is_normalised`
## ------------------------------------------------
# upload data
data(us_fiscal_lsuw)
# specify the model and set seed
specification = specify_bsvar$new(us_fiscal_lsuw, p = 4)
#> The identification is set to the default option of lower-triangular structural matrix.
set.seed(123)
# estimate the model
posterior = estimate(specification, 10, thin = 1)
#> **************************************************|
#> bsvars: Bayesian Structural Vector Autoregressions|
#> **************************************************|
#> Gibbs sampler for the SVAR model |
#> **************************************************|
#> Progress of the MCMC simulation for 10 draws
#> Every draw is saved via MCMC thinning
#> Press Esc to interrupt the computations
#> **************************************************|
# check normalisation status beforehand
posterior$is_normalised()
#> [1] TRUE
# normalise the posterior
BB = posterior$last_draw$starting_values$B # get the last draw of B
B_hat = diag((-1) * sign(diag(BB))) %*% BB # set negative diagonal elements
normalise_posterior(posterior, B_hat) # draws in posterior are normalised
# check normalisation status afterwards
posterior$is_normalised()
#> [1] TRUE
## ------------------------------------------------
## Method `specify_posterior_bsvar$set_normalised`
## ------------------------------------------------
# This is an internal function that is run while executing normalise_posterior()
# Observe its working by analysing the workflow:
# upload data
data(us_fiscal_lsuw)
# specify the model and set seed
specification = specify_bsvar$new(us_fiscal_lsuw, p = 4)
#> The identification is set to the default option of lower-triangular structural matrix.
set.seed(123)
# estimate the model
posterior = estimate(specification, 10, thin = 1)
#> **************************************************|
#> bsvars: Bayesian Structural Vector Autoregressions|
#> **************************************************|
#> Gibbs sampler for the SVAR model |
#> **************************************************|
#> Progress of the MCMC simulation for 10 draws
#> Every draw is saved via MCMC thinning
#> Press Esc to interrupt the computations
#> **************************************************|
# check normalisation status beforehand
posterior$is_normalised()
#> [1] TRUE
# normalise the posterior
BB = posterior$last_draw$starting_values$B # get the last draw of B
B_hat = diag(sign(diag(BB))) %*% BB # set positive diagonal elements
normalise_posterior(posterior, B_hat) # draws in posterior are normalised
# check normalisation status afterwards
posterior$is_normalised()
#> [1] TRUE