The plot
method generates a series of plots for the parameters of the imputation model which can be used for diagnostic purposes.
In addition, a short summary of the parameter chain is displayed.
Setting print
to "beta"
, "beta2"
, "psi"
and "sigma"
will plot the fixed effects, the variances and covariances of random effects, and the variances and covariances of residuals, respectively.
Here, "beta2"
refers to the fixed effects for target variables at level 2 and is only used when imputations were carried out using a two-level model (jomoImpute
).
Each plotting window contains a trace plot (upper left), an autocorrelation plot (lower left), a kernel density approximation of the posterior distribution (upper right), and a posterior summary (lower right).
The summary includes the following quantities:
The trace
and smooth
arguments can be used to influence how the trace plot is drawn and what part of the chain should be used for it.
The thin
argument can be used for thinning the chain before plotting, in which case the number of data points is reduced in the trace plot, and the autocorrelation is calculated up to lag $k/$thin
(see above).
The n.Rhat
argument controls the number of sequences that are used for calculating the potential scale reduction factor ($\hat{R}$) in each plot (see summary.mitml
).
Further aguments to the graphics device are supplied using the dev.args
argument.
The plot
function calculates and displays diagnostic information primarily for the imputation phase (i.e., for iterations after burn-in).
This is the default in the plot
function and the recommended method for most users.
However, note that, when overriding the default using trace="burnin"
, the posterior summary and the trace plots do not convey the necessary information to establish convergence.
When trace="all"
, the full chain is displayed with emphasis on the imputation phase, and the posterior summary is calculated based only on iterations after burn-in as recommended.