| dfmpost | R Documentation | 
Produces draws from the posterior distributions of Bayesian dynamic factor models.
dfmpost(object)
| object | an object of class  | 
The function implements the posterior simulation algorithm for Bayesian dynamic factor models.
The implementation follows the description in Chan et al. (2019) and C++ is used to reduce calculation time.
An object of class "dfm".
Chan, J., Koop, G., Poirier, D. J., & Tobias J. L. (2019). Bayesian econometric methods (2nd ed.). Cambridge: Cambridge University Press.
# Load data
data("bem_dfmdata")
# Generate model data
model <- gen_dfm(x = bem_dfmdata, p = 1, n = 1,
                 iterations = 20, burnin = 10)
# Number of iterations and burnin should be much higher.
# Add prior specifications
model <- add_priors(model,
                    lambda = list(v_i = .01),
                    sigma_u = list(shape = 5, rate = 4),
                    a = list(v_i = .01),
                    sigma_v = list(shape = 5, rate = 4))
# Obtain posterior draws
object <- dfmpost(model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.