specify_posterior_bsvarSIGN {bsvarSIGNs} | R Documentation |
The class PosteriorBSVARSIGN contains posterior output and the specification including
the last MCMC draw for the Bayesian Structural VAR model with sign and narrative restrictions.
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
.
last_draw
an object of class BSVARSIGN 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 including:
an NxNxS
array B
, an NxKxS
array A
, and a 5xS
matrix hyper
.
new()
Create a new posterior output PosteriorBSVARSIGN.
specify_posterior_bsvarSIGN$new(specification_bsvarSIGN, posterior_bsvarSIGN)
specification_bsvarSIGN
an object of class BSVARSIGN with the last draw of the current MCMC run as the starting value.
posterior_bsvarSIGN
a list containing Bayesian estimation output collected in elements
an NxNxS
array B
, an NxKxS
array A
, and a 5xS
matrix hyper
.
A posterior output PosteriorBSVARSIGN.
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
.
specify_posterior_bsvarSIGN$get_posterior()
data(optimism) specification = specify_bsvarSIGN$new(optimism) set.seed(123) estimate = estimate(specification, 50) estimate$get_posterior()
is_normalised()
Returns TRUE
if the posterior has been normalised using normalise_posterior()
and FALSE
otherwise.
specify_posterior_bsvarSIGN$is_normalised()
data(optimism) specification = specify_bsvarSIGN$new(optimism) set.seed(123) estimate = estimate(specification, 20) # check normalisation status afterwards posterior$is_normalised()
clone()
The objects of this class are cloneable with this method.
specify_posterior_bsvarSIGN$clone(deep = FALSE)
deep
Whether to make a deep clone.
estimate.BSVARSIGN
, specify_bsvarSIGN
# This is a function that is used within estimate()
data(optimism)
specification = specify_bsvarSIGN$new(optimism, p = 4)
set.seed(123)
posterior = estimate(specification, 50)
class(posterior)
## ------------------------------------------------
## Method `specify_posterior_bsvarSIGN$get_posterior`
## ------------------------------------------------
data(optimism)
specification = specify_bsvarSIGN$new(optimism)
set.seed(123)
estimate = estimate(specification, 50)
estimate$get_posterior()
## ------------------------------------------------
## Method `specify_posterior_bsvarSIGN$is_normalised`
## ------------------------------------------------
data(optimism)
specification = specify_bsvarSIGN$new(optimism)
set.seed(123)
estimate = estimate(specification, 20)
# check normalisation status afterwards
posterior$is_normalised()