Skip to contents

Reproduce the representative pGLS test used in the post-hoc integration analysis: log regime rate is modeled as a function of log post-hoc mean variance and Fisher-Z transformed mean absolute trait correlation on a collapsed regime phylogeny.

Usage

regime_integration_pgls(
  summary_data,
  search = NULL,
  tree = NULL,
  model = "BM",
  min_tips = NULL,
  ...
)

Arguments

summary_data

A data frame from summarize_regime_covariances() or a manuscript-compatible vars_cors table with columns rate, vars, corrs, and State. Regime IDs must be unique and non-empty.

A bifrost_search object containing the mapped regime tree.

tree

Optional SIMMAP-style mapped tree. Ignored when search is supplied.

model

Evolutionary model passed to phylolm::phylolm(). Defaults to "BM", matching the manuscript.

min_tips

Optional minimum tip count for downstream inclusion when summary_data contains a tip_count column. Downstream summaries are retained when tip_count >= min_tips; this differs from the strict PCA manuscript filter used by regime_correlation_pca().

...

Additional arguments passed to phylolm::phylolm().

Value

A phylolm fit.

Details

The collapse step follows the manuscript implementation: a monophyletic regime is represented by one collapsed tip, whereas all tips assigned to a nonmonophyletic regime are removed. When removals occur, the function emits one warning listing every dropped regime ID. The collapse stops if regime relabeling would create duplicated output tip labels.