Learn R Programming

bpvars (version 1.0)

specify_posterior_bvarPANEL: R6 Class Representing PosteriorBVARPANEL

Description

The class PosteriorBVARPANEL contains posterior output and the specification including the last MCMC draw for the Bayesian Panel VAR 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.

Arguments

Public fields

last_draw

an object of class BVARPANEL 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.

Methods


Method new()

Create a new posterior output PosteriorBVARPANEL.

Usage

specify_posterior_bvarPANEL$new(specification_bvarPANEL, posterior_bvarPANEL)

Arguments

specification_bvarPANEL

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

posterior_bvarPANEL

a list containing Bayesian estimation output.

Returns

A posterior output PosteriorBVARPANEL.


Method get_posterior()

Returns a list containing Bayesian estimation output.

Usage

specify_posterior_bvarPANEL$get_posterior()

Examples

specification = specify_bvarPANEL$new(
   data = ilo_dynamic_panel[1:5]
)
posterior       = estimate(specification, 5)
posterior$get_posterior()


Method get_last_draw()

Returns an object of class BVARPANEL 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_bvarPANEL$get_last_draw()

Examples

specification = specify_bvarPANEL$new(
   data = ilo_dynamic_panel[1:5]
)
burn_in        = estimate(specification, 5)
posterior      = estimate(burn_in, 5)


Method clone()

The objects of this class are cloneable with this method.

Usage

specify_posterior_bvarPANEL$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

See Also

specify_bvarPANEL

Examples

Run this code
specification = specify_bvarPANEL$new(
   data = ilo_dynamic_panel[1:5]
)
posterior       = estimate(specification, 5)
class(posterior)


## ------------------------------------------------
## Method `specify_posterior_bvarPANEL$get_posterior`
## ------------------------------------------------

specification = specify_bvarPANEL$new(
   data = ilo_dynamic_panel[1:5]
)
posterior       = estimate(specification, 5)
posterior$get_posterior()


## ------------------------------------------------
## Method `specify_posterior_bvarPANEL$get_last_draw`
## ------------------------------------------------

specification = specify_bvarPANEL$new(
   data = ilo_dynamic_panel[1:5]
)
burn_in        = estimate(specification, 5)
posterior      = estimate(burn_in, 5)

Run the code above in your browser using DataLab