compareNiches: Metrics of niche overlap

View source: R/compareNiches.r

compareNichesR Documentation

Metrics of niche overlap

Description

This function calculates several metrics of niche overlap based on predictions for two species (or for the same species but different models) at the same sites.

Usage

compareNiches(
  x1,
  x2,
  method = c("meanDiff", "meanAbsDiff", "rmsd", "d", "i", "esp", "cor", "rankCor"),
  w = rep(1, length(x1)),
  na.rm = FALSE,
  ...
)

Arguments

x1

Numeric. Vector of predictions from a model.

x2

Numeric. Vector of predictions from another model.

method

Character vector, indicates type of metric to calculate:

  • meanDiff: Average difference

  • meanAbsDiff: Average of absolute values of difference

  • rmsd: Root-mean square deviation

  • d: Schoener's D

  • i: Warren's I

  • esp: Godsoe's ESP

  • cor: Pearson correlation between x1 and x2 (will apply logitAdj() first unless logit=FALSE).

  • rankCor: Spearman rank correlation.

w

Numeric list. Weights of predictions in x1 and x2.

na.rm

Logical. If TTRUE then remove elements in x1 and 2 that are NA in either x1 or x2.

...

Other arguments (not used).

Value

List object with one element per value specified by the argument in method.

References

Warren, D.L., Glor, R.E., and Turelli, M. 2008. Environmental niche equivalency versus conservatism: Quantitative approaches to niche evolution. Evolution 62:2868-2883. doi: 10.1111/j.1558-5646.2008.00482.x

Warren, D.L., Glor, R.E., and Turelli, M. 2008. Erratum. Evolution 62:2868-2883. doi: 10.1111/j.1558-5646.2010.01204.x

Godsoe, W. 2014. Inferring the similarity of species distributions using Species’ Distribution Models. Ecography 37:130-136. doi: 10.1111/j.1600-0587.2013.00403.x

See Also

compareResponse

Examples


x1 <- seq(0, 1, length.out=100)
x2 <- x1^2
compareNiches(x1, x2)


adamlilith/enmSdm documentation built on Jan. 6, 2023, 11 a.m.