Fast Molecular Clock Dating of Phylogenetic Trees with Rate Variation
Overview
Functions for estimating times of common ancestry and molecular clock rates of evolution using a variety of evolutionary models, parametric and nonparametric bootstrap confidence intervals, methods for detecting outlier lineages, root-to-tip regression, and a statistical test for selecting molecular clock models. For more details see Volz and Frost (2017) doi:10.1093/ve/vex025.
New features
- **Sparse node-time solver (
clsSolver = "sparse"), now the default.** The temporally-constrained least-squares step that estimates internal-node times is now solved with a sparse tree-Laplacian **Goldfarb–Idnani dual active-set** instead of forming and solving a dense quadratic program. Each step appliesL⁻¹to one constraint column (anO(n)sparse solve) and updates a small dense Schur factor. End-to-end this is roughly 6× faster than the dense solver on a real 1,000-tip relaxed-clock fit and ~15× at 2,000 tips, while returning numerically identical estimates (tMRCA/rate agree with the dense solver to ~1e-8 or better). Because it is a *dual* method, it also converges on **degenerate** constraint sets — many linearly-dependent binding constraints, common on large, non-clock-like trees — by exchanging constraints, where the earlier primal active-set had to fall back to the densequadprogsolver (e.g. ~14× faster than that fallback at 4,000 tips). The dense solver is available asclsSolver = "quadprog", and"mgcv"is unchanged. The sparse path requires the **Matrix** package (a recommended package shipped with R) and falls back to"quadprog"automatically if it is unavailable or fails, so a result is always produced. Seenotes/sparse-active-set.mdfor details.
Show all changes in 2.0.0Hide the rest of the changes in 2.0.0
Dependencies
- **
limSolveis no longer required** (it is being discontinued on CRAN). The dense constrained-least-squares solver now uses **quadprog** (moved toImports);limSolvehas been dropped fromDepends.
Bug fixes
dater()now forwards itsclsSolverargument to the internal fitting routine (previously the top-levelclsSolverargument was ignored).
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-04
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 12includes a package overview page
- Examples that run
- 86%6 run in a plain check · 1 never run
- Exported functions with examples
- 70%
- Documented parameters
- 98%
- Return-value docs
- 90%
- Help pages citing references
- 8%
- H3N2 HTML
Downloads
Dependencies
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 2.0.0Latest
- RR 4.6.0 released · 2026-04-24
- unarchivedReturned to CRAN2025-09-03
- 1.0.2
- archivedRemoved from CRAN2025-06-02requires archived package 'limSolve'
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- RR 4.0.0 released · 2020-04-24
- 0.5.02020-01-26 · diff ↗
- RR 3.6.0 released · 2019-04-26
- 0.3.0
- 0.2.02018-05-04
- RR 3.5.0 released · 2018-04-23
Package metadata
- First published
- 2018-05-04
- Total releases
- 5 / 8 yrs
- License
- GPL-2 OSI
- Download size
- 142 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("treedater")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.