| cross_corr | R Documentation |
These functions compute the cross-correlations of the MCMC samples in an
JointAI object via coda::crosscorr() and plot them using either the
corrplot package or coda::crosscorr.plot().
cross_corr(object, outcome = 1L, start = NULL, end = NULL, thin = NULL)
cross_corr_plot(object, outcome = 1L, start = NULL, end = NULL,
thin = NULL, type = "corrplot")
object |
an object of class JointAI |
outcome |
integer; index of the outcome model for which the correlations should be plotted |
start |
the first iteration of interest
(see |
end |
the last iteration of interest
(see |
thin |
thinning interval (integer; see |
type |
character; type of plot to be produced. Either "corrplot" (default) or "coda". |
a matrix (or a plot)
fit <- lm_imp(y ~ C1 + C2 + B2, data = wideDF, n.iter = 200)
cross_corr(fit)
cross_corr_plot(fit, type = "coda")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.