Description Usage Arguments Value Examples
Estimates the mutation rate using a maximumlikelihood approach.
1 2 
transitions 
Transition matrix between types 
pi 
Stationary distribution associated with the transition matrix, or

population 
Vector representing the initial population 
n 
Target population size 
mu.int 
Vector specifying the endpoints of the interval to be searched for the optimal mutation rate 
samples 
Number of samples to simulate 
threads 
Number of threads used for simulations, or 
... 
Further arguments passed to 
mu.hat 
The maximumlikelihood estimate of the mutation rate 
loglik 
The loglikelihood value associated with the estimated mutation rate 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19  # Load example dataset
data(pdm)
transitions < full.transitions(pdm$unitary.transitions, pdm$loci)
pi < stationary.dist(transitions)
mu.int < c(0.1, 10)
samples < 10
# MLE of the mutation rate for a single target population size
n < 10
mle.res < mu.mle(transitions, pi, pdm$population, n, mu.int, samples)
print(mle.res)
# MLE of the mutation rate for 10 different target population sizes, including
# up to the MRCA (n = 1)
ns < 1:10
mle.res < sapply(ns, mu.mle, transitions=transitions, pi=pi,
population=pdm$population, mu.int=mu.int, samples=samples)
print(mle.res)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs in the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.