Re-summarise a finished bootstrap run

Description

Recompute the statistics of a bootstrap run from its raw_results.csv under a different set of exclusion criteria - PsN’s -summarize. Refits nothing: the estimates are already on disk, and so are the termination diagnostics the filters read, so relaxing (say) skip_minimization_terminated is a re-read rather than a re-run.

Usage

ferx_bootstrap_summarize(
  directory,
  skip_minimization_terminated = TRUE,
  skip_estimate_near_boundary = TRUE,
  skip_covariance_step_terminated = FALSE,
  skip_with_covstep_warnings = FALSE,
  ci = 95
)

Arguments

  • directory: Path to a finished bootstrap run directory - one containing raw_results.csv.
  • skip_minimization_terminated: Exclude replicates whose minimization terminated. Default TRUE (PsN’s default).
  • skip_estimate_near_boundary: Exclude replicates whose estimate sits on a boundary. Default TRUE (PsN’s default).
  • skip_covariance_step_terminated, skip_with_covstep_warnings: Exclude replicates on the covariance step’s outcome. Both default FALSE, and both require keep_covariance = TRUE - asking for one without it is an error rather than a silently dropped filter.
  • ci: Two-sided confidence level, in percent. Default 95.

Details

This is the recovery path for a run where too many replicates were filtered out to resolve a percentile interval. It rewrites bootstrap_results.csvand bootstrap_diagnostics.csv in directory in place; the per-replicate files the original run wrote are still valid and are left alone. Needs a run that was given a directory. [ferx_bootstrap](ferx_bootstrap.qmd) with the default directory = NULL computes in memory and writes nothing, so there is nothing to re-summarise.

Seealso

[ferx_bootstrap](ferx_bootstrap.qmd)Other fitting: [ferx_bootstrap](ferx_bootstrap.qmd), [ferx_check_init](ferx_check_init.qmd), [ferx_collect](ferx_collect.qmd), [ferx_covariance](ferx_covariance.qmd), [ferx_fit](ferx_fit.qmd), [ferx_inits_from_nca](ferx_inits_from_nca.qmd), [ferx_sir](ferx_sir.qmd), [ferx_stop](ferx_stop.qmd), [print.ferx_job](ferx_fit_async.qmd)

Concept

fitting

Value

An object of class ferx_bootstrap with $parameters, $diagnostics, $raw (read back from raw_results.csv), $samples, $n_completed, $n_included, $confidence_level and $directory. $delta_ofv is populated when the original run wrote a delta_ofv.csv. $model, $data and $seed are not set: a finished run directory does not record the model path, the data path or the seed, so the printed header omits those lines.

Examples

bs <- ferx_bootstrap(ferx_example("warfarin")$model, samples = 200,
                     directory = "warfarin-bootstrap")

# Keep the boundary cases after all, without refitting
relaxed <- ferx_bootstrap_summarize("warfarin-bootstrap",
                                    skip_estimate_near_boundary = FALSE)
relaxed$parameters