Skip to contents

Displays the posterior mean density of the Dirichlet Process mixture with pointwise credible bands. Requires a pre-computed dpmirt_dp_density object (computed automatically by dpmirt or manually via dpmirt_dp_density). Requires ggplot2.

Usage

dpmirt_plot_dp_density(fit, ...)

Arguments

fit

A dpmirt_fit object with prior = "dpm" and a computed DP density.

...

Currently unused.

Value

A ggplot object.

Details

For 2PL/3PL IRT and SI parameterizations, transformed-scale DP density reconstruction currently uses the same location-shift contract as dpmirt_dp_density. Treat these plots as diagnostic summaries; Rasch/location-shift settings are the most directly interpretable.

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_dp_density(fit)
} # }