normat: Utility functions to help deal with matrices Normalize a...

Description Usage Arguments Details Value Note Author(s) References Examples

View source: R/BioGeoBEARS_basics_v1.R

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

1
  normat(relative_matrix)

Arguments

relative_matrix

A square matrix giving the relative probabilities/weights of transitions.

Details

See Foster (2001) for a succinct summary of transition matrices and their exponentiation.

Value

m A Q matrix, i.e. normalized transition matrix (Qmat)

Note

Go BEARS!

Author(s)

Nicholas J. Matzke matzke@berkeley.edu

References

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

FosterIdiots

Examples

1
testval=1

Example output

Loading required package: rexpokit
Loading required package: cladoRcpp
Loading required package: ape
Loading required package: phylobase

Attaching package: 'phylobase'

The following object is masked from 'package:ape':

    edges

BioGeoBEARS documentation built on May 29, 2017, 8:36 p.m.