ComputePathwayProbability: ComputePathwayProbability

Description Usage Arguments Value Author(s) References Examples

Description

This implements the rate summary used in Zanne et al. 2014. Using the rate matrix, one can calculate

Usage

1
ComputePathwayProbability(Q, from, to, correct.diag = TRUE, total.time = 1e+06)

Arguments

Q

Instantaneous rate matrix

from

Index (position) of start state in the matrix (i.e., the second character)

to

Index (position) of end state in the matrix

correct.diag

Normally the diagonal is the negative sum of the non-diagonal elements in a row. If TRUE, this verifies that this is so

total.time

A large enough time such that there is essentially no chance of remaining unchanged

Value

A vector with the probability of each path into the final state.

Author(s)

Brian C. O'Meara

References

Zanne et al. 2014

Examples

1
2
3
4
5
6
7
8
#A random sample transition matrix
Q <- matrix(runif(9), 3, 3)
diag(Q) <- 0
diag(Q) <- -rowSums(Q)
colnames(Q) <- c("A", "B", "C")
rownames(Q) <- c("A", "B", "C")
print(Q)
ComputePathwayProbability(Q, from=1, to=3)

bomeara/RateViz documentation built on May 12, 2019, 11:34 p.m.