
Build a package-native reference review for report completeness
Source:R/api-reports.R
reference_case_review.RdBuild a package-native reference review for report completeness
Usage
reference_case_review(
fit,
diagnostics = NULL,
bias_results = NULL,
reference_profile = c("core", "compatibility"),
include_metrics = TRUE,
top_n_attention = 15L
)Arguments
- fit
Output from
fit_mfrm().- diagnostics
Optional output from
diagnose_mfrm(). If omitted, diagnostics are computed internally withresidual_pca = "none".- bias_results
Optional output from
estimate_bias(). If omitted and at least two facets exist, a 2-way interaction screen is computed internally.- reference_profile
Review profile.
"core"emphasizes package-native report contracts."compatibility"exposes the manual-aligned compatibility layer used byfacets_output_contract_review(branch = "facets").- include_metrics
If
TRUE, run numerical consistency checks in addition to schema coverage checks.- top_n_attention
Number of lowest-coverage components to keep in
attention_items.
Details
This function repackages the output-contract review into package-native terminology so users can review output completeness without needing external manual/table numbering. It reports:
component-level schema coverage
numerical consistency checks for derived report tables
the highest-priority attention items for follow-up
It is a package-output completeness review, not an external validation study.
Use reference_profile = "core" for ordinary mfrmr workflows.
Use reference_profile = "compatibility" only when you explicitly want to
inspect the compatibility layer.
Interpreting output
overall: one-row review summary with schema coverage and metric pass rate.component_summary: per-component coverage summary.attention_items: direct list of components needing review.metric_summary/metric_checks: numerical consistency status.
Examples
# Long-running workflow; run explicitly when needed.
# example("reference_case_review", run.dontrun = TRUE)
if (FALSE) { # \dontrun{
# Saved synthetic JML/RSM analysis of example_core.
# For your own data, fit a model first; see ?fit_mfrm.
example_fit <- readRDS(system.file("examples", "core-jml.rds", package = "mfrmr"))
fit <- example_fit$fit
diag <- example_fit$diagnostics
review <- reference_case_review(fit, diagnostics = diag)
summary(review)
} # }