windex | R Documentation |
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.
windex(dat, tree, traits, focal = dat[, 2], SE = TRUE, fossil = FALSE,
species.col="species")
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. |
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 |
fossil |
A logical specifying whether the tree contains fossil tips (i.e. is not ultrametric), in which case a different phylogenetic distance penalty based on shared branch length rather than shared time before divergence will be used instead. Note that this alternative penalty for trees containing fossils hasn't yet been rigorously tested so use cautiously, but it seems to behave as expected. |
species.col |
Name of column in the dataset containing species names corresponding to tip labels in the tree, default assumes the column is named "species". |
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 |
Kevin Arbuckle and Amanda Minter
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.
test.windex
windex.sim.test
data(sample.data)
data(sample.tree)
windex(sample.data,sample.tree,traits=c("ou1","ou2"),focal=sample.data[,2],
SE=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.