History of Population Size

Description

Estimates the sequential event number (SEN) quantiles for each simulated population size.

Usage

1
2
    ## S3 method for class 'tm'
pophistory(x, probs=seq(0, 1, 0.25))

Arguments

x

An object of class tm as returned by a call to tm

probs

Probabilities passed to quantile

Value

A matrix of column vectors containing the estimated SEN quantiles, with row names specifying the population size.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Load example dataset
data(pdm)

transitions <- full.transitions(pdm$unitary.transitions, pdm$loci)
pi <- stationary.dist(transitions)
n <- 10
mu <- 1
samples <- 10
est.res <- tm(transitions, pi, pdm$population, n, mu, samples)

# Plot minimum, median and maximum SEN as a function of population size
h <- pophistory(est.res, probs=c(0, 0.5, 1))
matplot(h, rownames(h), type="s", lty=c(3, 1, 3), col="black",
        xlab="Population size", ylab="SEN")