Calculate the mean of a continuous character at the origin of derived state of a binary charachter

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)