This vignette is a compact map of the main base-R diagnostics in
mfrmr. It is organized around four practical questions:
All examples use packaged data and
preset = "publication" so the same code is suitable for
manuscript-oriented graphics.
library(mfrmr)
toy <- load_mfrmr_data("example_core")
fit <- fit_mfrm(
toy,
person = "Person",
facets = c("Rater", "Criterion"),
score = "Score",
method = "JML",
model = "RSM",
maxit = 20
)
#> Warning: Optimizer did not fully converge (code = 1). Consider increasing maxit
#> (current: 20) or relaxing reltol (current: 1e-06).
diag <- diagnose_mfrm(fit, residual_pca = "none")Use the Wright map first when you want one shared logit view of persons, facet levels, and step thresholds.
Interpretation:
Next, use the pathway map when you want to see how expected scores progress across theta.
Interpretation:
Unexpected-response screening is useful for case-level review.
plot_unexpected(
fit,
diagnostics = diag,
abs_z_min = 1.5,
prob_max = 0.4,
plot_type = "scatter",
preset = "publication"
)Interpretation:
Displacement focuses on level movement rather than individual responses.
plot_displacement(
fit,
diagnostics = diag,
anchored_only = FALSE,
plot_type = "lollipop",
preset = "publication"
)Interpretation:
When the design may be incomplete or spread across subsets, inspect the coverage matrix before interpreting cross-subset contrasts.
sc <- subset_connectivity_report(fit, diagnostics = diag)
plot(sc, type = "design_matrix", preset = "publication")Interpretation:
If you are working across administrations, follow up with anchor-drift plots:
Residual PCA is a follow-up layer after the main fit screen.
diag_pca <- diagnose_mfrm(fit, residual_pca = "both", pca_max_factors = 4)
pca <- analyze_residual_pca(diag_pca, mode = "both")
plot_residual_pca(pca, mode = "overall", plot_type = "scree", preset = "publication")Interpretation:
For interaction screening, use the packaged bias example.
bias_df <- load_mfrmr_data("example_bias")
fit_bias <- fit_mfrm(
bias_df,
person = "Person",
facets = c("Rater", "Criterion"),
score = "Score",
method = "MML",
model = "RSM",
quad_points = 7
)
diag_bias <- diagnose_mfrm(fit_bias, residual_pca = "none")
bias <- estimate_bias(fit_bias, diag_bias, facet_a = "Rater", facet_b = "Criterion")
plot_bias_interaction(
bias,
plot = "facet_profile",
preset = "publication"
)Interpretation:
For a compact visual workflow:
plot_qc_dashboard() for one-page triage.plot_unexpected(), plot_displacement(),
and plot_interrater_agreement() for local follow-up.plot(fit, type = "wright") and
plot(fit, type = "pathway") for targeting and scale
interpretation.plot_residual_pca() and
plot_bias_interaction() for deeper structural review.