Learn R Programming

enmSdmX (version 1.2.12)

nicheOverlapMetrics: 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

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

Value

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

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 vector. 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).

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. tools:::Rd_expr_doi("10.1111/j.1558-5646.2008.00482.x")

Warren, D.L., Glor, R.E., and Turelli, M. 2008. Erratum. Evolution 62:2868-2883. tools:::Rd_expr_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. tools:::Rd_expr_doi("10.1111/j.1600-0587.2013.00403.x")

See Also

compareResponse

Examples

Run this code

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

Run the code above in your browser using DataLab