dtt.dispRity {dispRity} | R Documentation |
dtt dispRity (from geiger::dtt
)
Description
A wrapper for the geiger::dtt
function working with any disparity metric.
Usage
dtt.dispRity(
data,
metric,
tree,
nsim = 0,
model = "BM",
alternative = "two-sided",
scale.time = TRUE,
...
)
Arguments
data |
A |
metric |
The disparity metric to be passed to |
tree |
A |
nsim |
The number of simulations to calculate null disparity-through-time. |
model |
A evolutionary model for the simulations (see |
alternative |
The H1 alternative (for calculating the p-value). Can be |
scale.time |
Optional, whether to scale the time (between 0 and 1; |
... |
Any other arguments to be passed to |
Details
See geiger::dtt
for details.
Author(s)
Thomas Guillerme
See Also
test.dispRity
, custom.subsets
, chrono.subsets
, plot.dispRity
.
Examples
## Loading morphological data and a tree
data(BeckLee_mat50)
data(BeckLee_tree)
## The average squared pairwise distance metric (used in geiger::dtt)
average.sq <- function(X) mean(pairwise.dist(X)^2)
## Calculate the disparity of the dataset using dtt.dispRity
dispRity_dtt <- dtt.dispRity(data = BeckLee_mat50, metric = average.sq,
tree = BeckLee_tree, nsim = 20)
## Plotting the results
plot(dispRity_dtt)