| id_post_pred | R Documentation |
This function is a generic that is used to match the functions used with bayesplot::ppc_bars() to calculate
the posterior predictive distribution of the data given the model.
id_post_pred(object, ...)
object |
A fitted |
... |
All other parameters passed on to the underlying function. |
posterior_predict methods should return a D by N
matrix, where D is the number of draws from the posterior predictive
distribution and N is the number of data points being predicted per
draw.
An object of class id_pred_obj (a list of matrices of posterior-predicted draws, one
per model type). If type="log_lik", a draws-by-observations matrix of class
log_lik with a chain_order attribute for use with derive_chain.
sim <- id_sim_gen()
est <- id_estimate(sim, model_type=1, fixtype='vb_full',
use_method="pathfinder", nchains=2, ncores=2)
ppc <- id_post_pred(est, draws=50)
ll <- id_post_pred(est, type='log_lik')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.