dtt.dispRity | R Documentation |
geiger::dtt
)A wrapper for the geiger::dtt
function working with any disparity metric.
dtt.dispRity(
data,
metric,
tree,
nsim = 0,
model = "BM",
alternative = "two-sided",
scale.time = TRUE,
...
)
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 |
See geiger::dtt
for details.
Thomas Guillerme
test.dispRity
, custom.subsets
, chrono.subsets
, plot.dispRity
.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.