recluster.boot {recluster} | R Documentation |
Bootstrap nodes of consensus trees
Description
Given an initial tree and a data matrix, this function computes bootstrap for nodes. Each tree used for bootstrap is constructed by re-sampling the row order several times and by applying a consensus rule as done by recluster.cons. The number of sampled columns (species) can be varied.
Usage
recluster.boot(tree, mat, phylo = NULL, tr = 100, p = 0.5,
dist = "simpson", method = "average", boot = 1000, level = 1)
Arguments
tree |
A reference phylo tree for sites presumably constructed with recluster.cons function. |
mat |
The matrix used to construct the tree. |
phylo |
An ultrametric and rooted tree for species phylogeny having the same labels of the mat columns. Only required for phylogenetic beta-diversity indices. |
tr |
The number of trees to be included in the consensus. |
p |
A numeric value between 0.5 and 1 giving the proportion for a clade to be represented in the consensus tree. |
dist |
A beta-diversity index (the Simpson index by default) included in recluster.dist or any custom binary dissimilarity to be specified according to the syntax of designdist function of the vegan package. |
method |
Any clustering method allowed by hclust. |
boot |
The number of trees used for bootstrap computation. |
level |
The ratio between the number of species to be included in the analysis and the original number of species in the mat matrix. |
Details
Computation can be time consuming due to the high number of trees required for analysis. It is suggested to assess the degree of row bias by recluster.hist and recluster.node.strength to optimize the number of required consensus trees before starting the analysis.
Value
A vector indicating the percentage of bootstrap trees replicating each original node.
Author(s)
Leonardo Dapporto and Matteo Ramazzotti
References
Dapporto L., Ramazzotti M., Fattorini S., Talavera G., Vila R., Dennis R. "recluster: an unbiased clustering procedure for beta-diversity turnover" Ecography (2013), 36:1070-1075.
Examples
data(datamod)
tree<-recluster.cons(datamod,tr=10)
boot<-recluster.boot(tree$cons,tr=5,boot=50,datamod)
recluster.plot(tree$cons,boot,direction="downwards")
data(treemod)
tree<-recluster.cons(datamod,treemod, dist="phylosort", tr=10)
boot<-recluster.boot(tree$cons, datamod, treemod,tr=5,boot=50)
recluster.plot(tree$cons,boot,direction="downwards")