Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

thin_posterior.bvar

Thinning Posterior Draws


Description

Thins the MCMC posterior draws in an object of class "bvar" or "bvec".

Usage

## S3 method for class 'bvar'
thin_posterior(x, thin = 10)

Arguments

x

an object of class "bvar".

thin

an integer specifying the thinning interval between successive values of posterior draws.

Value

An object of class "bvar".

Examples

# Load data
data("e1")
e1 <- diff(log(e1)) * 100

# Obtain data matrices
model <- gen_var(e1, p = 2, deterministic = 2,
                 iterations = 100, burnin = 10)
# Chosen number of iterations and burn-in draws should be much higher.

# Add prior specifications
model <- add_priors(model)

# Obtain posterior draws
object <- draw_posterior(model)

object <- thin_posterior(object)

bvartools

Bayesian Inference of Vector Autoregressive Models

v0.2.0
GPL (>= 2)
Authors
Franz X. Mohr [aut, cre]
Initial release
2021-04-25

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.