Skip to contents

Apply summarize_regime_covariances() to each element returned by fit_regime_covariance_runs(). This mirrors the manuscript generateVarsCorsList() step while keeping rate matching, tip counts, and high-correlation filtering explicit and reusable.

Usage

summarize_regime_covariance_runs(
  x,
  searches = NULL,
  rates = NULL,
  tree = NULL,
  tip_counts = NULL,
  regime_ages = NULL,
  fisher_boundary = c("NA", "error"),
  remove_high_corr = FALSE,
  corr_threshold = 0.95
)

Arguments

x

Named list of regime_covariances objects, usually from fit_regime_covariance_runs(). Missing or blank names are generated and names must be unique after normalization.

searches

Optional named list of corresponding bifrost_search objects. Run names are matched to x.

rates

Optional named list of regime-rate vectors, or one named rate vector to reuse for every run.

tree, tip_counts, regime_ages

Optional named lists of per-run values, or a single value to reuse for every run.

fisher_boundary

How to handle correlations with abs(r) >= 1, where Fisher-Z is undefined. "NA" returns NA for those regimes; "error" stops with an error.

remove_high_corr

Logical; if TRUE, drop rows whose mean absolute correlation exceeds corr_threshold. This reproduces the manuscript generateVarsCorsList(remove_high_corr = TRUE, corr_threshold = 0.95) filtering step.

corr_threshold

Correlation threshold used when remove_high_corr is TRUE.

Value

A named list of summary data frames with class regime_covariance_run_summaries.