| plot_bubble | R Documentation |
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.
plot_bubble(
x,
diagnostics = NULL,
fit_stat = c("Infit", "Outfit"),
bubble_size = c("SE", "N", "equal"),
facets = NULL,
fit_range = c(0.5, 1.5),
top_n = 60,
main = NULL,
palette = NULL,
draw = TRUE,
preset = c("standard", "publication", "compact")
)
x |
Output from |
diagnostics |
Optional output from |
fit_stat |
Fit statistic for the y-axis: |
bubble_size |
Variable controlling bubble radius: |
facets |
Character vector of facets to include. |
fit_range |
Numeric length-2 vector defining the heuristic fit-review band
shown as a shaded region (default |
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 |
preset |
Visual preset ( |
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.
Invisibly, an object of class mfrm_plot_data.
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.
Fit a model with fit_mfrm().
Compute diagnostics once with diagnose_mfrm().
Call plot_bubble(fit, diagnostics = diag) to inspect the most extreme elements.
diagnose_mfrm, plot_unexpected,
plot_fair_average
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.