PhaseTypeR: phase-type distributions in R with reward transformations and a view towards population genetics
Iker Rivas-GonzáleziD, Lars Nørvang AnderseniD, Asger HobolthiD
Abstract
Phase-type distributions are a general class of models that are traditionally used in actuarial sciences and queuing theory, and more recently in population genetics. A phase-type distributed random variable is the time to absorption in a discrete or continuous time Markov chain on a finite state space with an absorbing state. The R package PhaseTypeR contains all the key functions--mean, (co)variance, probability density function, cumulative distribution function, quantile function, random sampling and reward transformations--for both continuous (PH) and discrete (DPH) phase-type distributions. Additionally, we have also implemented the multivariate continuous case (MPH) and the multivariate discrete case (MDPH). We illustrate the usage of PhaseTypeR in simple examples from population genetics (e.g. the time until the most recent common ancestor or the total number of mutations in an alignment of homologous DNA sequences), and we demonstrate the power of PhaseTypeR in more involved applications from population genetics, such as the coalescent with recombination and the structured coalescent. The multivariate distributions and ability to reward-transform are particularly important in population genetics, and a unique feature of PhaseTypeR.
02 /Specification & Classification
Click any tag to browse matching papers- Citations
- 1
- Research Focus
- Approach
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- Phase-type distributions in population genetics
Asger Hobolth, Arno Siri‐Jégousse, Mogens Bladt·Theoretical Population BiologyPeer-reviewed·Feb 26, 2019
- Graph-based algorithms for phase-type distributions
Tobias Røikjer, Asger Hobolth, Kasper Munch·Statistics and ComputingPeer-reviewed·Oct 31, 2022
- PhaseGen: Exact Solutions for Time-Inhomogenous Multivariate Coalescent Distributions under Diverse Demographies
Janek Sendrowski, Asger Hobolth·GeneticsPeer-reviewed·Jul 22, 2025
- General moment closure for the neutral two-locus Wright-Fisher dynamics
Raunak Kundagrami, Sean Yetter, Matthias Steinrücken·bioRxiv·Aug 29, 2026
- Coalescent models for populations with time-varying population sizes and arbitrary offspring distributions
Christophe Fraser, Lucy M Li·bioRxiv·Apr 28, 2017
- The distribution of the time to the most recent pairwise genetic common ancestor of a set of sampled genomes
Zehui Zhao, Rohan S. Mehta, Daniel B. Weissman·GeneticsPeer-reviewed·Nov 19, 2025