AncCond | R Documentation |
This function uses ancestral state estimations for a discrete character based on stochastic mapping under an Mk2 model and ancestral state estimates for a continuous trait under a Brownian motion model to determine if transitions in the binary trait coincide with extreme values of a continuous trait.
AncCond(tree,
data,
mc = 1000,
drop.state=NULL,
mat=c(0,2,1,0),
pi="equal",
n.tails = 1,
message = TRUE)
tree |
tree of class phylo |
data |
a dataframe with 3 columns. The first should match the taxa names in the tree, the second should have the continuous trait values and the third the states for the binary character. The binary trait should be coded as 1 and 2 if one is ancestral then it must be coded as 1. |
mc |
the number of iterations to use in building the null distribution. |
drop.state |
|
mat |
a vector describing the possible transition for the discrete trait. The default is equivelant to APE's |
pi |
The probabilities for the binary trait at the root of the tree. The values possible are |
n.tails |
numeric value of 1 or 2 to indicate whether a 1 or 2 tailed p-value should be calculated |
message |
Logical value if |
This function uses ancestral state estimates to determine if the transitions in the binary trait are associated with extreme values of the continuous trait. This test can incorporate the possibility that the derived state of a binary character may lead to correlated selection in the continuous trait. If this is desired then the drop.state argument should be used to specify the derived state of the binary character that should not be used in the ancestral state estimation of the continuous trait.
Returns a list of length 4:
OriginatingVals |
the mean value(s) for the continuous trait at the transition points of the binary character |
NTrans |
the number of transitions in the binary character |
NullDist |
the null distribution(s) produced by simulation |
pval |
pvalue |
Nathan Anderson, Jeffery P. Demuth, Richard H. Adams, and Heath Blackmon
http://coleoguy.github.io/
## Not run:
data(mite.trait)
data(trees.mite)
AncCond(trees[[1]], mite.trait)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.