Skip to contents

For DPM models, displays the trace and histogram of the number of active clusters across MCMC iterations. Stable oscillation is a useful first-pass visual mixing check. Requires ggplot2.

Usage

dpmirt_plot_clusters(fit, ...)

Arguments

fit

A dpmirt_fit object with prior = "dpm".

...

Currently unused.

Value

A ggplot object.

Examples

if (FALSE) { # \dontrun{
sim <- dpmirt_simulate(200, 20, model = "rasch",
                       latent_shape = "bimodal", seed = 42)
fit <- dpmirt(sim$response, model = "rasch", prior = "dpm",
              niter = 10000, nburnin = 3000, seed = 123)
dpmirt_plot_clusters(fit)
} # }