Last data update: 2014.03.03

R: Calculates Wheatsheaf index with 95% confidence intervals
windexR Documentation

Calculates Wheatsheaf index with 95% confidence intervals

Description

Takes a phylo object and trait data and returns the Wheatsheaf index for the traits on the tree along with 95% confidence intervals obtained from jackkniving.

Usage

windex(dat, tree, traits, focal = dat[, 2], SE = FALSE)

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) for 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=FALSE.

Value

Wheatsheaf Index

Calculated Wheatsheaf index

Lower 95% CI

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

Upper 95% CI

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

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. This citation is for the method, there is currently a manuscript being prepared to describe this package.

See Also

test.windex

Examples

data(sample.data)
data(sample.tree)
windex(sample.data,sample.tree,traits=c("ou1","ou2"),focal=sample.data[,2],
SE=FALSE)

Results