ratematrix: Translate between parameters, rate matrices and transition...

Description Usage Arguments Details Value

Description

Calculate ratematrix from GTR parameterization for 3 states, get Eigen decomposition and calculate transition probabilities.

Usage

1
2
3
4
5
6

Arguments

pars

Vector: Parameters describing the substitution model for each edge on the tree.

Q

Matrix: Ratematrix.

QEig

List: Three components: d: Eigenvalues, Ui Matrix of Eigenvectors, U Inverse of Ui

t

Numeric: Time, i.e. the expected number of substitutions along that branch in the tree.

Details

Parameters pars are expanded to a rate matrix by using the first three values as equilibrium frequencies, and the following three values as rate parameters (1->2, 1->3 and 2->3).

Value

pars2Q.3states.GTR Returns a 3x3 rate matrix. pars2QEig.3states.GTR Returns the Eigen decomposition of a 3x3 rate matrix. Q2QEig Returns the Eigen decomposition of Q. QEig2Q Returns the rate matrix corresponding to the Eigen decomposition QEig. QEig2P Returns the transition matrix. Q2P Returns the transition matrix.


Shicheng-Guo/lyne documentation built on May 10, 2017, 1:36 p.m.