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 the random effects, and the variances and covariances of the residuals, respectively.
In this context, "beta2"
refers to the fixed effects for target variables at level 2 and is only used when a two-part model was specified in (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:
EAP
:
Expected value a posteriori (i.e., the mean of the parameter chain)
MAP
:
Mode a posteriori (i.e., the mode of the parameter chain)
SD
:
Standard deviation of the parameter chain
2.5%
:
The 2.5% quantile of parameter values
97.5%
:
The 97.5% quantile of parameter values
Rhat
:
Estimated potential scale reduction factor (\(\hat{R}\))
ACF-k
:
Smoothed autocorrelation at lag \(k\), where \(k\) is the number of iterations between imputations (see summary.mitml
)
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 segments 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 computes 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.
If trace = "all"
, the full chain is displayed with emphasis on the imputation phase, and the posterior summary is calculated based on only the iterations after burn-in (as recommended).
If trace = "burnin"
, the posterior summary and the trace plots are calculated based on only the burn-on interations, which is generally not sufficient to establish convergence and should be used with caution.