Learn R Programming

BioGeoBEARS (version 0.2.1)

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.

References

http://phylo.wikidot.com/matzke-2013-international-biogeography-society-poster https://code.google.com/p/lagrange/

FosterIdiots

Examples

Run this code
testval=1

Run the code above in your browser using DataLab