Skip to contents

Tip-based in-situ diversification metrics

Usage

calc_insitu_diversification(
  W,
  tree,
  ancestral.area,
  biogeo,
  diversification = "jetz",
  type = "equal.splits"
)

Arguments

W

Assemblage occurrence matrix, rows are assemblages and columns are species

tree

Phylogenetic tree in newick format

ancestral.area

One column data frame indicating the Ecoregion of occurrence of each node (rows)

biogeo

Data frame with one column indicating the Ecoregion of each assemblage

diversification

Character indicating the tip-based diversification metric to be calculated. Default is "jetz"

type

Character indicating the type of calculation to be used in the calculation of tip-based metric, "equal-splits" is the default

Value

A list with the following objects:

  • Jetz_per_sppJetz tip-based metric of diversification for each species

  • Jetz_species_siteMatrix containing the values of Jetz tip-based diversification metric for each assemblage

  • Jetz_harmonic_mean_siteHarmonic mean of Jetz tip-based diversification metric

  • insitu_Jetz_species_sitesMatrix with model-based Jetz metric for each species in each assemblage

  • insitu_Jetz_harmonic_mean_siteHarmonic mean of model-based Jetz diversification

Details

model-based measure of diversification is calculated as the proportion of total tip-based diversification metric corresponded only to the branches of a given species that diversified in the current area of occurrence of that species $$Jetz_total \times (ED_div/ED_total)$$

Author

Gabriel Nakamura gabriel.nakamura.souza@gmail.com and Arthur V Rodrigues

Examples

if (FALSE) {
W_toy <- matrix(c(0, 1, 1, 0, 1, 
    1, 0, 1, 0, 1, 
    0, 0, 1, 0, 0),nrow= 3,
    ncol= 5,dimnames=list(c("Comm 1", "Comm 2", "Comm 3"),
                          c(paste("s", 1:5, sep=""))))
data("toy_treeEx")
toy_treeEx                   
biogeo_toy <- data.frame(Ecoregion= c("A", "B", "C"))
ancestral_area_toy <- data.frame(state= c("ABC", "B", "C", "ABC"))
plot(toy_treeEx, show.node.label = TRUE)
calc_insitu_diversification(W = W_toy,
                            tree = toy_treeEx, 
                            ancestral.area = ancestral_area_toy,
                             biogeo = biogeo_toy)
}