normat: Utility functions to help deal with matrices
Normalize a transition matrix
Description
normat normalizes a square transition matrix, such
that each row sums to 0, and the diagonal equals the
negative of the sum of the rest of the cells in the row.
This matrix can then be exponentiated by values of
t (time or another measure of branch length) to
produce transition probabilities for any given value of
t.
Usage
normat(relative_matrix)
Arguments
relative_matrix
A square matrix giving the
relative probabilities/weights of transitions.
Value
m A Q matrix, i.e. normalized transition matrix
(Qmat)
Details
See Foster (2001) for a succinct summary of
transition matrices and their exponentiation.