Produces a Rasch-convention bubble chart where each element is a circle positioned at its measure estimate (x) and fit mean-square (y). Bubble radius reflects approximate measurement precision or sample size.
Arguments
- x
Output from
fit_mfrmordiagnose_mfrm.- diagnostics
Optional output from
diagnose_mfrmwhenxis anmfrm_fitobject. If omitted, diagnostics are computed automatically.- fit_stat
Fit statistic for the y-axis:
"Infit"(default) or"Outfit".- bubble_size
Variable controlling bubble radius:
"SE"(default),"N"(observation count), or"equal"(uniform size).- facets
Character vector of facets to include.
NULL(default) includes all non-person facets.- fit_range
Numeric length-2 vector defining the heuristic fit-review band shown as a shaded region (default
c(0.5, 1.5)).- top_n
Maximum number of elements to plot (default 60).
- main
Optional custom plot title.
- palette
Optional named colour vector keyed by facet name.
- draw
If
TRUE(default), render the plot using base graphics.- preset
Visual preset (
"standard","publication", or"compact").
Details
When x is an mfrm_fit object and diagnostics is omitted,
the function computes diagnostics internally via diagnose_mfrm().
For repeated plotting in the same workflow, passing a precomputed diagnostics
object avoids that extra work.
The x-axis shows element measure estimates on the logit scale
(one logit = one unit change in log-odds of responding in a higher
category). The y-axis shows the selected fit mean-square statistic.
A shaded band between fit_range[1] and fit_range[2]
highlights a common heuristic review range.
Bubble radius options:
"SE": inversely proportional to standard error—larger circles indicate more precisely estimated elements under the current SE approximation."N": proportional to observation count—larger circles indicate elements with more data."equal": uniform size, useful when SE or N differences distract from the fit pattern.
Person estimates are excluded by default because they typically outnumber facet elements and obscure the display.
Interpreting the plot
Points near the horizontal reference line at 1.0 are closer to model expectation on the selected MnSq scale. Points above 1.5 suggest underfit relative to common review heuristics; these elements may have inconsistent scoring. Points below 0.5 suggest overfit relative to common review heuristics; these may indicate redundancy or restricted range. Points are colored by facet for easy identification.
Typical workflow
Fit a model with
fit_mfrm().Compute diagnostics once with
diagnose_mfrm().Call
plot_bubble(fit, diagnostics = diag)to inspect the most extreme elements.
Examples
toy <- load_mfrmr_data("example_core")
fit <- fit_mfrm(toy, "Person", c("Rater", "Criterion"), "Score",
method = "JML", model = "RSM", maxit = 25)
diag <- diagnose_mfrm(fit, residual_pca = "none")
plot_bubble(fit, diagnostics = diag, draw = FALSE)