Simulate from conjugate N-IW posterior distribution
bvar_conj_simulate(v_post, Omega_post_root, S_post, Phi_post, verbose = FALSE, keep = 10)
v_post | posterior nu, scalar |
---|---|
Omega_post_root | [k x k] 'root' of Omega posterior matrix |
S_post | [m x m] posterior scale matrix for noise covariance |
Phi_post | [k x m] posterior expected values for coefs |
verbose | TRUE will show some debugging messages, FALSE by default |
keep | number of simulations |
coda object with simulations
Simulate from conjugate N-IW posterior distribution
data(Yraw) dummy <- bvar_conj_lambda2dummy(Yraw, p = 2) hyper <- bvar_conj_dummy2hyper(dummy$Y_cniw, dummy$X_cniw) # these are priors but just for testing let's pretend that they are posteriors post_sample <- bvar_conj_simulate(v_post = 10, hyper$Omega_root, hyper$S, hyper$Phi)