Skip to contents

Return diagnostic checks, observed values, thresholds, and interpretations retained by a gtstats result.

Usage

diagnostics_stats(
  x,
  format = c("table", "tibble"),
  title = "Diagnostics",
  subtitle = NULL,
  view = c("readable", "audit")
)

Arguments

x

A gtstats result.

format

Output format: "table" (default) or "tibble".

title, subtitle

Optional table heading used for format = "table".

view

Either "readable" (the default, plain-language headings) or "audit" (raw diagnostic codes retained by the analysis object).

Value

A tibble or gt_tbl.

Examples

result <- compare_groups(mtcars, variable = vs, group = am)
diagnostics_stats(result)
Diagnostics
Variable Check Result Observed value Reference Interpretation
vs Comparison design independent Independent observations Defined by the study design Independent comparison; confirm independence from the study design.
vs Variance assumption not applicable var_equal = FALSE Applies only to independent parametric continuous comparisons `var_equal` does not alter paired, categorical, ordinal, or rank-based routes.
vs Automatic test selection Chi-square test 5.69 No expected count below 1 and no more than 20% below 5 Independent categorical outcome; expected cell count guidance was met (no expected count below 1 and no more than 20% below 5); selected Pearson chi-square test.
vs Expected cell counts guidance met 5.69 No expected count below 1 and no more than 20% below 5 Fisher's exact test is selected automatically when expected-count guidance is not met.