Internal helper that standardizes bootstrap input supplied to
calculate_bootstrap_ci() and handles early dispatch for boot objects.
It contains no statistical logic itself, but controls workflow routing.
Usage
process_boot_input(
bootstrap_results,
grouping_var,
type,
conf,
h,
hinv,
no_bias,
boot_args
)Arguments
- bootstrap_results
A dataframe with bootstrap replicates, a single
bootobject, or a list ofbootobjects.- grouping_var
Optional character vector of grouping variables used to identify indicators or strata.
- type
Character vector specifying the type(s) of confidence interval to compute (e.g.
"perc","bca","norm","basic").- conf
Numeric confidence level between 0 and 1.
- h
Optional transformation function applied before CI calculation.
- hinv
Optional inverse transformation function.
- no_bias
Logical scalar. If
TRUE, bias correction is skipped andbootobjects are converted to a dataframe. IfFALSE, confidence intervals are computed directly from thebootobjects.- boot_args
Optional list of additional arguments passed to
boot::boot.ci().
Value
A list with two elements:
data: A dataframe of bootstrap replicates, orNULLif confidence intervals were computed directlyresult: A dataframe of confidence intervals, orNULLif the dataframe workflow should continue.
Details
The function supports three input modes:
- Data frame input
Returned unchanged and passed on to the dataframe-based CI workflow.
bootinput withno_bias = TRUEbootobjects are converted to a dataframe of bootstrap replicates and passed on to the dataframe-based CI workflow.bootinput withno_bias = FALSEConfidence intervals are computed directly using
boot::boot.ci()logic and returned immediately.
See also
Other indicator_uncertainty_helper:
boot_list_to_dataframe(),
bootstrap_cube_raw(),
calculate_boot_ci_from_boot(),
derive_bootstrap_method(),
resolve_bootstrap_method()
