Applies the standard "what needs a human look" filters to the output of
stack_checks and returns only the rows that failed. Elements
absent from checks are skipped, so the same call works whether the
pipeline ran check_attrition, an
attrition_lasso element from
estimatrTools::check_attrition_lasso, or neither.
Arguments
- checks
A named list of stacked check tibbles, as returned by
stack_checks.- alpha
Rejection threshold for the balance and attrition filters (default
0.05).
Value
An object of class "excheckr_report": a named list of
tibbles holding only the failing rows, with an alpha attribute.
Elements with nothing to report are present but empty. Has a
print method that shows the counts.
Details
The filters are:
- out_of_bounds
yboundsrows wherein_boundsisFALSE: an outcome outside the expected [0, 1] range.- missing_no_nona
missingnessrows with missing values and no imputed companion column: covariates that will silently drop rows from every adjusted model.- nona_still_missing
missingnessrows whose imputed companion column still containsNA: the imputation did not take.- balance_joint
balance_jointrows withp_valueat or belowalpha. A singlebalanceelement produced bycheck_balance(flatten = TRUE)is split on itstestcolumn and handled the same way.- balance_covariate
balance_covariaterows withp_valueat or belowalpha. Expect roughlyalphaof these to fail by chance; usesummarize_check_pvaluesto judge whether there are more than chance would give.- attrition
attritionorattrition_lassorows flagged atalpha. When the element carries a logicalflagcolumn, that column is used instead andalphais ignored, because the producer already applied a threshold of its own.
See also
Other across-study summaries:
plot_check_pvalues(),
stack_checks(),
summarize_check_pvalues()
Examples
checks <- list(
ybounds = data.frame(study_id = c("a", "b"), variable = "Y_x",
min = c(0, -1), max = c(1, 3),
in_bounds = c(TRUE, FALSE)),
balance_joint = data.frame(study_id = c("a", "b"), p_value = c(0.4, 0.01))
)
report_checks(checks)
#> excheckr triage report (alpha = 0.05)
#> 1 outcomes outside [0, 1]
#> 1 joint balance tests flagged
#> Inspect an element with report$<name>.