Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

prevalence

Prevalence


Description

For building and evaluating species distribution models, the porportion of presences of the species may be issues to take into account (e.g. Jimenez-Valverde & Lobo 2006, Barbosa et al. 2013). The prevalence function calculates this measure.

Usage

prevalence(obs, event = 1, na.rm = TRUE)

Arguments

obs

a vector of binary observations (e.g. 1 vs. 0, male vs. female, disease vs. no disease, etc.).

event

the value whose prevalence we want to calculate (e.g. 1, "present", etc.).

na.rm

logical, whether NA values should be excluded. The default is TRUE.

Value

Numeric value of the prevalence of event in the obs vector.

Author(s)

A. Marcia Barbosa

References

Barbosa A.M., Real R., Munoz A.R. & Brown J.A. (2013) New measures for assessing model equilibrium and prediction mismatch in species distribution models. Diversity and Distributions, in press

Jimenez-Valverde A. & Lobo J.M. (2006) The ghost of unbalanced species distribution data in geographical model predictions. Diversity and Distributions, 12: 521-524.

See Also

Examples

(x <- rep(c(0, 1), each = 5))

(y <- c(rep(0, 3), rep(1, 7)))

(z <- c(rep(0, 7), rep(1, 3)))

prevalence(x)

prevalence(y)

prevalence(z)

modEvA

Model Evaluation and Analysis

v2.0
GPL-3
Authors
Barbosa A.M., Brown J.A., Jimenez-Valverde A., Real R.
Initial release
2020-01-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.