Learn R Programming

bpvars (version 1.0)

specify_posterior_bvars: R6 Class Representing PosteriorBVARs

Description

The class PosteriorBVARs 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 BVARs 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 PosteriorBVARs.

Usage

specify_posterior_bvars$new(specification_bvarPANEL, posterior_bvarPANEL)

Arguments

specification_bvarPANEL

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


Method get_posterior()

Returns a list containing Bayesian estimation output.

Usage

specify_posterior_bvars$get_posterior()

Examples

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


Method get_last_draw()

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

Examples

specification = specify_bvars$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_bvars$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

See Also

specify_bvars

Examples

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


## ------------------------------------------------
## Method `specify_posterior_bvars$get_posterior`
## ------------------------------------------------

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


## ------------------------------------------------
## Method `specify_posterior_bvars$get_last_draw`
## ------------------------------------------------

specification = specify_bvars$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