asr | R Documentation |
Reconstruct the ancestral states of a vector or matrix object by using either parsimony or maximum-likelihood methods to infer the states at the internal nodes of a phylogenetic tree.
asr(
var,
tree,
type = c("parsimony", "ML", "ace"),
method = c("discrete", "continuous"),
unique.cols = FALSE
)
var |
Either a matrix or a vector containing the state of a variable (eg. SNPs or a phenotype) for all individuals (ie. for all terminal nodes in the tree). |
tree |
A phylo object containing the tree representing the ancestral relationships between the individuals for which snps and phen are known. |
type |
A character string specifying whether ancestral state reconstruction should be
performed by |
method |
A character string specifying the type of ASR method to implement,
either |
unique.cols |
A logical indicating whether only unique column patterns are present in |
Depending on the dimensions of the input var
object,
either a matrix or a vector containing both the known states
of the variable at the terminal nodes (in positions 1:Nterminal) and the
inferred states at internal nodes (in positions (Nterminal+1):Ntotal).
Caitlin Collins caitiecollins@gmail.com
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.