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.625178  0.0000000 0.000000
#> [2,]  1.561779 11.9255115 0.000000
#> [3,] -8.628377  0.3622995 1.162061
#> 
#> , , 2
#> 
#>            [,1]      [,2]     [,3]
#> [1,] 27.2947874  0.000000  0.00000
#> [2,] -0.3524347 34.393731  0.00000
#> [3,] -7.5667774  3.060596 13.30451
#> 
#> , , 3
#> 
#>           [,1]      [,2]    [,3]
#> [1,] 32.046654  0.000000  0.0000
#> [2,] -2.423210 36.097847  0.0000
#> [3,] -8.903576  4.340796 46.8013
#> 
#> , , 4
#> 
#>           [,1]      [,2]     [,3]
#> [1,]  33.65491  0.000000  0.00000
#> [2,]   1.32436 40.684144  0.00000
#> [3,] -14.59921 -5.041667 88.57159
#> 
#> , , 5
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  34.399184  0.000000  0.00000
#> [2,]  -5.730708 39.819431  0.00000
#> [3,] -12.972063 -0.963403 92.83614
#> 
#> , , 6
#> 
#>           [,1]       [,2]     [,3]
#> [1,]  38.16838  0.0000000  0.00000
#> [2,]  -2.89114 40.9842752  0.00000
#> [3,] -11.70220  0.8761745 90.59325
#> 
#> , , 7
#> 
#>             [,1]      [,2]     [,3]
#> [1,]  37.8750654  0.000000   0.0000
#> [2,]   0.2558356 37.609912   0.0000
#> [3,] -17.0929710  1.151076 100.5682
#> 
#> , , 8
#> 
#>              [,1]       [,2]     [,3]
#> [1,]  36.44484963  0.0000000  0.00000
#> [2,]   0.01054161 37.8769816  0.00000
#> [3,] -12.87673674  0.6256495 96.56978
#> 
#> , , 9
#> 
#>            [,1]      [,2]    [,3]
#> [1,]  37.171833  0.000000  0.0000
#> [2,]   6.093931 41.866867  0.0000
#> [3,] -13.873134 -3.854176 92.9771
#> 
#> , , 10
#> 
#>             [,1]        [,2]     [,3]
#> [1,]  33.6843753  0.00000000   0.0000
#> [2,]  -0.4914491 39.05926220   0.0000
#> [3,] -12.3518181 -0.07591404 100.8067
#> 
#> , , 11
#> 
#>            [,1]       [,2]     [,3]
#> [1,]  33.745039  0.0000000  0.00000
#> [2,]  -1.049453 36.7805361  0.00000
#> [3,] -14.473627  0.8199723 97.55824
#> 
#> , , 12
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  36.273383  0.000000   0.0000
#> [2,]   3.575686 36.529062   0.0000
#> [3,] -12.637904 -1.332511 100.0249
#> 
#> , , 13
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  33.435586  0.000000  0.00000
#> [2,]  -5.449083 40.189864  0.00000
#> [3,] -15.439028 -3.491742 93.49245
#> 
#> , , 14
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  33.111812  0.000000  0.00000
#> [2,]  -2.454564 36.892381  0.00000
#> [3,] -14.668629  1.486277 94.75506
#> 
#> , , 15
#> 
#>             [,1]      [,2]     [,3]
#> [1,]  38.0430512  0.000000   0.0000
#> [2,]  -0.4394088 38.862837   0.0000
#> [3,] -14.6210733  3.184935 101.5143
#> 
#> , , 16
#> 
#>             [,1]       [,2]     [,3]
#> [1,]  35.6725464  0.0000000  0.00000
#> [2,]  -0.5596658 38.4266101  0.00000
#> [3,] -17.7829644  0.3603456 96.74107
#> 
#> , , 17
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  36.316785  0.000000  0.00000
#> [2,]   1.020836 41.498560  0.00000
#> [3,] -14.154229  1.286496 97.22703
#> 
#> , , 18
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  34.972061  0.000000  0.00000
#> [2,]   1.786593 38.344896  0.00000
#> [3,] -15.838556  4.233251 89.68837
#> 
#> , , 19
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  34.690017  0.000000  0.00000
#> [2,]   1.339003 37.045590  0.00000
#> [3,] -15.073546 -2.278831 90.83106
#> 
#> , , 20
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  33.231298  0.000000  0.00000
#> [2,]  -1.582193 39.907794  0.00000
#> [3,] -17.575167 -2.414792 99.51773
#> 
#> , , 21
#> 
#>            [,1]       [,2]     [,3]
#> [1,]  33.236894  0.0000000  0.00000
#> [2,]  -3.634611 38.8730476  0.00000
#> [3,] -16.011626 -0.5516528 94.46281
#> 
#> , , 22
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  36.118320  0.000000   0.0000
#> [2,]  -3.509003 39.519874   0.0000
#> [3,] -13.678357  1.087391 100.0775
#> 
#> , , 23
#> 
#>            [,1]     [,2]     [,3]
#> [1,]  32.897814  0.00000  0.00000
#> [2,]   6.004714 37.50210  0.00000
#> [3,] -13.704600 -4.37438 95.73988
#> 
#> , , 24
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  37.851884  0.000000   0.0000
#> [2,]  -2.633126 37.131417   0.0000
#> [3,] -12.736444  3.198319 104.7749
#> 
#> , , 25
#> 
#>             [,1]      [,2]     [,3]
#> [1,]  36.3183731  0.000000   0.0000
#> [2,]  -0.4808893 40.098649   0.0000
#> [3,] -12.6461250  1.103201 104.3992
#> 
#> , , 26
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  38.722895  0.000000  0.00000
#> [2,]   1.857223 42.390780  0.00000
#> [3,] -15.003503  2.744095 94.48138
#> 
#> , , 27
#> 
#>            [,1]       [,2]     [,3]
#> [1,]  33.264941  0.0000000  0.00000
#> [2,]   3.460295 40.1202131  0.00000
#> [3,] -11.782618  0.0173869 98.16268
#> 
#> , , 28
#> 
#>            [,1]       [,2]     [,3]
#> [1,]  34.283941  0.0000000  0.00000
#> [2,]   2.760868 40.5267094  0.00000
#> [3,] -10.153680 -0.7781953 94.81674
#> 
#> , , 29
#> 
#>             [,1]      [,2]     [,3]
#> [1,]  35.7179826  0.000000   0.0000
#> [2,]   0.5645258 38.440563   0.0000
#> [3,] -20.0919609 -2.706125 105.8307
#> 
#> , , 30
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  38.707593  0.000000  0.00000
#> [2,]  -1.747118 40.024985  0.00000
#> [3,] -12.942394  1.050389 92.16743
#> 
#> , , 31
#> 
#>            [,1]     [,2]     [,3]
#> [1,]  35.288548  0.00000  0.00000
#> [2,]   3.478071 40.62488  0.00000
#> [3,] -13.718219 -2.06149 94.20865
#> 
#> , , 32
#> 
#>             [,1]      [,2]     [,3]
#> [1,]  36.5812280  0.000000  0.00000
#> [2,]   0.5500682 40.633544  0.00000
#> [3,] -15.5423623  1.352244 96.38787
#> 
#> , , 33
#> 
#>            [,1]       [,2]     [,3]
#> [1,]  35.000629  0.0000000   0.0000
#> [2,]   1.145014 40.2991470   0.0000
#> [3,] -13.044675  0.3307409 105.7495
#> 
#> , , 34
#> 
#>            [,1]       [,2]     [,3]
#> [1,]  31.202037  0.0000000  0.00000
#> [2,]   3.400948 40.4153876  0.00000
#> [3,] -15.653990 -0.9012672 98.11964
#> 
#> , , 35
#> 
#>           [,1]       [,2]     [,3]
#> [1,]  36.08566  0.0000000  0.00000
#> [2,]  -4.36511 37.5206964  0.00000
#> [3,] -12.78043  0.3215287 97.37462
#> 
#> , , 36
#> 
#>            [,1]     [,2]    [,3]
#> [1,]  36.976826  0.00000  0.0000
#> [2,]   1.211982 40.40264  0.0000
#> [3,] -15.239325 -1.16234 98.9021
#> 
#> , , 37
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  35.812230  0.000000  0.00000
#> [2,]  -2.825075 37.333046  0.00000
#> [3,] -13.362064  2.607318 95.26643
#> 
#> , , 38
#> 
#>             [,1]      [,2]     [,3]
#> [1,]  35.4199801  0.000000  0.00000
#> [2,]   0.9173166 38.626601  0.00000
#> [3,] -15.8979305 -1.809055 91.79532
#> 
#> , , 39
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  36.848944  0.000000  0.00000
#> [2,]  -1.881553 38.848076  0.00000
#> [3,] -15.997753 -1.629649 92.95741
#> 
#> , , 40
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  34.133821  0.000000  0.00000
#> [2,]  -4.324609 35.772985  0.00000
#> [3,] -12.409613  1.076788 88.98742
#> 
#> , , 41
#> 
#>           [,1]      [,2]     [,3]
#> [1,]  37.89662  0.000000  0.00000
#> [2,]   1.22160 40.867975  0.00000
#> [3,] -18.43901  2.635899 96.15367
#> 
#> , , 42
#> 
#>            [,1]       [,2]     [,3]
#> [1,]  35.604593  0.0000000  0.00000
#> [2,]   2.636376 38.0469988  0.00000
#> [3,] -11.807229  0.7588971 89.52497
#> 
#> , , 43
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  34.713368  0.000000  0.00000
#> [2,]   0.272365 36.388464  0.00000
#> [3,] -10.919739 -2.327728 94.95823
#> 
#> , , 44
#> 
#>             [,1]      [,2]     [,3]
#> [1,]  34.7122667  0.000000  0.00000
#> [2,]   0.1775378 38.481855  0.00000
#> [3,] -15.7417363 -6.080098 97.50827
#> 
#> , , 45
#> 
#>            [,1]       [,2]     [,3]
#> [1,]  35.071574  0.0000000  0.00000
#> [2,]   1.749794 39.8187456  0.00000
#> [3,] -14.502161  0.9766589 93.88415
#> 
#> , , 46
#> 
#>           [,1]      [,2]     [,3]
#> [1,]  34.06185  0.000000  0.00000
#> [2,]  -1.52388 40.901010  0.00000
#> [3,] -13.63949 -1.093157 96.03225
#> 
#> , , 47
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  34.607194  0.000000  0.00000
#> [2,]   1.916808 38.601625  0.00000
#> [3,] -12.278291  2.856915 95.14081
#> 
#> , , 48
#> 
#>             [,1]      [,2]     [,3]
#> [1,]  36.5434243  0.000000  0.00000
#> [2,]   0.7229805 37.857128  0.00000
#> [3,] -12.5534330 -4.512804 91.92304
#> 
#> , , 49
#> 
#>           [,1]        [,2]     [,3]
#> [1,]  35.38854  0.00000000  0.00000
#> [2,]  -1.58878 39.02645582  0.00000
#> [3,] -11.68948 -0.07106418 96.04384
#> 
#> , , 50
#> 
#>            [,1]      [,2]     [,3]
#> [1,]  35.908714  0.000000  0.00000
#> [2,]  -1.979686 38.142385  0.00000
#> [3,] -14.978156 -2.272462 96.84002
#> 
#> 
#> $A
#> , , 1
#> 
#>           [,1]       [,2]       [,3]      [,4]
#> [1,] 1.2355167  0.1769710 -0.6176496 -0.686833
#> [2,] 0.8510467  0.7778049 -1.0009246 -1.686437
#> [3,] 0.3264054 -0.1529045  0.7515387 -0.269074
#> 
#> , , 2
#> 
#>              [,1]        [,2]      [,3]         [,4]
#> [1,]  0.731910171 -0.03078929 0.3504827 -0.191644832
#> [2,] -0.007260505  0.93253087 0.0250349 -0.553793948
#> [3,] -0.665280914 -0.01769060 1.8509378  0.008439843
#> 
#> , , 3
#> 
#>             [,1]         [,2]        [,3]        [,4]
#> [1,]  0.82131552 -0.017769490  0.22994434 -0.11879483
#> [2,]  0.01048662  0.966797365 -0.01496625 -0.34210059
#> [3,] -0.07597095 -0.003640448  1.10906817  0.07483454
#> 
#> , , 4
#> 
#>              [,1]          [,2]       [,3]        [,4]
#> [1,]  0.900190082 -0.0038937762 0.12442442 -0.03925006
#> [2,] -0.007394088  0.9450986115 0.01570368 -0.49806387
#> [3,] -0.026346159  0.0005753449 1.03474518  0.02431762
#> 
#> , , 5
#> 
#>               [,1]         [,2]       [,3]        [,4]
#> [1,]  0.8798696074 -0.008093367 0.15174575 -0.06464812
#> [2,] -0.0259167325  0.962813970 0.03404936 -0.35916176
#> [3,]  0.0008126926 -0.006374046 0.99794916 -0.06746834
#> 
#> , , 6
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.91224594 -0.001912106 0.10083232 -0.08556435
#> [2,] -0.03734753  0.954058368 0.05498807 -0.39278546
#> [3,] -0.03353537 -0.002971584 1.03922645 -0.04694773
#> 
#> , , 7
#> 
#>              [,1]         [,2]      [,3]       [,4]
#> [1,]  0.907066522 -0.007902869 0.1092991 -0.1293527
#> [2,] -0.017239464  0.963563781 0.0238065 -0.3423416
#> [3,] -0.008316611 -0.014386859 1.0094466 -0.1465798
#> 
#> , , 8
#> 
#>             [,1]        [,2]       [,3]        [,4]
#> [1,]  0.92721861 -0.01281937 0.09909425 -0.06358056
#> [2,] -0.03688307  0.93211739 0.05384485 -0.61555807
#> [3,] -0.01981590 -0.01558366 1.02645896 -0.13891053
#> 
#> , , 9
#> 
#>             [,1]         [,2]      [,3]        [,4]
#> [1,]  0.92066871 -0.007288716 0.1040060 -0.03324233
#> [2,] -0.01539593  0.960423776 0.0236036 -0.35666196
#> [3,] -0.01370367 -0.006749855 1.0168672 -0.06506941
#> 
#> , , 10
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.92818274  0.001010699 0.08016117 -0.05979877
#> [2,] -0.03726171  0.959908558 0.04407804 -0.42101952
#> [3,] -0.01563837 -0.012837761 1.01881799 -0.12936260
#> 
#> , , 11
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.94747897  0.002707995 0.05579779 -0.04399525
#> [2,] -0.02630929  0.953497198 0.04240531 -0.38791772
#> [3,] -0.01037338 -0.001712058 1.00804117 -0.05016168
#> 
#> , , 12
#> 
#>              [,1]        [,2]       [,3]        [,4]
#> [1,]  0.928140125  0.01496174 0.07721902  0.05433947
#> [2,]  0.003871542  0.94485235 0.01175732 -0.41977711
#> [3,] -0.021056706 -0.01066002 1.02632115 -0.10304970
#> 
#> , , 13
#> 
#>             [,1]          [,2]       [,3]        [,4]
#> [1,]  0.92339925  0.0001777319 0.09261079 -0.02084218
#> [2,] -0.01843323  0.9499794883 0.02072984 -0.51539331
#> [3,] -0.02986199 -0.0035503686 1.03334295 -0.06281083
#> 
#> , , 14
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.90063548  0.005907164 0.12125865  0.03549532
#> [2,] -0.02038378  0.953306348 0.03250062 -0.41178424
#> [3,] -0.02612772 -0.006134706 1.03170681 -0.06529857
#> 
#> , , 15
#> 
#>             [,1]         [,2]      [,3]        [,4]
#> [1,]  0.91508320 -0.007413435 0.1119030 -0.02921552
#> [2,] -0.02147945  0.960085249 0.0295541 -0.37548852
#> [3,] -0.01198200 -0.011054712 1.0140752 -0.11408601
#> 
#> , , 16
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.92885320  0.007036932 0.08299768  0.02939909
#> [2,] -0.02342524  0.965428169 0.03481418 -0.29955253
#> [3,] -0.01104363 -0.007067506 1.01136181 -0.08466052
#> 
#> , , 17
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.91642664 -0.009348184 0.10209946 -0.10865638
#> [2,] -0.02893875  0.939974567 0.04892932 -0.50029838
#> [3,] -0.02686273 -0.006910296 1.03207404 -0.07688458
#> 
#> , , 18
#> 
#>              [,1]        [,2]       [,3]       [,4]
#> [1,]  0.897200502 -0.01688742 0.12402426 -0.2011836
#> [2,] -0.065124836  0.95388005 0.08859829 -0.4056474
#> [3,] -0.007397412 -0.01087616 1.00832036 -0.1109261
#> 
#> , , 19
#> 
#>             [,1]          [,2]       [,3]        [,4]
#> [1,]  0.91084590 -0.0077228335 0.10850037 -0.09887946
#> [2,] -0.04196279  0.9551002834 0.05455922 -0.42912223
#> [3,] -0.01765494  0.0001604119 1.01612549 -0.03912026
#> 
#> , , 20
#> 
#>              [,1]        [,2]          [,3]       [,4]
#> [1,]  0.899658999 -0.01068214  0.1253785273 -0.1032926
#> [2,]  0.009381446  0.93346245 -0.0004270431 -0.5741164
#> [3,] -0.026360718 -0.01083799  1.0330708978 -0.1035322
#> 
#> , , 21
#> 
#>              [,1]        [,2]       [,3]       [,4]
#> [1,]  0.931529172 -0.02839826 0.09835927 -0.1838293
#> [2,] -0.034070333  0.93984486 0.05239093 -0.5227739
#> [3,] -0.004632227 -0.01788497 1.01110925 -0.1336045
#> 
#> , , 22
#> 
#>             [,1]        [,2]       [,3]        [,4]
#> [1,]  0.93997154 -0.02308535 0.08427057 -0.15895354
#> [2,] -0.03069271  0.95667369 0.04308011 -0.39558838
#> [3,] -0.01449299 -0.01189680 1.02335023 -0.07483588
#> 
#> , , 23
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.90481508 -0.006625060 0.13012460  0.02408888
#> [2,] -0.01549188  0.945898623 0.02996249 -0.45745763
#> [3,] -0.03006922 -0.005893595 1.03682028 -0.06065255
#> 
#> , , 24
#> 
#>            [,1]        [,2]       [,3]       [,4]
#> [1,]  0.9172758 -0.00450659 0.09335421 -0.1195438
#> [2,] -0.0379691  0.94861405 0.06022437 -0.4140769
#> [3,] -0.0124385 -0.01946882 1.01659941 -0.1830544
#> 
#> , , 25
#> 
#>             [,1]        [,2]       [,3]       [,4]
#> [1,]  0.93242363 -0.01425148 0.08719620 -0.1195006
#> [2,] -0.03211976  0.96289810 0.04375653 -0.3407211
#> [3,] -0.01193068 -0.01159823 1.01541442 -0.1081720
#> 
#> , , 26
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.91625683 -0.018927938 0.11385471 -0.11550286
#> [2,] -0.02213274  0.956932010 0.02869339 -0.41858437
#> [3,] -0.01429708 -0.007824069 1.01708264 -0.08013015
#> 
#> , , 27
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.94297415  0.005651932 0.06531610  0.01467592
#> [2,] -0.04736509  0.949755849 0.07234535 -0.39841081
#> [3,] -0.02235154 -0.004955660 1.02501516 -0.06871955
#> 
#> , , 28
#> 
#>              [,1]          [,2]         [,3]        [,4]
#> [1,]  0.917630977 -0.0070491869  0.101740986 -0.07465296
#> [2,] -0.003349773  0.9666701030 -0.002609422 -0.38210487
#> [3,] -0.013179866 -0.0004800539  1.012603681 -0.02973981
#> 
#> , , 29
#> 
#>             [,1]          [,2]       [,3]        [,4]
#> [1,]  0.92446060  0.0167476792 0.08176439  0.07260752
#> [2,] -0.01656791  0.9397783426 0.03350486 -0.50130194
#> [3,] -0.01192641 -0.0004394878 1.00979070 -0.03920702
#> 
#> , , 30
#> 
#>              [,1]         [,2]         [,3]       [,4]
#> [1,]  0.909410598 -0.009582666  0.110852242 -0.1103350
#> [2,]  0.008125552  0.969145578 -0.009976071 -0.3046426
#> [3,] -0.023086784 -0.012853550  1.025814917 -0.1480580
#> 
#> , , 31
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.92926404 -0.007759476 0.08304896 -0.11341428
#> [2,] -0.01185339  0.975463839 0.01416254 -0.24791581
#> [3,] -0.01517113 -0.004020335 1.01801091 -0.04314822
#> 
#> , , 32
#> 
#>              [,1]         [,2]       [,3]        [,4]
#> [1,]  0.928574780 -0.004831199 0.08619157 -0.06932526
#> [2,] -0.002404909  0.946757740 0.01324640 -0.45340394
#> [3,]  0.001639534 -0.007390956 0.99728028 -0.07356884
#> 
#> , , 33
#> 
#>             [,1]        [,2]       [,3]       [,4]
#> [1,]  0.94058457 -0.02019814 0.07726544 -0.1756004
#> [2,] -0.05722687  0.96577714 0.07108731 -0.3447415
#> [3,] -0.01574150 -0.01113269 1.01884208 -0.1143822
#> 
#> , , 34
#> 
#>             [,1]        [,2]       [,3]       [,4]
#> [1,]  0.91358842 -0.01986323 0.09915785 -0.2651924
#> [2,] -0.02238284  0.97059020 0.02875315 -0.2856005
#> [3,] -0.02040316 -0.01003462 1.02496257 -0.1013321
#> 
#> , , 35
#> 
#>             [,1]         [,2]       [,3]         [,4]
#> [1,]  0.92025182  0.006257157 0.09247466  0.009453451
#> [2,] -0.01985134  0.951832078 0.02633828 -0.467383988
#> [3,] -0.01478897 -0.015916809 1.02060665 -0.139635406
#> 
#> , , 36
#> 
#>              [,1]          [,2]         [,3]        [,4]
#> [1,]  0.940490030  0.0004789846  0.065624895 -0.06139560
#> [2,]  0.008517945  0.9537173891 -0.003823575 -0.40601494
#> [3,] -0.009871987 -0.0071060049  1.013804321 -0.05587087
#> 
#> , , 37
#> 
#>              [,1]         [,2]       [,3]        [,4]
#> [1,]  0.930696571 -0.022635736 0.10111834 -0.11259925
#> [2,] -0.032293577  0.961412686 0.03989762 -0.38703456
#> [3,] -0.004131981 -0.004610519 1.00372496 -0.05229396
#> 
#> , , 38
#> 
#>             [,1]        [,2]       [,3]         [,4]
#> [1,]  0.94533551 0.004535163 0.06241454  0.003207421
#> [2,] -0.01991736 0.943892798 0.03671539 -0.463211570
#> [3,] -0.01532389 0.001631488 1.01486165 -0.012697082
#> 
#> , , 39
#> 
#>             [,1]        [,2]       [,3]          [,4]
#> [1,]  0.91601261 0.009854003 0.09307862  0.0076863588
#> [2,] -0.03268603 0.969840251 0.03927491 -0.3112994423
#> [3,] -0.02624289 0.005003881 1.02583680  0.0001165784
#> 
#> , , 40
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.90631035  0.012937923 0.11410684  0.10800451
#> [2,] -0.04183659  0.967967955 0.04796417 -0.35336990
#> [3,] -0.02211695 -0.003926311 1.02755714 -0.03611603
#> 
#> , , 41
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.94321707  0.001029574 0.07084328  0.01369148
#> [2,] -0.04183803  0.961681558 0.05758869 -0.33927695
#> [3,] -0.01151560 -0.008235618 1.01583597 -0.06755206
#> 
#> , , 42
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.93152097 -0.003891062 0.09203798  0.01050091
#> [2,] -0.05298884  0.964126546 0.06429532 -0.36995756
#> [3,] -0.01471880 -0.008079666 1.02052750 -0.06029560
#> 
#> , , 43
#> 
#>              [,1]          [,2]       [,3]        [,4]
#> [1,]  0.937794885  0.0030343603 0.06880819 -0.03230744
#> [2,] -0.023344444  0.9550457949 0.03398735 -0.41109827
#> [3,] -0.003491382 -0.0007386054 0.99998553 -0.03645626
#> 
#> , , 44
#> 
#>              [,1]         [,2]       [,3]        [,4]
#> [1,]  0.923863248 0.0187625959 0.08538392  0.11526925
#> [2,] -0.002870695 0.9571158415 0.01094906 -0.37085509
#> [3,] -0.012500792 0.0009084691 1.01135500 -0.02067132
#> 
#> , , 45
#> 
#>             [,1]        [,2]       [,3]          [,4]
#> [1,]  0.93652067 0.028118806 0.06558110  1.777139e-01
#> [2,] -0.04990724 0.986796618 0.06151097 -1.374839e-01
#> [3,] -0.01440978 0.002406838 1.01442999  3.640007e-05
#> 
#> , , 46
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.93633183  0.007825501 0.07101268  0.01778368
#> [2,] -0.02984780  0.932251200 0.05115651 -0.56677730
#> [3,] -0.01204286 -0.006809504 1.01078892 -0.09535211
#> 
#> , , 47
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.94085023 -0.001430315 0.07620863  0.00618114
#> [2,] -0.05642562  0.950173977 0.08263498 -0.40376271
#> [3,] -0.01674886 -0.008999551 1.02113516 -0.08457994
#> 
#> , , 48
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.93250312  0.004869862 0.07171663 -0.04305997
#> [2,] -0.01654406  0.944503245 0.02490093 -0.51979997
#> [3,] -0.02630331 -0.006649548 1.02856843 -0.09544713
#> 
#> , , 49
#> 
#>             [,1]         [,2]       [,3]        [,4]
#> [1,]  0.93764003 -0.006084823 0.07634420 -0.06890141
#> [2,] -0.04711145  0.923971177 0.07217019 -0.65611616
#> [3,] -0.01424029 -0.008277395 1.01740483 -0.08140878
#> 
#> , , 50
#> 
#>             [,1]         [,2]         [,3]        [,4]
#> [1,]  0.96958299 -0.006643591 0.0442418240 -0.01532837
#> [2,]  0.01003806  0.936535947 0.0002943213 -0.53300332
#> [3,] -0.01430550 -0.006643006 1.0188697320 -0.05410226
#> 
#> 
#> $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,] 10.486371  1.0352271
#> [2,] 19.272943  4.0470258
#> [3,]  6.209581  0.2562439
#> [4,] 31.397916 17.3753301
#> [5,] 72.373873 18.1263969
#> [6,] 52.361327  5.3943727
#> [7,]  4.699034  1.6691800
#> 
#> , , 3
#> 
#>            [,1]       [,2]
#> [1,] 188.230279  1.9867076
#> [2,] 161.230013  1.6355129
#> [3,]   9.217058  0.7126437
#> [4,]  34.355632 15.6236881
#> [5,] 125.262632 14.4897237
#> [6,]  33.658506  4.9435039
#> [7,]   5.932737  1.5022715
#> 
#> , , 4
#> 
#>            [,1]       [,2]
#> [1,] 237.878516  1.0284292
#> [2,]  94.595066  1.8235900
#> [3,] 214.215456  0.6589898
#> [4,] 107.523341 15.5894247
#> [5,]  86.516781 19.8678279
#> [6,]  65.483330 13.8893568
#> [7,]   6.068487  1.3271526
#> 
#> , , 5
#> 
#>            [,1]      [,2]
#> [1,] 302.345905  1.288031
#> [2,] 151.928594  1.063824
#> [3,] 787.874837  2.787163
#> [4,] 146.082998  9.811108
#> [5,]  80.713180 19.153100
#> [6,] 160.036891 16.697574
#> [7,]   9.169727  1.594835
#> 
#> , , 6
#> 
#>           [,1]       [,2]
#> [1,]  153.2513  0.6657617
#> [2,]  150.2364  1.6432109
#> [3,] 1041.0877  1.5202548
#> [4,]  451.4799 11.2315550
#> [5,]  330.0792 16.5235911
#> [6,]  496.7899 23.7005343
#> [7,]   27.0548  1.4857158
#> 
#> , , 7
#> 
#>           [,1]       [,2]
#> [1,] 255.43347  0.6051011
#> [2,] 164.94339  0.8137486
#> [3,] 694.72677  1.2482029
#> [4,] 629.84685  6.3815636
#> [5,] 630.30392 13.6323874
#> [6,] 766.09052 17.6398206
#> [7,]  46.95066  1.2928745
#> 
#> , , 8
#> 
#>           [,1]       [,2]
#> [1,] 339.17292  0.2294897
#> [2,] 252.62913  0.7567185
#> [3,] 749.57023  0.5022191
#> [4,] 942.12196  5.3176002
#> [5,] 774.13345 13.5550102
#> [6,] 728.67483 11.6147796
#> [7,]  47.10859  1.1163628
#> 
#> , , 9
#> 
#>            [,1]       [,2]
#> [1,]  601.81756  0.4131118
#> [2,]  173.20564  1.1196918
#> [3,]  606.63337  0.9270538
#> [4,] 1215.41569  5.8177934
#> [5,] 1090.76448 12.4346154
#> [6,]  896.45318  8.3903683
#> [7,]   90.29783  1.1576004
#> 
#> , , 10
#> 
#>            [,1]       [,2]
#> [1,]  320.35886  0.3794289
#> [2,]  165.10509  0.6554241
#> [3,]  734.13497  1.4153413
#> [4,] 1239.09585  7.1419281
#> [5,] 1012.84639 11.3359267
#> [6,] 1132.63885 10.5903731
#> [7,]   89.60751  1.1681162
#> 
#> , , 11
#> 
#>           [,1]       [,2]
#> [1,]  112.6398  0.6370344
#> [2,]  102.6378  0.5653432
#> [3,]  687.3588  1.1914224
#> [4,] 1401.3413  6.7314239
#> [5,] 1411.4497  8.4292614
#> [6,] 2937.9322 13.2971082
#> [7,]  151.0479  0.9893273
#> 
#> , , 12
#> 
#>           [,1]      [,2]
#> [1,]  272.2722 0.3395237
#> [2,]  201.7532 0.2810501
#> [3,] 1609.0336 0.4661084
#> [4,] 1766.7546 6.4498755
#> [5,] 1386.8267 4.3894281
#> [6,] 2199.6480 7.9412889
#> [7,]  157.6585 0.9856339
#> 
#> , , 13
#> 
#>           [,1]      [,2]
#> [1,]  248.7660 0.4705362
#> [2,]  354.4646 0.2250632
#> [3,] 1138.2359 0.3365963
#> [4,] 2407.9380 5.7018408
#> [5,] 2351.8651 4.3114846
#> [6,] 3053.5673 5.3486005
#> [7,]  225.2116 0.7104194
#> 
#> , , 14
#> 
#>           [,1]      [,2]
#> [1,] 1453.1307 0.3624442
#> [2,]  322.0911 0.1820825
#> [3,] 2722.0903 0.3914864
#> [4,] 4096.0050 6.1114307
#> [5,] 3131.9227 2.5963784
#> [6,] 4914.0580 4.3539511
#> [7,]  245.1732 0.5910171
#> 
#> , , 15
#> 
#>           [,1]      [,2]
#> [1,]  529.6656 0.1707822
#> [2,]  162.9879 0.1155529
#> [3,]  910.9756 0.3060443
#> [4,] 7500.4984 3.1762130
#> [5,] 2289.4928 3.0919551
#> [6,] 3557.9108 5.9028917
#> [7,]  368.9966 0.4810450
#> 
#> , , 16
#> 
#>           [,1]      [,2]
#> [1,] 1289.1115 0.2943191
#> [2,]  211.8993 0.2325770
#> [3,] 1605.7787 0.9646046
#> [4,] 4097.8056 2.3276418
#> [5,] 3536.1960 2.7471097
#> [6,] 4985.2773 5.9548782
#> [7,]  422.0641 0.6094600
#> 
#> , , 17
#> 
#>           [,1]      [,2]
#> [1,] 1385.7164 0.2173854
#> [2,]  382.8981 1.0425152
#> [3,] 1452.2719 0.5391556
#> [4,] 5822.0320 3.6818588
#> [5,] 2933.2029 4.8909577
#> [6,] 6770.7283 7.5431189
#> [7,]  383.4853 0.4922556
#> 
#> , , 18
#> 
#>            [,1]      [,2]
#> [1,]   458.3526 0.8196714
#> [2,]   694.0908 0.3697555
#> [3,]  2269.8556 0.2243455
#> [4,]  8516.5534 4.8837338
#> [5,]  7954.2441 5.7638771
#> [6,] 10534.9186 2.4263779
#> [7,]   986.7612 0.5859883
#> 
#> , , 19
#> 
#>            [,1]      [,2]
#> [1,]   397.5957 0.4154699
#> [2,]  1349.2205 0.4148225
#> [3,]  1687.3785 0.4158961
#> [4,]  4276.0501 4.9452117
#> [5,] 10294.5285 3.6754547
#> [6,] 10627.7830 4.4727894
#> [7,]   952.6602 0.5934166
#> 
#> , , 20
#> 
#>           [,1]      [,2]
#> [1,]  393.3346 0.2760420
#> [2,]  384.1460 0.3481614
#> [3,] 1217.7641 0.2962943
#> [4,] 5184.2045 4.5268058
#> [5,] 5799.5294 4.4415456
#> [6,] 8130.1338 3.0177524
#> [7,]  652.0295 0.5041754
#> 
#> , , 21
#> 
#>           [,1]      [,2]
#> [1,]  561.0682 0.3363472
#> [2,]  983.1029 0.3246353
#> [3,] 2157.9652 0.4201016
#> [4,] 4593.6841 4.7677037
#> [5,] 7924.8386 6.8224386
#> [6,] 4470.9985 7.8727590
#> [7,]  534.1828 0.7260771
#> 
#> , , 22
#> 
#>           [,1]      [,2]
#> [1,] 2517.9099 0.5797516
#> [2,]  773.8933 0.8292271
#> [3,]  861.0742 0.3342872
#> [4,] 7672.0336 7.9784010
#> [5,] 5596.2845 7.1362405
#> [6,] 5513.7996 7.8493675
#> [7,]  549.2859 0.8122518
#> 
#> , , 23
#> 
#>            [,1]       [,2]
#> [1,]  1643.3115  0.8708796
#> [2,]   969.6811  0.7144888
#> [3,]  5064.2942  0.2123614
#> [4,] 13957.1028 11.3865425
#> [5,]  9403.1209 11.9984256
#> [6,] 10771.0328  3.8401125
#> [7,]   840.6850  0.7956633
#> 
#> , , 24
#> 
#>            [,1]      [,2]
#> [1,]   914.8762 0.2935686
#> [2,]   833.1669 0.5089236
#> [3,]  1336.2404 0.3374773
#> [4,]  8829.4168 7.8290848
#> [5,] 10018.0146 3.1134120
#> [6,]  9449.5409 4.2853048
#> [7,]  1213.3681 0.8993459
#> 
#> , , 25
#> 
#>            [,1]      [,2]
#> [1,]   515.9322 0.1299283
#> [2,]  2427.3523 0.5973214
#> [3,]  2522.5267 0.5939728
#> [4,]  7586.7735 2.7278649
#> [5,]  7776.3810 6.1024849
#> [6,] 10387.3732 6.2641817
#> [7,]   868.5771 0.5811426
#> 
#> , , 26
#> 
#>            [,1]      [,2]
#> [1,]   801.4223 0.2382957
#> [2,]   893.9664 0.6607982
#> [3,]  1755.5212 0.3777217
#> [4,]  9596.1271 2.5708996
#> [5,]  9229.3241 7.9008253
#> [6,] 11148.3162 6.8789083
#> [7,]   999.4822 0.5756500
#> 
#> , , 27
#> 
#>            [,1]       [,2]
#> [1,]   721.5374  0.5028006
#> [2,]  1678.7567  1.2286244
#> [3,]  2411.0821  0.3635526
#> [4,] 10673.6137  3.5578218
#> [5,] 11408.9208 10.6074907
#> [6,] 15831.3365  7.3847622
#> [7,]  1288.5510  0.8041008
#> 
#> , , 28
#> 
#>           [,1]       [,2]
#> [1,]  1050.606  0.3230047
#> [2,]  1984.044  1.0180681
#> [3,]  1894.465  0.3631354
#> [4,]  8516.310  5.4539439
#> [5,] 12292.544 10.5241325
#> [6,] 14579.247  4.0012289
#> [7,]  1156.177  0.7598395
#> 
#> , , 29
#> 
#>           [,1]      [,2]
#> [1,]  1156.748 0.8906523
#> [2,]  1270.011 0.4107671
#> [3,]  3173.278 0.4436925
#> [4,] 12679.878 4.4379332
#> [5,] 13387.658 8.1095474
#> [6,] 18086.234 5.6104345
#> [7,]  1303.003 0.7815658
#> 
#> , , 30
#> 
#>           [,1]      [,2]
#> [1,]  1542.891 0.2678446
#> [2,]  1614.458 0.1942670
#> [3,]  2470.243 0.5993886
#> [4,]  8783.625 6.1835443
#> [5,] 11107.397 3.3211839
#> [6,] 15009.640 5.6088754
#> [7,]  1051.785 0.6088031
#> 
#> , , 31
#> 
#>           [,1]      [,2]
#> [1,]  1466.861 0.3020464
#> [2,]  1616.037 0.1124356
#> [3,]  1870.437 0.2755623
#> [4,] 13673.579 2.5497200
#> [5,] 13984.524 3.2238205
#> [6,] 13864.614 3.8303941
#> [7,]  1329.290 0.4098447
#> 
#> , , 32
#> 
#>            [,1]      [,2]
#> [1,]   814.6624 0.4877907
#> [2,]  3141.7998 0.3230457
#> [3,]  2426.1521 0.6739687
#> [4,] 15136.0939 4.9905278
#> [5,] 15387.6113 2.2627325
#> [6,] 19577.3633 4.1610787
#> [7,]  1744.9365 0.4043639
#> 
#> , , 33
#> 
#>            [,1]      [,2]
#> [1,]   751.9007 0.2239070
#> [2,]  2005.4108 0.2363223
#> [3,]  2756.7943 0.2059250
#> [4,] 11373.1671 3.8091618
#> [5,] 22215.5850 3.1886471
#> [6,] 24025.0760 3.6879594
#> [7,]  1498.6861 0.4594543
#> 
#> , , 34
#> 
#>           [,1]      [,2]
#> [1,]  1152.070 0.1431601
#> [2,]  1673.127 0.3438668
#> [3,]  6013.034 0.3944328
#> [4,] 13425.466 2.4984291
#> [5,] 25380.654 4.5859524
#> [6,] 24010.886 3.4321278
#> [7,]  1467.240 0.4617677
#> 
#> , , 35
#> 
#>           [,1]      [,2]
#> [1,]  1952.621 0.2594572
#> [2,]  1519.484 0.2442563
#> [3,]  4453.283 0.3848778
#> [4,] 22327.805 2.0983228
#> [5,] 20368.158 3.3583537
#> [6,] 23954.788 3.6325377
#> [7,]  2876.425 0.3477411
#> 
#> , , 36
#> 
#>            [,1]      [,2]
#> [1,]  2324.9866 0.2645104
#> [2,]   893.2765 0.2774154
#> [3,]  1614.4021 0.2331943
#> [4,] 15895.7779 3.9685865
#> [5,] 15818.1894 3.1748940
#> [6,] 21129.1794 3.2455967
#> [7,]  2029.7331 0.3704486
#> 
#> , , 37
#> 
#>           [,1]      [,2]
#> [1,]  3799.704 0.3190264
#> [2,]  1088.661 0.1289828
#> [3,]  2231.897 0.2414682
#> [4,] 14959.199 3.6063193
#> [5,] 14134.134 2.2458908
#> [6,] 13377.731 3.4004961
#> [7,]  1947.207 0.4482749
#> 
#> , , 38
#> 
#>            [,1]      [,2]
#> [1,]  1344.8087 0.2786213
#> [2,]   695.3607 0.1769439
#> [3,]  1016.3373 0.2315718
#> [4,] 16002.4262 3.0032864
#> [5,] 13314.9962 3.8134260
#> [6,] 14604.6453 2.9071110
#> [7,]  1516.9164 0.3323946
#> 
#> , , 39
#> 
#>           [,1]      [,2]
#> [1,]  1404.818 0.4615491
#> [2,]  1529.893 0.2801851
#> [3,]  3121.721 0.3686372
#> [4,] 14198.662 3.9115688
#> [5,] 11035.340 2.2643243
#> [6,] 10888.069 3.4060656
#> [7,]  1352.388 0.4239780
#> 
#> , , 40
#> 
#>           [,1]      [,2]
#> [1,]  793.0958 0.4724866
#> [2,]  918.7896 0.5996540
#> [3,] 1464.3578 0.2833373
#> [4,] 8793.4551 4.5342952
#> [5,] 8574.1761 4.0120452
#> [6,] 8803.1678 3.0898020
#> [7,]  883.5648 0.4498784
#> 
#> , , 41
#> 
#>            [,1]      [,2]
#> [1,]  1080.9296 0.2886915
#> [2,]   366.9526 0.3417955
#> [3,]  3409.8923 0.1690307
#> [4,]  6054.1732 5.7559382
#> [5,]  3838.4063 3.8076111
#> [6,] 10906.3192 2.2695300
#> [7,]   689.7036 0.3498207
#> 
#> , , 42
#> 
#>           [,1]      [,2]
#> [1,]  400.8748 0.2187881
#> [2,]  687.0449 0.2515039
#> [3,]  785.5638 0.1936325
#> [4,] 5315.2748 4.5448009
#> [5,] 3450.0647 4.5359137
#> [6,] 5792.3105 2.4665805
#> [7,]  514.6311 0.3610368
#> 
#> , , 43
#> 
#>           [,1]      [,2]
#> [1,]  571.5845 0.2544676
#> [2,]  701.0700 0.4837699
#> [3,] 1085.2327 0.4732656
#> [4,] 5193.9568 3.7027139
#> [5,] 5589.4382 4.4354992
#> [6,] 3808.8584 4.7172313
#> [7,]  529.8366 0.5194345
#> 
#> , , 44
#> 
#>           [,1]      [,2]
#> [1,] 1115.1142 0.1814791
#> [2,]  790.7998 0.3389597
#> [3,]  559.5150 0.2554835
#> [4,] 6083.9343 3.3896983
#> [5,] 4823.4447 4.7120944
#> [6,] 5635.4658 3.1126228
#> [7,]  478.1135 0.3472903
#> 
#> , , 45
#> 
#>           [,1]      [,2]
#> [1,] 1032.1815 0.1847255
#> [2,]  805.1689 0.1267207
#> [3,] 1766.5499 0.1015188
#> [4,] 3781.4524 2.1478476
#> [5,] 5186.9805 3.6428162
#> [6,] 2974.2585 2.3880469
#> [7,]  558.8671 0.5030632
#> 
#> , , 46
#> 
#>           [,1]      [,2]
#> [1,]  526.1694 0.1352326
#> [2,]  608.1966 0.1151821
#> [3,]  998.2826 0.2671118
#> [4,] 6613.4768 2.1643908
#> [5,] 5645.3536 1.9434002
#> [6,] 9979.7518 2.1229707
#> [7,]  463.6845 0.3949871
#> 
#> , , 47
#> 
#>           [,1]      [,2]
#> [1,]  533.2023 0.2694840
#> [2,]  688.3522 0.2707635
#> [3,]  815.5717 0.2363659
#> [4,] 4298.5921 1.5757145
#> [5,] 5995.0564 2.3014967
#> [6,] 5244.5462 2.7892879
#> [7,]  632.3075 0.2507013
#> 
#> , , 48
#> 
#>           [,1]      [,2]
#> [1,]  305.8581 0.1611802
#> [2,]  971.9886 0.1471728
#> [3,] 1289.7247 0.1982259
#> [4,] 5001.4855 2.7294362
#> [5,] 4522.0902 2.4058268
#> [6,] 5010.8779 2.4885963
#> [7,]  405.5831 0.3017535
#> 
#> , , 49
#> 
#>           [,1]      [,2]
#> [1,]  366.6983 0.2458067
#> [2,]  442.6434 0.2731811
#> [3,] 1279.7973 0.4582342
#> [4,] 3126.1508 2.4026201
#> [5,] 4825.3014 2.7263375
#> [6,] 7613.5924 2.2895829
#> [7,]  469.6351 0.3367025
#> 
#> , , 50
#> 
#>           [,1]      [,2]
#> [1,]  576.8700 0.2739286
#> [2,]  359.7582 0.2839732
#> [3,] 1508.3867 0.2360490
#> [4,] 4010.9777 2.7785865
#> [5,] 4215.1698 3.5701869
#> [6,] 8364.9847 4.2983977
#> [7,]  678.8311 0.3151326
#> 
#> 


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