
Prepare bootstrap and confidence interval parameters for an indicator
Source:R/prepare_indicator_bootstrap.R
prepare_indicator_bootstrap.RdThis function prepares the argument lists for dubicube::bootstrap_cube()
and dubicube::calculate_bootstrap_ci() based on the indicator definition.
Behaviour (grouping, bootstrap method, transformations, bias correction)
is fully controlled by a rule book keyed on indicator$div_type.
Arguments
- indicator
A list describing the indicator. Must contain at least
div_typeandraw_data.- num_bootstrap
Integer. Number of bootstrap samples.
- ci_type
Character. Type of confidence interval.
- seed
Optional integer. Random seed for bootstrapping. (Default: 123)
- trans
Optional transformation function applied to the statistic. Will be overridden if specified by the indicator rule book.
- inv_trans
Optional inverse transformation function. Will be overridden if specified by the indicator rule book.
- confidence_level
Numeric between 0 and 1. Confidence level.
- expected_years
(Optional) Vector of years expected in the output. Used to ensure consistent data frame structure during bootstrapping.
- boot_args
Named list of additional arguments passed to
bootstrap_cube(), overriding defaults.- ci_args
Named list of additional arguments passed to
calculate_bootstrap_ci(), overriding defaults.