orssWeighted | R Documentation |
This function calculates the odds ratio skill score (ORSS) using a threshold applied to continuous data to demarcate "presence" from "contrast".
orssWeighted( pres, contrast, presWeight = rep(1, length(pres)), contrastWeight = rep(1, length(contrast)), thresholds = seq(0, 1, by = 0.01), na.rm = FALSE, bg = NULL, ... )
pres |
Numeric vector. Predicted values at presence sites. |
contrast |
Numeric vector. Predicted values at absence/background sites. |
presWeight |
Numeric vector same length as |
contrastWeight |
Numeric vector same length as |
thresholds |
Numeric vector, Values at which to threshold predictions for calculation of ORSS. |
na.rm |
Logical. If |
bg |
Same as |
... |
Other arguments (unused). |
Numeric value.
Wunderlich, R.F., Lin, Y-P., Anthony, J., and Petway, J.R. 2019. Two alternative evaluation metrics to replace the true skill statistic in the assessment of species distribution models. Nature Conservation 35:97-116.
cor
, fpb
, aucWeighted
, link[enmSdm]{contBoyce}
, link[enmSdm]{contBoyce2x}
, link[enmSdm]{sediWeighted}
, link[enmSdm]{thresholdWeighted}
, link[enmSdm]{thresholdStats}
set.seed(123) pres <- sqrt(runif(100)) contrast <- runif(10000) hist(contrast, col='gray', xlim=c(0, 1), breaks=20) hist(pres, col='green', breaks=20, add=TRUE) max(orssWeighted(pres, contrast), na.rm=TRUE) presWeight <- c(rep(1, 50), rep(0.5, 50)) max(orssWeighted(pres, contrast, presWeight=presWeight), na.rm=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.