[Paper Review] Fast likelihood evaluation for multivariate phylogenetic comparative methods: the PCMBase R package
The PCMBase R package enables fast, linear-time likelihood evaluation for multivariate phylogenetic comparative methods by efficiently computing multivariate normal likelihoods using a pruning algorithm. It supports diverse models—including multivariate Ornstein–Uhlenbeck and punctuated equilibrium processes—on general tree types, handles missing data and non-existing traits, and scales to large trees with thousands of tips.
We introduce an R package, PCMBase, to rapidly calculate the likelihood for multivariate phylogenetic comparative methods. The package is not specific to particular models but offers the user the functionality to very easily implement a wide range of models where the transition along a branch is multivariate normal. We demonstrate the package's possibilities on the now standard, multitrait Ornstein-Uhlenbeck process as well as the novel multivariate punctuated equilibrium model. The package can handle trees of various types (e.g. ultrametric, nonultrametric, polytomies, e.t.c.), as well as measurement error, missing measurements or non-existing traits for some of the species in the tree.
Motivation & Objective
- To develop a computationally efficient framework for likelihood evaluation in multivariate phylogenetic comparative methods.
- To support a broad class of models where trait transitions are multivariate normal, including those with piecewise-constant drift and diffusion matrices.
- To handle complex data structures such as non-ultrametric trees, polytomies, measurement error, and missing or non-existing traits.
- To enable scalable likelihood computation for models with multiple evolutionary regimes on a single tree, including mixed-type models.
- To provide a flexible, extensible computational engine for researchers to implement custom evolutionary models with minimal coding overhead.
Proposed method
- Uses a pruning algorithm that computes likelihood contributions recursively from the tips to the root, avoiding explicit construction of the full variance-covariance matrix.
- Employs a linear-time algorithm based on the 3-point structure of the variance-covariance matrix, ensuring O(n) complexity with respect to the number of tips.
- Applies matrix transformations and recursive updates to compute mean vectors and covariance matrices along branches, even for non-ultrametric trees.
- Distinguishes between unobserved traits (NA) and non-existing traits (NaN), integrating over unobserved traits and adjusting dimensionality for non-existing ones.
- Implements numerical safeguards: detects computationally singular variance-covariance matrices on very short branches and allows skipping such branches via user-defined thresholds.
- Supports models in the $\mathcal{G}_{LInv}$-family, where the inverse of the variance-covariance matrix is linearly dependent on the tree structure, enabling efficient likelihood evaluation.
Experimental results
Research questions
- RQ1Can a general-purpose R package be developed to enable fast likelihood evaluation for multivariate phylogenetic models across diverse tree and data structures?
- RQ2How can likelihood computation be accelerated for multivariate models like multivariate Ornstein–Uhlenbeck and punctuated equilibrium processes without constructing the full variance-covariance matrix?
- RQ3What computational strategies allow efficient handling of missing data, non-existing traits, and non-ultrametric trees in phylogenetic likelihood evaluation?
- RQ4Can the likelihood evaluation be made numerically robust in the presence of very short branches that lead to singular covariance matrices?
- RQ5To what extent can the framework be generalized to support mixed-type models with different evolutionary processes on different parts of the tree?
Key findings
- The PCMBase package achieves linear-time likelihood evaluation (O(n)) for multivariate phylogenetic models, significantly outperforming quadratic-time methods that require full matrix construction.
- The package successfully handles non-ultrametric trees, polytomies, and fossil data without requiring tree resolution or transformation.
- It correctly distinguishes between unobserved traits (integrated over) and non-existing traits (treated via dimensionally reduced computations), enabling accurate likelihood estimation under complex data patterns.
- The package detects and reports numerically singular variance-covariance matrices on very short branches, with an option to skip such branches if specified.
- The implementation supports novel models such as the multivariate punctuated equilibrium process, demonstrating the framework’s flexibility beyond standard models.
- The method scales effectively to large phylogenies with thousands of tips, making it suitable for high-throughput analyses such as those on HIV sequence data.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.