Skip to contents

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 array B, an NxKxS array A, and a 5xS matrix hyper.

Methods


Method new()

Create a new posterior output PosteriorBSVAR.

Usage

specify_posterior_bsvar$new(specification_bsvar, posterior_bsvar)

Arguments

specification_bsvar

an object of class BSVAR with the last draw of the current MCMC run as the starting value.

posterior_bsvar

a list containing Bayesian estimation output collected in elements an NxNxS array B, an NxKxS array A, and a 5xS matrix hyper.

Returns

A posterior output PosteriorBSVAR.


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.

Usage

specify_posterior_bsvar$get_posterior()

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().

Usage

specify_posterior_bsvar$get_last_draw()

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.

Usage

specify_posterior_bsvar$is_normalised()

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.

Usage

specify_posterior_bsvar$set_normalised(value)

Arguments

value

(optional) a logical value to be passed to indicator normalised.

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()


Method clone()

The objects of this class are cloneable with this method.

Usage

specify_posterior_bsvar$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

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.480187  0.000000 0.000000
#> [2,] 1.844082 10.936780 0.000000
#> [3,] 9.602224 -3.103044 1.770495
#> 
#> , , 2
#> 
#>            [,1]        [,2]     [,3]
#> [1,]  27.815935  0.00000000 0.000000
#> [2,]  -2.571525 32.03297247 0.000000
#> [3,] -12.838560 -0.03107182 5.927769
#> 
#> , , 3
#> 
#>            [,1]       [,2]     [,3]
#> [1,]  31.512439  0.0000000  0.00000
#> [2,]  -1.630824 35.2662519  0.00000
#> [3,] -11.053353  0.2517973 30.35589
#> 
#> , , 4
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  31.002350  0.000000  0.00000
#> [2,]   1.651906 40.846331  0.00000
#> [3,] -15.021740 -1.006442 90.49222
#> 
#> , , 5
#> 
#>            [,1]     [,2]     [,3]
#> [1,] 34.3000652  0.00000  0.00000
#> [2,] -0.5717299 41.70188  0.00000
#> [3,] -9.9323909  2.33175 95.42606
#> 
#> , , 6
#> 
#>             [,1]       [,2]    [,3]
#> [1,]  36.3456725  0.0000000  0.0000
#> [2,]   0.7832201 39.3614241  0.0000
#> [3,] -13.1330320 -0.1616096 97.7468
#> 
#> , , 7
#> 
#>            [,1]       [,2]     [,3]
#> [1,]  37.289374  0.0000000  0.00000
#> [2,]  -4.926921 37.7216669  0.00000
#> [3,] -13.857989 -0.2081386 97.76497
#> 
#> , , 8
#> 
#>             [,1]      [,2]     [,3]
#> [1,]  35.3597190  0.000000  0.00000
#> [2,]   0.2622107 40.060874  0.00000
#> [3,] -16.3680620  1.437847 97.57224
#> 
#> , , 9
#> 
#>            [,1]     [,2]    [,3]
#> [1,]  35.583284  0.00000  0.0000
#> [2,]  -1.921772 39.20820  0.0000
#> [3,] -13.561998  2.55685 96.9523
#> 
#> , , 10
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  32.905518  0.000000   0.0000
#> [2,]   3.988358 40.492284   0.0000
#> [3,] -12.758560 -1.779178 100.5838
#> 
#> , , 11
#> 
#>             [,1]      [,2]     [,3]
#> [1,]  34.7957077  0.000000   0.0000
#> [2,]  -0.9049617 37.886447   0.0000
#> [3,] -16.0765131  1.648411 100.3056
#> 
#> , , 12
#> 
#>            [,1]       [,2]     [,3]
#> [1,]  34.023659  0.0000000  0.00000
#> [2,]  -2.677407 41.6637182  0.00000
#> [3,] -13.696242 -0.2756817 94.86363
#> 
#> , , 13
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  32.555231  0.000000  0.00000
#> [2,]  -2.528826 40.401802  0.00000
#> [3,] -14.393932 -1.929875 94.92627
#> 
#> , , 14
#> 
#>             [,1]      [,2]     [,3]
#> [1,]  33.5921621  0.000000  0.00000
#> [2,]  -0.9492592 36.118033  0.00000
#> [3,] -10.4388988  4.753297 93.00237
#> 
#> , , 15
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  36.879559  0.000000  0.00000
#> [2,]   1.686398 39.830744  0.00000
#> [3,] -14.911051 -2.046388 99.10939
#> 
#> , , 16
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  35.450326  0.000000  0.00000
#> [2,]  -1.342309 39.263689  0.00000
#> [3,] -16.119473 -3.243799 91.94485
#> 
#> , , 17
#> 
#>             [,1]      [,2]     [,3]
#> [1,]  35.0763346  0.000000  0.00000
#> [2,]  -0.2494155 41.550829  0.00000
#> [3,] -14.1053278  1.755124 89.30674
#> 
#> , , 18
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  34.545187  0.000000  0.00000
#> [2,]   3.370025 38.544277  0.00000
#> [3,] -13.118781 -2.639205 94.62774
#> 
#> , , 19
#> 
#>             [,1]      [,2]     [,3]
#> [1,]  34.8850674  0.000000  0.00000
#> [2,]  -0.2235716 38.876073  0.00000
#> [3,] -14.0671416  1.952542 89.15274
#> 
#> , , 20
#> 
#>             [,1]      [,2]     [,3]
#> [1,]  33.2819608  0.000000  0.00000
#> [2,]  -0.7954118 40.157674  0.00000
#> [3,] -15.2342815  4.379599 93.24737
#> 
#> , , 21
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  34.633810  0.000000   0.0000
#> [2,]  -1.400703 36.956614   0.0000
#> [3,] -13.437809  1.359283 103.0123
#> 
#> , , 22
#> 
#>           [,1]      [,2]     [,3]
#> [1,]  36.19542  0.000000  0.00000
#> [2,]  -1.58671 40.499923  0.00000
#> [3,] -11.01114 -1.759047 97.81027
#> 
#> , , 23
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  32.375665  0.000000   0.0000
#> [2,]  -2.874371 39.216750   0.0000
#> [3,] -14.715330  3.903038 101.1939
#> 
#> , , 24
#> 
#>            [,1]       [,2]     [,3]
#> [1,]  36.573549  0.0000000   0.0000
#> [2,]   3.330479 41.0832067   0.0000
#> [3,] -14.416186 -0.5822591 101.1211
#> 
#> , , 25
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  36.465884  0.000000   0.0000
#> [2,]  -1.281966 41.705517   0.0000
#> [3,] -18.888231 -2.040199 108.4083
#> 
#> , , 26
#> 
#>             [,1]      [,2]     [,3]
#> [1,]  38.6683342  0.000000  0.00000
#> [2,]  -0.8562731 40.541211  0.00000
#> [3,] -16.9450836 -2.813891 89.96831
#> 
#> , , 27
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  36.013382  0.000000  0.00000
#> [2,]  -4.663389 38.874789  0.00000
#> [3,] -13.695012  1.501716 94.89934
#> 
#> , , 28
#> 
#>             [,1]      [,2]     [,3]
#> [1,]  33.0056644  0.000000  0.00000
#> [2,]  -0.3276885 40.783859  0.00000
#> [3,] -15.4386485 -1.674638 93.94422
#> 
#> , , 29
#> 
#>             [,1]       [,2]     [,3]
#> [1,]  34.4908063  0.0000000  0.00000
#> [2,]   0.1436051 42.9430811  0.00000
#> [3,] -12.5780845 -0.3756253 98.25187
#> 
#> , , 30
#> 
#>             [,1]      [,2]     [,3]
#> [1,]  38.3398654  0.000000  0.00000
#> [2,]   0.5417624 37.513187  0.00000
#> [3,] -14.4617216  1.400679 94.73892
#> 
#> , , 31
#> 
#>             [,1]      [,2]     [,3]
#> [1,]  37.8519941  0.000000  0.00000
#> [2,]   0.4681939 37.923231  0.00000
#> [3,] -13.5059080 -2.148558 99.16737
#> 
#> , , 32
#> 
#>             [,1]        [,2]     [,3]
#> [1,]  35.0534109  0.00000000  0.00000
#> [2,]  -0.8397766 41.05715152  0.00000
#> [3,] -14.3121484 -0.08830636 97.24101
#> 
#> , , 33
#> 
#>             [,1]       [,2]     [,3]
#> [1,]  34.3824801  0.0000000  0.00000
#> [2,]  -0.3317665 40.4103529  0.00000
#> [3,] -12.9512050 -0.6540654 99.57939
#> 
#> , , 34
#> 
#>            [,1]       [,2]     [,3]
#> [1,]  33.283047  0.0000000   0.0000
#> [2,]  -0.936751 39.5407088   0.0000
#> [3,] -14.282583  0.6681821 101.9166
#> 
#> , , 35
#> 
#>             [,1]      [,2]     [,3]
#> [1,]  33.7612060  0.000000   0.0000
#> [2,]   0.1208934 39.692048   0.0000
#> [3,] -11.8926155  2.301267 103.7547
#> 
#> , , 36
#> 
#>            [,1]      [,2]    [,3]
#> [1,]  36.698374  0.000000   0.000
#> [2,]   2.251659 37.275415   0.000
#> [3,] -11.970584 -3.382255 102.657
#> 
#> , , 37
#> 
#>            [,1]      [,2]    [,3]
#> [1,]  33.054033  0.000000  0.0000
#> [2,]  -3.040884 39.038680  0.0000
#> [3,] -13.931164  2.270597 94.4494
#> 
#> , , 38
#> 
#>            [,1]     [,2]     [,3]
#> [1,]  34.422984  0.00000  0.00000
#> [2,]  -1.905072 35.69026  0.00000
#> [3,] -14.149359 -1.71504 99.25945
#> 
#> , , 39
#> 
#>            [,1]     [,2]     [,3]
#> [1,]  35.001089  0.00000  0.00000
#> [2,]  -1.153942 36.29829  0.00000
#> [3,] -12.319734  2.96667 98.45727
#> 
#> , , 40
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  32.725532  0.000000  0.00000
#> [2,]   2.796577 38.790631  0.00000
#> [3,] -17.271186 -3.810496 99.92389
#> 
#> , , 41
#> 
#>            [,1]     [,2]     [,3]
#> [1,]  36.292464  0.00000  0.00000
#> [2,]  -2.516084 37.00913  0.00000
#> [3,] -13.337547  1.15140 96.32554
#> 
#> , , 42
#> 
#>             [,1]       [,2]    [,3]
#> [1,]  31.9788933  0.0000000  0.0000
#> [2,]   0.9758541 37.9018192  0.0000
#> [3,] -15.0270278 -0.2968114 95.2017
#> 
#> , , 43
#> 
#>             [,1]      [,2]     [,3]
#> [1,]  32.4354616  0.000000  0.00000
#> [2,]   0.2397001 37.861662  0.00000
#> [3,] -16.9255386  2.046994 96.21197
#> 
#> , , 44
#> 
#>             [,1]      [,2]    [,3]
#> [1,]  35.4443045  0.000000  0.0000
#> [2,]   0.8679697 39.029913  0.0000
#> [3,] -16.4759173  2.449661 99.6492
#> 
#> , , 45
#> 
#>           [,1]      [,2]     [,3]
#> [1,]  35.22671  0.000000  0.00000
#> [2,]   2.99202 38.899185  0.00000
#> [3,] -15.22587  3.060605 92.80349
#> 
#> , , 46
#> 
#>            [,1]       [,2]    [,3]
#> [1,]  36.410347  0.0000000  0.0000
#> [2,]   2.459234 38.7311503  0.0000
#> [3,] -14.741924  0.7960494 95.8725
#> 
#> , , 47
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  34.396956  0.000000  0.00000
#> [2,]   4.343214 38.778326  0.00000
#> [3,] -15.868715  3.957744 95.45308
#> 
#> , , 48
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  33.259281  0.000000  0.00000
#> [2,]   2.552464 36.641603  0.00000
#> [3,] -15.176803  5.288227 99.73319
#> 
#> , , 49
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  34.597346  0.000000   0.0000
#> [2,]   2.025377 39.307775   0.0000
#> [3,] -12.925539 -2.281832 101.1859
#> 
#> , , 50
#> 
#>            [,1]         [,2]     [,3]
#> [1,]  34.939849  0.000000000   0.0000
#> [2,]  -3.674141 42.016377338   0.0000
#> [3,] -16.267484 -0.001731223 100.3094
#> 
#> 
#> $A
#> , , 1
#> 
#>           [,1]       [,2]       [,3]       [,4]
#> [1,] 1.2370294  0.1819078 -0.6264135 -0.6892122
#> [2,] 0.9219455  0.7721508 -1.0852471 -1.7027466
#> [3,] 0.3886926 -0.1925249  0.7224824 -0.2811627
#> 
#> , , 2
#> 
#>             [,1]         [,2]        [,3]       [,4]
#> [1,]  0.87138866 -0.009415518  0.10947891 -0.4893434
#> [2,]  0.04241946  0.964568189 -0.04337396 -0.2751020
#> [3,] -0.31971392 -0.225826739  1.72406111  0.2614478
#> 
#> , , 3
#> 
#>             [,1]        [,2]      [,3]        [,4]
#> [1,]  0.90717734 -0.01521737 0.1414015  0.04694839
#> [2,] -0.02619304  0.95858926 0.0420781 -0.33955971
#> [3,] -0.29775361 -0.04362640 1.4430719  0.09572530
#> 
#> , , 4
#> 
#>             [,1]        [,2]       [,3]        [,4]
#> [1,]  0.82150213 0.007860884 0.23660926  0.18009716
#> [2,] -0.05092788 0.948785626 0.07548065 -0.42179843
#> [3,] -0.05025844 0.006714865 1.06526716  0.08904133
#> 
#> , , 5
#> 
#>              [,1]         [,2]         [,3]        [,4]
#> [1,]  0.859601587  0.018671322  0.180619695  0.22764799
#> [2,]  0.007252818  0.957690402 -0.005736982 -0.39385227
#> [3,] -0.023221500 -0.002479709  1.030088904 -0.01325132
#> 
#> , , 6
#> 
#>             [,1]         [,2]       [,3]       [,4]
#> [1,]  0.89234548  0.009277703 0.12872051  0.0477352
#> [2,] -0.05397685  0.964887492 0.07134997 -0.3208763
#> [3,] -0.02369946 -0.011295786 1.02992366 -0.1063072
#> 
#> , , 7
#> 
#>              [,1]         [,2]       [,3]       [,4]
#> [1,]  0.950091222 -0.014849087 0.06545544 -0.1220648
#> [2,] -0.027187241  0.959086996 0.03624529 -0.3908794
#> [3,] -0.008176355 -0.009868092 1.00860589 -0.1072600
#> 
#> , , 8
#> 
#>             [,1]         [,2]         [,3]        [,4]
#> [1,] 0.927286386 -0.010660638  0.091353373 -0.10184008
#> [2,] 0.009721830  0.973281386 -0.008951107 -0.23674590
#> [3,] 0.003786833 -0.002950832  0.990788836 -0.05946756
#> 
#> , , 9
#> 
#>             [,1]       [,2]       [,3]        [,4]
#> [1,]  0.97145234  0.0194322 0.02531457  0.11902776
#> [2,] -0.03465829  0.9556762 0.05001670 -0.38920861
#> [3,] -0.00798368 -0.0079337 1.00855390 -0.08514077
#> 
#> , , 10
#> 
#>              [,1]         [,2]       [,3]        [,4]
#> [1,]  0.928187107  0.013687712 0.08836354  0.12932414
#> [2,] -0.045230496  0.952467172 0.06050266 -0.44239343
#> [3,] -0.009715316 -0.007647054 1.01044997 -0.08442605
#> 
#> , , 11
#> 
#>              [,1]         [,2]        [,3]        [,4]
#> [1,]  0.938999737 -0.021892926 0.077682068 -0.20527899
#> [2,]  0.002701146  0.944310063 0.001074373 -0.51715683
#> [3,] -0.013643593 -0.004632749 1.014829014 -0.05893633
#> 
#> , , 12
#> 
#>              [,1]        [,2]       [,3]       [,4]
#> [1,]  0.897019919 -0.02226612 0.13627518 -0.1630624
#> [2,] -0.006527884  0.95295144 0.02436438 -0.3430118
#> [3,] -0.027229460 -0.01242762 1.03609741 -0.1048891
#> 
#> , , 13
#> 
#>              [,1]         [,2]       [,3]        [,4]
#> [1,]  0.912779278  0.011862337 0.10320202  0.07255704
#> [2,] -0.005269062  0.944219086 0.01728702 -0.47548101
#> [3,] -0.020945028 -0.004552653 1.02449515 -0.05543572
#> 
#> , , 14
#> 
#>              [,1]        [,2]       [,3]         [,4]
#> [1,]  0.909076529  0.00153772 0.11244378  0.004222284
#> [2,] -0.006595493  0.94709769 0.01923416 -0.441948133
#> [3,] -0.006568277 -0.00386809 1.00539284 -0.055644547
#> 
#> , , 15
#> 
#>              [,1]         [,2]       [,3]        [,4]
#> [1,]  0.946391322  0.017848083 0.05605975  0.09948892
#> [2,] -0.006419847  0.938192711 0.01728130 -0.54176156
#> [3,] -0.035292855 -0.002427279 1.04337837 -0.02584079
#> 
#> , , 16
#> 
#>             [,1]        [,2]       [,3]        [,4]
#> [1,]  0.87290983  0.01106649 0.15520162  0.08371051
#> [2,] -0.04346188  0.94860021 0.06295635 -0.44568518
#> [3,] -0.01853848 -0.00923543 1.02548481 -0.07111610
#> 
#> , , 17
#> 
#>              [,1]         [,2]       [,3]         [,4]
#> [1,]  0.941852768 -0.007979117 0.08331013  0.004627165
#> [2,] -0.021773346  0.960824121 0.02460921 -0.408442427
#> [3,] -0.001801577 -0.005026150 1.00488496 -0.026424512
#> 
#> , , 18
#> 
#>              [,1]         [,2]        [,3]        [,4]
#> [1,]  0.931169974  0.004231908 0.086411216  0.04780036
#> [2,] -0.004977995  0.957047917 0.006463385 -0.42464786
#> [3,] -0.024308655 -0.003362147 1.027464577 -0.05236398
#> 
#> , , 19
#> 
#>             [,1]         [,2]       [,3]         [,4]
#> [1,]  0.89244882  0.003862621 0.12840963 -0.005085482
#> [2,] -0.01885130  0.938003681 0.03108007 -0.562037499
#> [3,] -0.01972833 -0.005752259 1.02391720 -0.059603172
#> 
#> , , 20
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.92701165 -0.007916242 0.09032354 -0.08066368
#> [2,] -0.05780535  0.967254092 0.07234323 -0.32307730
#> [3,] -0.01112911 -0.003972577 1.01512279 -0.02689387
#> 
#> , , 21
#> 
#>             [,1]         [,2]      [,3]        [,4]
#> [1,]  0.89491438  0.001955862 0.1325351  0.03220036
#> [2,] -0.02322038  0.944874562 0.0347792 -0.50751737
#> [3,] -0.02703282 -0.007821262 1.0330468 -0.08008564
#> 
#> , , 22
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.88806421  0.004099685 0.13888750  0.03512392
#> [2,] -0.06421812  0.953968643 0.08736836 -0.40510050
#> [3,] -0.02421052 -0.006804118 1.02876762 -0.07620167
#> 
#> , , 23
#> 
#>             [,1]         [,2]      [,3]        [,4]
#> [1,]  0.89505496  0.009765357 0.1228951  0.03475167
#> [2,] -0.02239155  0.976349386 0.0288893 -0.22716092
#> [3,] -0.02177229 -0.002081896 1.0237725 -0.04353645
#> 
#> , , 24
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.91141142 -0.007580940 0.10655426 -0.10846078
#> [2,] -0.04026076  0.949117480 0.05124155 -0.50155448
#> [3,] -0.01861018 -0.005184946 1.02019274 -0.07185356
#> 
#> , , 25
#> 
#>             [,1]          [,2]       [,3]        [,4]
#> [1,]  0.94285697 -0.0002074914 0.06626768 -0.03878774
#> [2,] -0.03648138  0.9592995425 0.05388232 -0.34111391
#> [3,] -0.01300113 -0.0005346612 1.01233893 -0.03147916
#> 
#> , , 26
#> 
#>              [,1]         [,2]       [,3]         [,4]
#> [1,]  0.932845762  0.005217269 0.08025740  0.027183186
#> [2,] -0.012608459  0.960579562 0.01472612 -0.399805584
#> [3,] -0.008047447 -0.002043929 1.01110147 -0.009207462
#> 
#> , , 27
#> 
#>             [,1]          [,2]       [,3]        [,4]
#> [1,]  0.93448448 -0.0007038297 0.08024713 -0.01703342
#> [2,] -0.04613147  0.9523402707 0.06034153 -0.45346685
#> [3,] -0.01481056 -0.0096786428 1.01940040 -0.08572559
#> 
#> , , 28
#> 
#>             [,1]        [,2]       [,3]        [,4]
#> [1,]  0.91723616 -0.02821262 0.10735207 -0.25015771
#> [2,] -0.01150979  0.96160816 0.01560494 -0.37189263
#> [3,] -0.01971211 -0.00293919 1.02256444 -0.04102583
#> 
#> , , 29
#> 
#>              [,1]         [,2]       [,3]        [,4]
#> [1,]  0.914135726  0.003011906 0.10626236  0.02242898
#> [2,] -0.015428370  0.946828274 0.02560367 -0.48189782
#> [3,] -0.008762271 -0.008656486 1.01098639 -0.08208207
#> 
#> , , 30
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.94496834  0.014412574 0.06440561  0.11637539
#> [2,] -0.03730753  0.936066962 0.05959146 -0.53776792
#> [3,] -0.01021598 -0.003099041 1.01114896 -0.03827536
#> 
#> , , 31
#> 
#>              [,1]         [,2]       [,3]        [,4]
#> [1,]  0.938625161  0.012455580 0.06571862  0.04606333
#> [2,] -0.054633012  0.958407028 0.07639959 -0.35006188
#> [3,] -0.004287966 -0.003631171 0.99962487 -0.07583166
#> 
#> , , 32
#> 
#>             [,1]         [,2]       [,3]       [,4]
#> [1,]  0.94325750 -0.006695197 0.06176837 -0.1326778
#> [2,] -0.03158964  0.980821116 0.04544601 -0.1460479
#> [3,] -0.02259321 -0.012418619 1.02878668 -0.1166435
#> 
#> , , 33
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.92156498 -0.021354422 0.10051106 -0.19161813
#> [2,] -0.02940890  0.951089078 0.04093846 -0.45261444
#> [3,] -0.01578226 -0.008834285 1.02037218 -0.07896197
#> 
#> , , 34
#> 
#>              [,1]         [,2]         [,3]         [,4]
#> [1,]  0.930275877 -0.003344194  0.090703920 -0.005938001
#> [2,]  0.007579121  0.972063823 -0.008195469 -0.265162817
#> [3,] -0.017977996 -0.008526755  1.023345221 -0.075201565
#> 
#> , , 35
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.92569328 -0.006763315 0.09521653 -0.04723571
#> [2,] -0.02450412  0.946889574 0.04069663 -0.45086281
#> [3,] -0.01530281 -0.002855519 1.01811534 -0.03245819
#> 
#> , , 36
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.91454827 -0.009298095 0.11457166 -0.03192328
#> [2,] -0.06274816  0.937480044 0.08870217 -0.54283559
#> [3,] -0.01708507 -0.004460298 1.01844066 -0.06384469
#> 
#> , , 37
#> 
#>             [,1]        [,2]      [,3]       [,4]
#> [1,]  0.90642953  0.00943846 0.1056598  0.0118305
#> [2,] -0.06003494  0.94695738 0.0829377 -0.4691689
#> [3,] -0.01585357 -0.01234498 1.0204508 -0.1141361
#> 
#> , , 38
#> 
#>             [,1]          [,2]       [,3]        [,4]
#> [1,]  0.91131180 -0.0080416274 0.10730357 -0.10434992
#> [2,] -0.02447447  0.9506996558 0.03589804 -0.44892307
#> [3,] -0.01187838 -0.0008415069 1.00856544 -0.05173589
#> 
#> , , 39
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.91235645  0.023613410 0.08453673  0.04795514
#> [2,] -0.06898775  0.969702411 0.07538370 -0.38427376
#> [3,] -0.01377626 -0.004629828 1.01430774 -0.06397218
#> 
#> , , 40
#> 
#>             [,1]        [,2]       [,3]         [,4]
#> [1,]  0.95757427 0.008599765 0.04288923  0.013483056
#> [2,] -0.04002572 0.950834680 0.05573980 -0.445649565
#> [3,] -0.01271980 0.002096055 1.01165168 -0.007580977
#> 
#> , , 41
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.93563936  0.003340611 0.08134548  0.04772344
#> [2,] -0.02238664  0.938904173 0.03677039 -0.54357629
#> [3,] -0.01807628 -0.005563907 1.02141939 -0.06036332
#> 
#> , , 42
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.93344107  0.009004292 0.07714783  0.05036596
#> [2,] -0.05386518  0.955128467 0.07110021 -0.42125289
#> [3,] -0.01732640 -0.007448820 1.02012785 -0.08099096
#> 
#> , , 43
#> 
#>             [,1]         [,2]        [,3]        [,4]
#> [1,]  0.96084864 -0.023454740  0.05681885 -0.16830093
#> [2,]  0.01256079  0.963604392 -0.01323534 -0.34198868
#> [3,] -0.02005874 -0.007628875  1.02292269 -0.08719137
#> 
#> , , 44
#> 
#>             [,1]        [,2]       [,3]        [,4]
#> [1,]  0.90987578 -0.00426366 0.10652964 -0.08673077
#> [2,] -0.05063375  0.95708424 0.06300503 -0.42853748
#> [3,] -0.02054450 -0.01231836 1.02637653 -0.11395401
#> 
#> , , 45
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.91589417  0.008356903 0.09959781  0.04047393
#> [2,] -0.04133325  0.952010999 0.06437129 -0.37759946
#> [3,] -0.02831201 -0.003284428 1.03241765 -0.05218052
#> 
#> , , 46
#> 
#>             [,1]        [,2]       [,3]          [,4]
#> [1,]  0.93760684 0.004309381 0.07141394 -0.0034830062
#> [2,] -0.05416797 0.973255196 0.07443534 -0.2134080580
#> [3,] -0.02640836 0.001756808 1.03035778  0.0005026605
#> 
#> , , 47
#> 
#>             [,1]          [,2]      [,3]        [,4]
#> [1,]  0.92371447 -2.049428e-06 0.0847893 -0.08074473
#> [2,] -0.02733722  9.647092e-01 0.0353266 -0.34221535
#> [3,] -0.02675377 -9.921319e-03 1.0342803 -0.08934793
#> 
#> , , 48
#> 
#>              [,1]         [,2]        [,3]        [,4]
#> [1,]  0.908485946 -0.020778485 0.119253039 -0.16950934
#> [2,] -0.004220786  0.954035471 0.005288376 -0.45537226
#> [3,] -0.018953252 -0.008067085 1.025405942 -0.06474967
#> 
#> , , 49
#> 
#>              [,1]         [,2]        [,3]        [,4]
#> [1,]  0.917191326  0.003019702  0.09479902 -0.03478881
#> [2,]  0.008180598  0.953019269 -0.01032097 -0.46498888
#> [3,] -0.008920071 -0.005365491  1.00938367 -0.06284299
#> 
#> , , 50
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.91860062 -0.017605924 0.09751492 -0.20792579
#> [2,] -0.01968398  0.953174555 0.02690552 -0.44821030
#> [3,] -0.01469813 -0.004953197 1.01631019 -0.06246962
#> 
#> 
#> $hyper
#> , , 1
#> 
#>           [,1]       [,2]
#> [1,]  2.229087  1.1341641
#> [2,]  6.082082  1.0606794
#> [3,]  3.345739  0.5340667
#> [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.385771  2.9073836
#> [2,] 10.380800  0.5298022
#> [3,] 12.042956  1.0059908
#> [4,] 55.026197 15.3840248
#> [5,] 77.171035  6.7201875
#> [6,] 30.814625  8.6293130
#> [7,]  6.154964  1.2140976
#> 
#> , , 3
#> 
#>           [,1]       [,2]
#> [1,] 49.668880  0.7390209
#> [2,] 84.934114  0.4081537
#> [3,] 29.093975  0.9356105
#> [4,] 83.981200 13.7110124
#> [5,] 82.280210  8.2531629
#> [6,] 54.786618  9.4102225
#> [7,]  6.326395  1.0042150
#> 
#> , , 4
#> 
#>            [,1]      [,2]
#> [1,]  50.255289 0.6998531
#> [2,] 101.914489 1.4512811
#> [3,] 184.833281 0.4683626
#> [4,] 150.355382 9.0545540
#> [5,] 155.231604 7.7821931
#> [6,]  85.467789 8.5849979
#> [7,]   7.862382 1.3528393
#> 
#> , , 5
#> 
#>           [,1]       [,2]
#> [1,] 151.94179  0.6094150
#> [2,] 129.31227  0.6277554
#> [3,] 732.63491  0.3853258
#> [4,] 255.77285 13.1407699
#> [5,] 254.41426  8.3430395
#> [6,] 239.75435  8.2254645
#> [7,]  20.53054  0.9545001
#> 
#> , , 6
#> 
#>           [,1]       [,2]
#> [1,] 120.41581  0.6034369
#> [2,] 135.01447  0.9364184
#> [3,] 600.01077  0.4492142
#> [4,] 344.94901  6.1588794
#> [5,] 518.97656  4.7260773
#> [6,] 371.03636 10.8244648
#> [7,]  26.55173  0.8419574
#> 
#> , , 7
#> 
#>           [,1]      [,2]
#> [1,] 144.99854 1.2789849
#> [2,] 185.85758 0.1906227
#> [3,] 464.85211 0.4680388
#> [4,] 336.57801 8.8809610
#> [5,] 642.18851 3.2776589
#> [6,] 475.65294 5.2329023
#> [7,]  34.13363 1.0105524
#> 
#> , , 8
#> 
#>           [,1]       [,2]
#> [1,] 425.09226  0.5331819
#> [2,] 167.36467  0.4881396
#> [3,] 904.94067  0.6399803
#> [4,] 656.29464 13.4803252
#> [5,] 662.17419  4.5904034
#> [6,] 750.65378  9.0929077
#> [7,]  38.91877  0.6967911
#> 
#> , , 9
#> 
#>            [,1]       [,2]
#> [1,]  298.57482  1.3234131
#> [2,]  238.58720  1.0238755
#> [3,] 2075.52083  0.4255529
#> [4,] 1351.41325  7.0695822
#> [5,]  953.32070 10.1226011
#> [6,]  927.64273  8.2702765
#> [7,]   74.03477  0.7295581
#> 
#> , , 10
#> 
#>            [,1]      [,2]
#> [1,]  284.09142 0.6236348
#> [2,]  194.69621 0.6852493
#> [3,] 2106.39747 0.9149577
#> [4,] 1309.13678 9.3716458
#> [5,]  881.35656 7.6437804
#> [6,] 1862.12106 6.4124199
#> [7,]   99.54782 0.9727999
#> 
#> , , 11
#> 
#>           [,1]      [,2]
#> [1,]  432.2235 0.2706904
#> [2,]  136.9381 1.3331998
#> [3,]  657.4416 0.6305358
#> [4,] 2287.3685 4.8075153
#> [5,] 1837.9242 7.7103270
#> [6,] 2090.0646 9.9352607
#> [7,]  134.7775 0.9971818
#> 
#> , , 12
#> 
#>           [,1]      [,2]
#> [1,]  274.2706 0.2437526
#> [2,]  215.9628 0.7621487
#> [3,] 1062.6207 0.2550985
#> [4,] 1167.7982 4.4000197
#> [5,] 1727.0596 9.0206097
#> [6,] 3066.3925 3.4305740
#> [7,]  178.1443 0.6565677
#> 
#> , , 13
#> 
#>           [,1]      [,2]
#> [1,]  161.7324 0.6285451
#> [2,]  222.7852 0.5263660
#> [3,]  840.2819 0.3202292
#> [4,] 1553.6789 4.1219545
#> [5,] 2957.9656 6.9928034
#> [6,] 2824.3889 4.4336483
#> [7,]  217.1386 0.7171922
#> 
#> , , 14
#> 
#>           [,1]      [,2]
#> [1,]  256.6874 0.3640275
#> [2,]  543.7978 0.6276067
#> [3,]  671.9272 0.2471040
#> [4,] 1512.3766 5.0032973
#> [5,] 2390.2442 5.6838980
#> [6,] 2195.3915 3.7007246
#> [7,]  214.4642 0.5449652
#> 
#> , , 15
#> 
#>           [,1]      [,2]
#> [1,]  599.0478 0.5682679
#> [2,]  422.2564 0.3560827
#> [3,] 1047.1701 0.3429085
#> [4,] 2835.6216 3.4047412
#> [5,] 3659.2375 5.3632180
#> [6,] 3676.9950 4.8665999
#> [7,]  256.1982 0.5736546
#> 
#> , , 16
#> 
#>           [,1]      [,2]
#> [1,]  907.4167 0.2333910
#> [2,]  657.3258 0.4934885
#> [3,]  997.3160 0.3534169
#> [4,] 4301.2517 4.6443186
#> [5,] 3909.3498 6.6163638
#> [6,] 2868.9407 3.5978234
#> [7,]  442.0206 0.4542960
#> 
#> , , 17
#> 
#>           [,1]      [,2]
#> [1,]  525.2832 0.2462584
#> [2,]  563.8241 0.4514591
#> [3,] 1139.3743 0.4180053
#> [4,] 3727.5978 3.2791205
#> [5,] 3036.2659 4.4673589
#> [6,] 4514.1503 4.7109084
#> [7,]  317.8614 0.4293255
#> 
#> , , 18
#> 
#>           [,1]      [,2]
#> [1,]  340.1718 0.3747967
#> [2,]  554.3687 0.4782073
#> [3,]  850.4515 0.5354064
#> [4,] 3857.5688 4.6910350
#> [5,] 4173.2778 5.2088493
#> [6,] 4062.3109 5.4067875
#> [7,]  446.6095 0.5580820
#> 
#> , , 19
#> 
#>           [,1]      [,2]
#> [1,]  909.9823 0.2038876
#> [2,]  417.7028 0.3690311
#> [3,] 1217.7736 0.1158502
#> [4,] 5921.2796 2.9035474
#> [5,] 5468.0681 3.7973182
#> [6,] 7776.4581 2.3346610
#> [7,]  486.9607 0.5466281
#> 
#> , , 20
#> 
#>           [,1]       [,2]
#> [1,]  722.7771 0.22880438
#> [2,]  466.8807 0.23313845
#> [3,] 1666.7574 0.06746745
#> [4,] 7113.6546 4.16587906
#> [5,] 5244.5031 2.68473982
#> [6,] 8542.5823 1.42632304
#> [7,]  870.3944 0.36544309
#> 
#> , , 21
#> 
#>            [,1]       [,2]
#> [1,]   583.6627 0.25498707
#> [2,]  1390.4861 0.13962481
#> [3,]  1752.4842 0.06482366
#> [4,]  5653.7096 1.86290862
#> [5,]  6728.1995 2.57522458
#> [6,] 14064.5616 1.42821348
#> [7,]   829.3533 0.33160935
#> 
#> , , 22
#> 
#>           [,1]      [,2]
#> [1,] 1031.8133 0.4289700
#> [2,]  717.4924 0.1150649
#> [3,] 2560.4939 0.1368189
#> [4,] 7760.6874 3.4276502
#> [5,] 9400.1022 2.1881946
#> [6,] 7114.3554 1.1170687
#> [7,]  832.4967 0.3163940
#> 
#> , , 23
#> 
#>           [,1]      [,2]
#> [1,]  993.7881 0.2109818
#> [2,]  834.1899 0.1029950
#> [3,] 1785.9169 0.1448689
#> [4,] 6063.0186 2.3054783
#> [5,] 6641.0752 2.1805300
#> [6,] 9786.5434 1.1835404
#> [7,]  871.3357 0.2389070
#> 
#> , , 24
#> 
#>            [,1]       [,2]
#> [1,]  2302.7533 0.07745228
#> [2,]  1681.1709 0.24224397
#> [3,]  3675.6225 0.23456075
#> [4,] 11257.4613 2.24586219
#> [5,] 15018.0694 1.78082543
#> [6,] 12584.9414 2.04888761
#> [7,]   897.7284 0.25849918
#> 
#> , , 25
#> 
#>           [,1]       [,2]
#> [1,]  1021.128 0.05869863
#> [2,]  1261.501 0.39160096
#> [3,]  4716.323 0.15640375
#> [4,] 10373.144 1.10374581
#> [5,] 16545.833 3.92583991
#> [6,] 30585.000 4.20759219
#> [7,]  1478.454 0.39750659
#> 
#> , , 26
#> 
#>           [,1]      [,2]
#> [1,]  1527.212 0.1043405
#> [2,]  3231.186 0.4054726
#> [3,]  2949.453 0.2016256
#> [4,] 21268.097 2.3462624
#> [5,] 11764.818 4.8088747
#> [6,] 17106.068 1.6939145
#> [7,]  1472.674 0.5163372
#> 
#> , , 27
#> 
#>           [,1]      [,2]
#> [1,]  2520.895 0.1532775
#> [2,]  1843.945 0.2172373
#> [3,]  2783.885 0.2588256
#> [4,] 30384.826 1.5757193
#> [5,] 21755.319 3.9852134
#> [6,] 19255.611 3.6805478
#> [7,]  1542.288 0.3505638
#> 
#> , , 28
#> 
#>           [,1]      [,2]
#> [1,]  1455.523 0.1641582
#> [2,]  1281.854 0.2206278
#> [3,]  4186.264 0.3440030
#> [4,] 21473.051 2.2138752
#> [5,] 15130.773 4.4070697
#> [6,] 19451.080 3.9774692
#> [7,]  2423.056 0.4348819
#> 
#> , , 29
#> 
#>            [,1]      [,2]
#> [1,]  1465.5772 0.2759649
#> [2,]   514.3715 0.1411799
#> [3,]  1421.3414 0.7430880
#> [4,] 10049.5639 4.8468831
#> [5,]  8618.0135 2.2662515
#> [6,] 10023.1369 5.0906269
#> [7,]  1248.5417 0.3911267
#> 
#> , , 30
#> 
#>            [,1]      [,2]
#> [1,]   869.9615 0.2698672
#> [2,]  1330.4079 0.1660844
#> [3,]  1453.1117 0.3253585
#> [4,] 11338.2563 3.5134751
#> [5,]  7973.8715 1.8371661
#> [6,] 11532.1458 4.6518907
#> [7,]  1102.4568 0.4208479
#> 
#> , , 31
#> 
#>            [,1]       [,2]
#> [1,]   733.6145 0.29709306
#> [2,]  2280.1644 0.09933816
#> [3,]  2881.2167 0.40689912
#> [4,]  7447.9445 3.91289612
#> [5,] 12634.2289 1.95133961
#> [6,] 13457.6986 3.11510805
#> [7,]  1249.8457 0.31721864
#> 
#> , , 32
#> 
#>            [,1]      [,2]
#> [1,]   543.8383 0.2036109
#> [2,]  1055.2465 0.1559749
#> [3,]  2228.7262 0.4706726
#> [4,]  8660.7651 2.8149104
#> [5,]  8496.4282 2.2867180
#> [6,] 17444.2698 3.7042241
#> [7,]  1306.4209 0.3432229
#> 
#> , , 33
#> 
#>           [,1]      [,2]
#> [1,]  1823.215 0.1930280
#> [2,]  1603.218 0.2419251
#> [3,]  4441.977 0.3337211
#> [4,] 11775.451 3.3129336
#> [5,] 11870.206 1.9305895
#> [6,] 17522.645 3.1785526
#> [7,]  1603.751 0.3585016
#> 
#> , , 34
#> 
#>            [,1]      [,2]
#> [1,]  1010.1256 0.2184809
#> [2,]   994.4524 0.1073455
#> [3,]  1866.6683 0.2289197
#> [4,] 14370.3709 2.9106871
#> [5,]  9145.4172 1.9724253
#> [6,] 21980.7520 2.6550858
#> [7,]  1096.1573 0.3191163
#> 
#> , , 35
#> 
#>           [,1]      [,2]
#> [1,]  2407.173 0.1642037
#> [2,]  2967.857 0.3072477
#> [3,]  2158.643 0.2940428
#> [4,] 18108.395 3.4859027
#> [5,] 12572.987 2.6066568
#> [6,] 19305.138 2.4708020
#> [7,]  1962.445 0.4550328
#> 
#> , , 36
#> 
#>           [,1]      [,2]
#> [1,]  1801.149 0.2038503
#> [2,]  1521.580 0.4861818
#> [3,]  5572.234 0.7497909
#> [4,] 24362.464 2.7916999
#> [5,] 15688.375 6.0355194
#> [6,] 27096.865 7.0920022
#> [7,]  1483.494 0.4525165
#> 
#> , , 37
#> 
#>           [,1]      [,2]
#> [1,]  2111.508 0.2226401
#> [2,]  1361.718 0.5156822
#> [3,]  4886.024 0.5226784
#> [4,] 19625.127 3.7892442
#> [5,] 27794.511 5.8256797
#> [6,] 28873.727 8.3848285
#> [7,]  2945.030 0.6230991
#> 
#> , , 38
#> 
#>            [,1]      [,2]
#> [1,]  2293.5027 0.1763596
#> [2,]   879.1422 0.2741787
#> [3,]  2271.4988 1.1397664
#> [4,] 36289.4730 3.0484511
#> [5,] 19940.1684 5.8384463
#> [6,] 30471.9301 7.7259119
#> [7,]  2762.1838 0.7188720
#> 
#> , , 39
#> 
#>           [,1]      [,2]
#> [1,]  2760.009 0.3086421
#> [2,]  1136.302 0.1285610
#> [3,]  1528.561 0.7924159
#> [4,] 29686.058 3.7886296
#> [5,] 17453.888 2.5022087
#> [6,] 24317.398 5.1667485
#> [7,]  2762.505 0.3792713
#> 
#> , , 40
#> 
#>           [,1]      [,2]
#> [1,]  3599.860 0.5570146
#> [2,]  1669.310 0.3704331
#> [3,]  6771.594 0.4066241
#> [4,] 21019.734 5.9386978
#> [5,] 15811.221 2.8014881
#> [6,] 27638.082 4.5799247
#> [7,]  2265.659 0.5967904
#> 
#> , , 41
#> 
#>           [,1]      [,2]
#> [1,]  3366.731 0.6348892
#> [2,]  3537.486 0.4465920
#> [3,]  2473.354 0.3200758
#> [4,] 20011.177 7.9240500
#> [5,] 19733.355 4.4318991
#> [6,] 23168.911 5.5976857
#> [7,]  2064.677 0.6153947
#> 
#> , , 42
#> 
#>           [,1]      [,2]
#> [1,] 11434.488 0.2840746
#> [2,]  2126.013 0.3128792
#> [3,]  2752.969 0.3217459
#> [4,] 32384.298 5.3720313
#> [5,] 21066.976 4.1830752
#> [6,] 28951.492 4.5136034
#> [7,]  2207.196 0.6864736
#> 
#> , , 43
#> 
#>           [,1]      [,2]
#> [1,]  7461.547 0.4493487
#> [2,]  2492.338 0.4733823
#> [3,]  2291.754 0.4742480
#> [4,] 55249.138 5.7275956
#> [5,] 23769.968 5.5612790
#> [6,] 26108.942 4.9814690
#> [7,]  3188.313 0.8293461
#> 
#> , , 44
#> 
#>           [,1]       [,2]
#> [1,]  6931.415  0.6734214
#> [2,]  1670.005  0.3385642
#> [3,]  3428.666  0.6465271
#> [4,] 49775.079  6.1292346
#> [5,] 28490.536 10.5293719
#> [6,] 30277.273  9.1628726
#> [7,]  3258.886  0.9860954
#> 
#> , , 45
#> 
#>           [,1]      [,2]
#> [1,]  4321.481 0.5705731
#> [2,]  4419.092 0.2232879
#> [3,]  8424.745 0.6893628
#> [4,] 46417.274 7.2772473
#> [5,] 30837.524 3.7002511
#> [6,] 39663.266 9.3262955
#> [7,]  3313.107 1.1059454
#> 
#> , , 46
#> 
#>           [,1]      [,2]
#> [1,]  2623.076 0.2802601
#> [2,]  1000.584 0.1674028
#> [3,]  2992.236 0.5437677
#> [4,] 33804.396 4.4935918
#> [5,] 28398.494 2.6270961
#> [6,] 35272.701 8.9721021
#> [7,]  3571.973 0.7636729
#> 
#> , , 47
#> 
#>            [,1]      [,2]
#> [1,]  2899.9920 0.4229984
#> [2,]   872.0348 0.1835073
#> [3,]  1602.1993 1.3546828
#> [4,] 22293.7703 6.0731441
#> [5,] 13595.4985 3.1350252
#> [6,] 21326.9573 6.8916704
#> [7,]  3009.1969 0.6547824
#> 
#> , , 48
#> 
#>           [,1]      [,2]
#> [1,]  3238.668 0.6872223
#> [2,]  2331.289 0.5352835
#> [3,]  2630.680 0.5322155
#> [4,] 33253.598 6.9134629
#> [5,] 11072.211 3.3885831
#> [6,] 10925.452 7.2301825
#> [7,]  1944.255 0.5562455
#> 
#> , , 49
#> 
#>           [,1]      [,2]
#> [1,]  2791.646 2.0699085
#> [2,]  1224.562 0.3252433
#> [3,]  1707.872 1.1722455
#> [4,] 20116.424 8.4550873
#> [5,] 21112.286 7.1455037
#> [6,] 21962.205 8.8923390
#> [7,]  1648.847 0.6976968
#> 
#> , , 50
#> 
#>           [,1]       [,2]
#> [1,]  1363.853  1.2851243
#> [2,]  1529.931  0.4313469
#> [3,]  2401.802  1.2099505
#> [4,] 33249.971 15.1726244
#> [5,] 15065.928  4.7930402
#> [6,] 14317.859 11.3911580
#> [7,]  2888.659  0.8907272
#> 
#> 


## ------------------------------------------------
## 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