test.windex: Tests for particularly strong convergent evolution given...

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/test.windex.R

Description

The P-value returned is for the null hypothesis that the calculated Wheatsheaf index is no higher than expected by chance given the topology of the phylogenetic tree. Note that this is not a test for convergence per se, but of whether the convergence is unexpectedly strong.

Usage

1
2
test.windex(dat, tree, traits, focal = dat[, 2], SE = TRUE, reps,
plot = TRUE, ...)

Arguments

dat

A dataframe containing a column of 0s and 1s to denote non-focal and focal taxa respectively, and columns of trait data which you which to plot. The first column must be named 'species' and contain species names that correspond to those in the phylogenetic tree.

tree

Phylogenetic tree of class 'phylo' containing branch lengths. The tree should also be ultrametric.

traits

Column numbers (or names) of the traits for which you want to calculate a Wheatsheaf index.

focal

Column in the dataframe containing the focal designations.

SE

A logical specifying whether to standardise the traits by their standard error across species, default is SE=TRUE.

reps

Number of bootstrap replicates on which to base the P-value.

plot

A logical indicating whether to plot the bootstrap distribution. If TRUE, a histogram is plotted with the calculated Wheatsheaf index and its 95% confident interval overlayed on the histogram as a solid and dashed lines (respectively).

...

Additional arguments passed to hist() to customise the histogram (when plot=TRUE).

Value

w

Calculated Wheatsheaf index

low95

lower bound of 95% confidence interval for the Wheatsheaf index obtained by jackkniving

up95

Upper bound of 95% confidence interval for the Wheatsheaf index obtained by jackkniving

P

P-value from bootstrapping the tips of the phylogenetic tree

boot.dist

Bootstrap sample of Wheatsheaf index used to calculate P-value

Author(s)

Kevin Arbuckle and Amanda Minter

References

Arbuckle, K., Bennett, C.M. and Speed, M.P. 2014. A simple measure of the strength of convergent evolution. Methods in Ecology and Evolution 5:685 - 693.

See Also

windex windex.sim.test

Examples

1
2
3
4
5
6
7
## Not run: 
data(sample.data)
data(sample.tree)
test.windex(sample.data,sample.tree,traits=c("bm1","bm2"),focal=sample.data[,2],
reps=1000,plot=TRUE,col="light grey")

## End(Not run)

windex documentation built on Jan. 16, 2021, 5:17 p.m.