Skip to contents

Visualize DIC-based model comparison between multiple models (e.g., SPFA vs relaxed).

Usage

plot_model_comparison(..., type = c("bar", "dotplot"), labels = NULL)

Arguments

...

Multiple mlumr_fit objects or mlumr_dic objects to compare.

type

Plot type: "bar" (DIC comparison) or "dotplot" (with effective parameters). Default is "bar".

labels

Character vector. Custom labels for models. Default uses model type.

Value

A ggplot object

Examples

if (FALSE) { # \dontrun{
# Compare SPFA and relaxed models
plot_model_comparison(fit_spfa, fit_relaxed)

# Custom labels
plot_model_comparison(fit_spfa, fit_relaxed,
                      labels = c("Shared Effects", "Treatment-Specific"))

# Dot plot showing pD
plot_model_comparison(fit_spfa, fit_relaxed, type = "dotplot")
} # }