Creates a set of traceplots from the MCMC sample of an object of class "JointAI".

traceplot(object, ...)

# S3 method for mcmc.list
traceplot(object, start = NULL, end = NULL,
thin = NULL, ...)

# S3 method for JointAI
traceplot(object, start = NULL, end = NULL,
thin = NULL, subset = c(analysis_main = TRUE), nrow = NULL,
ncol = NULL, keep_aux = FALSE, use_ggplot = FALSE, warn = TRUE,
mess = TRUE, ...)

## Arguments

object object inheriting from class 'JointAI' Arguments passed on to graphics::matplot ltyvector 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. lwdvector 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. lendvector 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. colvector of colors. Colors are used cyclically. cexvector of character expansion sizes, used cyclically. This works as a multiple of par("cex"). NULL is equivalent to 1.0. bgvector 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. xlimranges of x and y axes, as in plot. ylimranges of x and y axes, as in plot. addlogical. If TRUE, plots are added to current one, using points and lines. verboselogical. If TRUE, write one line of what is done. the first iteration of interest (see window.mcmc) the last iteration of interest (see window.mcmc) thinning interval (see window.mcmc) subset of parameters/variables/nodes (columns in the MCMC sample). Uses the same logic as the argument monitor_params in lm_imp, glm_imp, clm_imp, lme_imp, glme_imp, survreg_imp and coxph_imp. optional number of rows and columns in the plot layout; automatically chosen if unspecified optional number of rows and columns in the plot layout; automatically chosen if unspecified logical; Should constant effects of auxiliary variables be kept in the output? logical; Should ggplot be used instead of the base graphics? logical; should warnings be given? Default is TRUE. Note: this applies only to warnings given directly by JointAI. logical; should messages be given? Default is TRUE. Note: this applies only to messages given directly by JointAI.

summary.JointAI, lme_imp, glm_imp, lm_imp, densplot The vignette Parameter Selection contains some examples how to specify the parameter subset.

## Examples

# fit a JointAI model
mod <- lm_imp(y~C1 + C2 + M2, data = wideDF, n.iter = 100)#> This is new software. Please report any bugs to the package maintainer.

# Example 1: simple traceplot
traceplot(mod)

# Example 2: ggplot version of traceplot
traceplot(mod, use_ggplot = TRUE)

# Example 5: changing how the ggplot version looks (using standard ggplot syntax)
library(ggplot2)

traceplot(mod, use_ggplot = TRUE) +
theme(legend.position = 'botto') +
xlab('iteration') +
ylab('value') +
scale_color_discrete(name = 'chain')