R/mcmcplot.R
mcmcplot.Rd
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'.
an object inheriting from class 'remoid'
select either trace or density plots from MCMC samples
subset of parameters/variables/nodes (columns in the MCMC
sample). Follows the same principle as the argument
monitor_params
in
*_imp
.
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)
a list of arguments for extracting MI data set, which
will be used to update the one in remoid
object.
Default is NULL, meaning no update to the mi.setting
in remoid
object.
optional; number of rows in the plot layout; automatically chosen if unspecified
optional; number of columns in the plot layout; automatically chosen if unspecified
logical; Should ggplot be used instead of the base graphics?
logical; should messages be given? Default is
TRUE
.
logical; should warnings be given? Default is
TRUE
.
Arguments passed on to graphics::matplot
lty
vector of line types, widths, and end styles. The first element is for the first column, the second element for the second column, etc., even if lines are not plotted for all columns. Line types will be used cyclically until all plots are drawn.
lwd
vector of line types, widths, and end styles. The first element is for the first column, the second element for the second column, etc., even if lines are not plotted for all columns. Line types will be used cyclically until all plots are drawn.
lend
vector of line types, widths, and end styles. The first element is for the first column, the second element for the second column, etc., even if lines are not plotted for all columns. Line types will be used cyclically until all plots are drawn.
col
vector of colors. Colors are used cyclically.
cex
vector of character expansion sizes, used cyclically.
This works as a multiple of par("cex")
. NULL
is
equivalent to 1.0
.
bg
vector of background (fill) colors for the open plot
symbols given by pch = 21:25
as in points
. The
default NA
corresponds to the one of the underlying function
plot.xy
.
add
logical. If TRUE
, plots are added to current one,
using points
and lines
.
verbose
logical. If TRUE
, write one line of what is
done.
plots of traces or densities of MCMC samples for selected parameters in imputation models.
# \donttest{
# 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)
#> NOTE: Stopping adaptation
#>
#>
p1 = mcmcplot(object=test, what="trace")
# }