
Fit the Manuscript-style Regime Integration pGLS
Source:R/regime-integration.R
regime_integration_pgls.RdReproduce 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-compatiblevars_corstable with columnsrate,vars,corrs, andState. Regime IDs must be unique and non-empty.- search
A
bifrost_searchobject containing the mapped regime tree.- tree
Optional SIMMAP-style mapped tree. Ignored when
searchis 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_datacontains atip_countcolumn. Downstream summaries are retained whentip_count >= min_tips; this differs from the strict PCA manuscript filter used byregime_correlation_pca().- ...
Additional arguments passed to
phylolm::phylolm().
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.