sfreemap | R Documentation |
This function performs an analitic stochastic character mapping on a phylogenetic tree (algorithym proposed by Minin and Suchard).
It can be called with a combination of parameters, much like any vectorized
function in R. In other words, calling it with N
trees (multiPhylo
object) and a single rate matrix Q
will return N
mapped trees.
Calling sfreemap
with a single tree (phylo
object) and M
Q
matrices will result in M
mapped trees, replicas of the single
tree with the algorithm applied to it using all Q
matrices. Same logic
applies to prior
as well. It is important to note though that it you
pass on N > 1
trees and M > 1
rate matrices (or priors), M
and N
should be equal.
sfreemap(tree, tip_states, Q=NULL, type="standard", model="SYM"
, method="empirical", ...)
tree |
a phylogenetic tree as an object of class |
tip_states |
Two formats are accepted:
|
Q |
The transition rate matrix. Can be given as a matrix with state names on dimensons or estimated by the
program. Options for estimation depend on argumentos |
type |
The type of the |
model |
By choosing to estimate Q user can then select a model. When
When |
method |
The
|
... |
Optional parameters, listed below:
|
Returns a modified object of class "phylo", adding the following data:
mapped.edge |
a matrix containing the expected value for dwelling times for each state along each edge of the tree; |
mapped.edge.lmt |
a matrix containing the expected number of labelled markov transitions for each state along each edge of the tree; |
Q |
the given or estimated value of Q; |
logL |
The likelihood of calculated for the given or sampled Q; |
prior |
The prios given or calculated for the root node; |
Diego Pasqualin dpasqualin@inf.ufpr.br
Vladimir N Minin e Marc A Suchard. Fast, accurate and simulation-free stochastic mapping. Philosophical Transactions of the Royal Society B: Biological Sciences, 363 (1512): 3985-3995, 2008.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.