Calculates the D value, a measure of phylogenetic signal in a binary trait, and tests the estimated D value for significant departure from both random association and the clumping expected under a Brownian evolution threshold model. Does this across clades within a phylogeny.
phylo.d.subset(data, phy, names.col, binvar, permut = 1000, rnd.bias=NULL,
min.tips=1, max.tips=length(data$phy$tip.label), min.nodes=1,
max.nodes=data$phy$Nnode, verbose=FALSE)
# S3 method for phylo.d.subset
print(x, ...)
# S3 method for phylo.d.subset
summary(object, ...)
Returns an object of class 'phylo.d.subset', which is a list of the following:
A list of the raw output from phylo.d
for each clade
A vector of the estimated D values
A vector of p values, giving the result of testing whether D is significantly different from one, for each clade
A vector of p values, giving the result of testing whether D is significantly different from zero, for each clade
A numeric vector giving the age of the clade for which each value was calculated
A 'comparative.data' or 'data.frame' object.
An object of class 'phylo', required when data is not a 'comparative.data' object.
A name specifying the column in 'data' that matches rows to tips in 'phy', required when data is not a 'comparative.data' object.
The name of the variable in data
holding the binary variable of interest.
Number of permutations to be used in the randomisation test.
An optional name of a variable in data
holding probability weights to bias the generation of the random distribution. See 'destails'
Logical; do you want to know how many clades are being assessed, and see when each is being assessed?
The minimum number of tips a clade should have for it to have a D value calculated. Defaults to 1 (i.e. no limit).
The maximum number of species a clade should have for it to have a D value calculated. Defaults to the number of species in the whole phylogeny (i.e. no limit).
The minimum number of nodes a clade should have for it to have a D value calculated. Defaults to 1 (i.e. no limit).
The maximum number of nodes a clade should have for it to have a D value calculated. Defaults to the number of nodes in the whole phylogeny (i.e. no limit).
An object of class 'phylo.d.subset'
An object of class 'phylo.d.subset'
Further arguments to print and summary methods
Susanne Fritz (SFritz@bio.ku.dk), Will Pearse and David Orme
A wrapper function for phylo.d
, calculating D values for clades within a given dataset. These clades can be filtered according to the number of species and nodes using the arguments above. See phylo.d
for more details on the method itself.
Any clades for which there is no variation in the binary variable have NA
values for all of the below slots.
Fritz, S. A. and Purvis, A. (2010). Selectivity in mammalian extinction risk and threat types: a new measure of phylogenetic signal strength in binary traits. Conservation Biology, 24(4):1042-1051.
data(BritishBirds)
BritishBirds <- comparative.data(BritishBirds.tree, BritishBirds.data, binomial)
# Look at big clades only
if (FALSE) {
bigClades <- phylo.d.subset(BritishBirds, binvar=Red_list, verbose=TRUE, min.tips=10, min.nodes=5)
print(bigClades)
}
Run the code above in your browser using DataLab