mcmcplot {remiod} | R Documentation |
Visualizing the posterior sample Creates a set of plots for visually evaluating convergence and mixing of the chains from the MCMC sample of an object of class 'remiod'.
Description
Visualizing the posterior sample Creates a set of plots for visually evaluating convergence and mixing of the chains from the MCMC sample of an object of class 'remiod'.
Usage
mcmcplot(object, what = c("trace", "density"), subset = c(analysis_main =
TRUE), outcome = NULL, mi.setting = NULL, nrow = NULL, ncol = NULL,
use_ggplot = TRUE, mess = TRUE, warn = FALSE, ...)
Arguments
object |
an object inheriting from class 'remoid' |
what |
select either trace or density plots from MCMC samples |
subset |
subset of parameters/variables/nodes (columns in the MCMC
sample). Follows the same principle as the argument
|
outcome |
optional; vector identifying a subset of sub-models included in the output, either by specifying their indices (using the order used in the list of model formulas), or their names (LHS of the respective model formula as character string) |
mi.setting |
a list of arguments for extracting MI data set, which
will be used to update the one in |
nrow |
optional; number of rows in the plot layout; automatically chosen if unspecified |
ncol |
optional; number of columns in the plot layout; automatically chosen if unspecified |
use_ggplot |
logical; Should ggplot be used instead of the base graphics? |
mess |
logical; should messages be given? Default is
|
warn |
logical; should warnings be given? Default is
|
... |
Arguments passed on to
|
Value
plots of traces or densities of MCMC samples for selected parameters in imputation models.
Examples
# data(schizow)
test = remiod(formula = y6 ~ tx + y0 + y1 + y3, data = schizow,
trtvar = 'tx', algorithm = 'jags', method="MAR",
ord_cov_dummy = FALSE, n.adapt = 10, n.chains = 1,
n.iter = 10, thin = 2, warn = FALSE, seed = 1234)
p1 = mcmcplot(object=test, what="trace")