
Build a manuscript-oriented table bundle from summary() outputs
Source: R/api-reports.R
build_summary_table_bundle.RdBuild a manuscript-oriented table bundle from summary() outputs
Usage
build_summary_table_bundle(
x,
which = NULL,
appendix_preset = NULL,
include_empty = FALSE,
digits = 3,
top_n = 10,
preview_chars = 160
)Arguments
- x
An
mfrm_fit,mfrm_diagnostics,mfrm_precision_review,mfrm_fit_measures,mfrm_facets_fit_review,mfrm_person_fit_indices,mfrm_data_description,mfrm_reporting_checklist,mfrm_apa_outputs,mfrm_design_evaluation,mfrm_signal_detection,mfrm_recovery_simulation,mfrm_recovery_assessment,mfrm_population_prediction,mfrm_facets_run,mfrm_bias,mfrm_anchor_review,mfrm_linking_review,mfrm_misfit_casebook,mfrm_model_choice_review,mfrm_weighting_review,mfrm_unit_prediction, ormfrm_plausible_valuesobject, one of theirsummary()outputs, or a compatible precomputed recovery-evidence summary.- which
Optional character vector selecting a subset of named tables.
- appendix_preset
Optional appendix-oriented table preset:
"all","recommended","compact","methods","results","diagnostics", or"reporting". Cannot be combined withwhich. Section-aware presets keep returned tables whose bundle catalog maps to the requested appendix section.- include_empty
If
TRUE, retain empty tables in the returned bundle.- digits
Digits forwarded when
summary()must be computed from a raw object.- top_n
Row cap forwarded to compact
summary()methods whenxis a raw object.- preview_chars
Character cap forwarded to
summary.mfrm_apa_outputs()whenxis a raw APA-output object.
Value
An object of class mfrm_summary_table_bundle with:
overviewtable_indexplot_indextablesappendix_presetnotessource_classsummary_class
Details
This helper turns the package's compact summary objects into a reproducible
table bundle for manuscript drafting, appendix handoff, or downstream
formatting. It does not replace apa_table(); instead, it provides a
consistent bridge from summary() to named data.frame components that can
later be rendered with apa_table() or exported directly.
The public entry point validates x and the summary-object contract up
front, so malformed summaries fail with a package-level message instead of
falling through to opaque downstream errors.
The function first normalizes x through the corresponding summary()
method when needed, then records a table_index describing every available
table and returns the selected tables in tables. Optional appendix presets
can be applied at bundle-construction time when you want a conservative
manuscript-facing subset before plotting or export.
Supported inputs
fit_mfrm()orsummary(fit)diagnose_mfrm()orsummary(diag)precision_review_report()orsummary(precision_review)fit_measures_table()orsummary(fit_measures)facets_fit_review()orsummary(facets_fit_review)compute_person_fit_indices()orsummary(person_fit)describe_mfrm_data()orsummary(ds)reporting_checklist()orsummary(chk)build_apa_outputs()orsummary(apa)evaluate_mfrm_design()orsummary(sim_eval)evaluate_mfrm_signal_detection()orsummary(sig_eval)evaluate_mfrm_recovery()orsummary(rec)assess_mfrm_recovery()orsummary(rec_assessment)a compatible precomputed recovery-evidence summary
predict_mfrm_population()orsummary(pred)the
structural_design_reviewcomponent of a design or prediction summaryrun_mfrm_facets()orsummary(out)estimate_bias()orsummary(bias)review_mfrm_anchors()orsummary(review)build_linking_review()orsummary(review)build_misfit_casebook()orsummary(casebook)build_model_choice_review()orsummary(review)build_weighting_review()orsummary(review)predict_mfrm_units()orsummary(pred_units)sample_mfrm_plausible_values()orsummary(pv)
Interpreting output
overview: one-row metadata about the source summary and table counts.table_index: table names, dimensions, roles, and manuscript-oriented descriptions.plot_index: which returned tables contain numeric content and which bundle-level plot types can use them directly.tables: nameddata.frameobjects ready for formatting or export.appendix_preset: active appendix subset mode ("none"when not used).notes: short guidance about omitted empty tables or source-level caveats.fit-level caveats use the
analysis_caveatsrole; pre-fit data score-support caveats use thescore_category_caveatsrole. Both roles are classified as diagnostics and stay inrecommendedappendix subsets.recovery-assessment and recovery-validation summaries expose
diagnostic_reporting_notesbeforediagnostic_reviewordiagnostic_oc_summaryso fit/separation caveats can be reported without treating them as direct evidence of parameter recovery.recovery-validation summaries expose
condition_reporting_notesbeforecondition_summaryso GPCM generator stress and sparse score support are not mistaken for recovery-metric failures.precision-review summaries expose
fit_separation_basisso fit, ZSTD, separation/reliability/strata, and QC thresholds remain distinct forms of evidence rather than interchangeable summaries.fit-measure and FACETS fit-review summaries expose df/ZSTD sensitivity tables under precision-review roles, keeping MnSq status, ZSTD standardization, and external FACETS matching distinct in appendix handoffs.
latent-regression fit summaries expose
population_codingin the methods appendix role so categorical levels, contrasts, and encoded columns can be documented with the coefficient table.model-choice-review summaries expose
comparison_table,model_roles,downstream_routes, andreport_templatesso RSM/PCM versus boundedGPCMcomparisons remain tied to their equal-weighting, sensitivity, and reporting-boundary roles.
Typical workflow
Build a compact object with
summary(...).Convert it with
build_summary_table_bundle(...).Use
bundle$tables[[...]]directly, or hand a selected table toapa_table()for formatted manuscript output.If you want a manuscript appendix subset up front, use a preset such as
appendix_preset = "recommended","compact", or"diagnostics".For recovery-assessment or recovery-validation summaries, inspect
bundle$tables$reading_orderfirst when it is available.For recovery-assessment or recovery-validation summaries with retained diagnostics, read
diagnostic_reporting_notesbefore the rawdiagnostic_reviewordiagnostic_oc_summary. Readcondition_reporting_notesbeforecondition_revieworcondition_summarywhen boundedGPCMgenerator stress is part of the plan.
Examples
# \donttest{
toy <- load_mfrmr_data("example_core")
fit <- fit_mfrm(toy, "Person", c("Rater", "Criterion"), "Score",
method = "JML", maxit = 30
)
#> Warning: Optimization convergence review did not produce an inference-ready numerical solution (code = 1, status = iteration_limit). Optimizer reached the iteration limit before the terminal gradient became small enough for review-only acceptance. Inspect the model specification, data support, and starting values. Do not interpret estimates until the review is resolved.
bundle <- build_summary_table_bundle(fit)
bundle$table_index
#> Table Rows Cols Role
#> 1 overview 1 52 run_overview
#> 2 population_overview 1 11 population_basis
#> 5 population_coding 0 6 population_coding
#> 6 facet_overview 2 7 facet_distribution
#> 7 person_overview 1 7 person_distribution
#> 8 step_overview 1 5 category_structure
#> 10 settings_overview 1 18 estimation_settings
#> 11 reporting_map 6 3 reporting_map
#> 12 caveats 0 8 analysis_caveats
#> 13 facet_extremes 8 3 extreme_facet_levels
#> 14 person_high 10 4 extreme_person_high
#> 15 person_low 10 4 extreme_person_low
#> Description
#> 1 One-row model fit, convergence, and information-criteria overview.
#> 2 Population-model basis, posterior basis, and omission review.
#> 5 Latent-regression categorical covariate levels, contrasts, and encoded model-matrix columns.
#> 6 Per-facet spread, range, and level-count summary.
#> 7 Distribution of person measures and posterior SD summaries.
#> 8 Threshold range and monotonicity summary.
#> 10 Estimation settings that affect identification and interpretation.
#> 11 Companion outputs to cite for manuscript-oriented reporting.
#> 12 Structured fit-level caveats such as retained zero-count categories, score-category recoding, and latent-regression population-model warnings.
#> 13 Facet levels with the largest absolute estimates.
#> 14 Highest person measures from the current fit.
#> 15 Lowest person measures from the current fit.
summary(bundle)$role_summary
#> Role Tables TotalRows TotalCols
#> 12 run_overview 1 1 52
#> 11 reporting_map 1 6 3
#> 10 population_coding 1 0 6
#> 9 population_basis 1 1 11
#> 8 person_distribution 1 1 7
#> 7 facet_distribution 1 2 7
#> 6 extreme_person_low 1 10 4
#> 5 extreme_person_high 1 10 4
#> 4 extreme_facet_levels 1 8 3
#> 3 estimation_settings 1 1 18
#> 2 category_structure 1 1 5
#> 1 analysis_caveats 1 0 8
# }