AncCond: Calculate the mean of a continuous character at the origin of...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/AncCond.R

Description

This function uses stochastic mapping and ancestral state reconstruction to determine if the derived state of a binary trait originates when a continuous trait has an extreme value.

Usage

1
AncCond(trees, data, derived.state, iterations=1000)

Arguments

trees

tree(s) of class phylo or multiPhylo

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

derived.state

the derived condition for the binary trait

iterations

the number of iterations to be used in estimating significance

Details

This function uses stochastic mapping and ancestral state reconstruction as implemented in phytools to determine if the derived state of a binary trait originates when a continuous trait has an extreme value. This test assumes that the derived state of the binary character may lead to correlated selection in the continuous trait. Because of this the ancestral state reconstruction of the continuous trait is based only on data from species that remain in the ancestral condition for the binary trait

Value

Returns a plot of the null distribution and the observed data as well as empirical p-value for the observed data.

Author(s)

Heath Blackmon and Richard H. Adams

References

http://coleoguy.github.io/

Examples

1
2
3
4
5
6
## Not run: 
data(mite.trait)
data(trees.mite)
AncCond(trees, mite.trait, derived.state = "haplodiploidy", iterations=100) 

## End(Not run)


evobiR documentation built on May 19, 2017, 4:29 p.m.
Search within the evobiR package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.