# NOT RUN {
# 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)
# }
Run the code above in your browser using DataLab