View source: R/api-plotting-extras.R
| plot_person_fit | R Documentation |
Per-person diagnostic bubble plot inspired by FACETS Table 6 / KIDMAP
summaries. Each bubble represents one person at the intersection of
Infit (x) and Outfit (y), sized by total observations and coloured by
the standard 0.5/1.5 fit envelope: green when both Infit and Outfit
fall in [lower, upper], amber when one statistic is outside, red
when both are outside. Set fit_index = "loglik" for a ranked view of
the report-ready lz_star / lz index instead.
plot_person_fit(
fit,
diagnostics = NULL,
lower = 0.5,
upper = 1.5,
top_n_label = 12L,
preset = c("standard", "publication", "compact", "monochrome"),
draw = TRUE,
fit_index = c("meansquare", "loglik")
)
fit |
An |
diagnostics |
Optional |
lower |
Lower fit threshold (default |
upper |
Upper fit threshold (default |
top_n_label |
Maximum number of persons whose label is drawn.
The default mean-square view uses largest |
preset |
Visual preset, including |
draw |
If |
fit_index |
Plot focus. |
An mfrm_plot_data object whose reusable plot data include
data with one row per person, plot_long for custom R graphics,
person_fit_indices from compute_person_fit_indices(), and compact
flag/status summaries.
The default 0.5-1.5 envelope follows Linacre (2002) Rasch
Measurement Transactions. Persons in the green centre are
fit-acceptable; amber and red corners are candidates for misfit
review (overfit / underfit) using
unexpected_response_table() for follow-up.
diagnose_mfrm(), unexpected_response_table(),
build_misfit_casebook().
toy <- load_mfrmr_data("example_core")
fit <- fit_mfrm(toy, "Person", c("Rater", "Criterion"), "Score",
method = "JML", maxit = 30)
p <- plot_person_fit(fit, draw = FALSE)
head(p$data$data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.