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 dispRity object or a matrix

metric

The disparity metric to be passed to dispRity.

tree

A phylo object matching the data and with a root.time element. Can be missing if data has a tree component.

nsim

The number of simulations to calculate null disparity-through-time.

model

A evolutionary model for the simulations (see geiger::sim.char - default is "BM").

alternative

The H1 alternative (for calculating the p-value). Can be "two-sided" (default), "greater" or "lesser"; see details.

scale.time

Optional, whether to scale the time (between 0 and 1; TRUE, default) or not (FALSE).

...

Any other arguments to be passed to geiger::dtt.

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)



[Package dispRity version 1.8 Index]