Learn R Programming

fb4package (version 2.0.0)

fit_fb4_bootstrap: Fit FB4 model using bootstrap estimation with parallel option

Description

Coordinates the bootstrap fitting process: runs the resampling loop via bootstrap_p_values, computes summary statistics and confidence intervals, and runs a final detailed simulation with the mean p_value.

Usage

fit_fb4_bootstrap(
  final_weights,
  processed_simulation_data,
  n_bootstrap = 1000,
  oxycal = 13560,
  confidence_level = 0.95,
  sample_size = NULL,
  compute_percentiles = TRUE,
  parallel = FALSE,
  n_cores = NULL,
  upper_p = 1,
  verbose = FALSE,
  store_predicted_weights = TRUE
)

Value

List with bootstrap fitting results including consumption and predicted weights

Arguments

final_weights

Vector of final observed weights

processed_simulation_data

Complete processed simulation data (contains initial_weight)

n_bootstrap

Number of bootstrap iterations, default 1000

oxycal

Oxycalorific coefficient (J/g O2), default 13560

confidence_level

Confidence level for intervals, default 0.95

sample_size

Sample size for each bootstrap iteration (NULL = same as original)

compute_percentiles

Whether to compute additional percentiles, default TRUE

parallel

Whether to use parallel processing, default FALSE

n_cores

Number of cores for parallel processing (NULL = auto-detect)

verbose

Whether to show progress messages, default FALSE

store_predicted_weights

Whether to store predicted final weights, default TRUE