Description Usage Arguments Details Value Author(s) References Examples
Plot the Receiver Operating Characteristics (ROC) curve with AUC statistic in the legend.
1 2 3 4 |
x |
Either |
p |
if x is sdmModels, p is an optional vector with model ID number(s) that should be plotted (NULL (default means all models)); if x is a numeric vector, p is a vector with the same length including the predicted values |
species |
the name of species should be specified (required if x is |
method |
a character vector with the name of modelling methods that one need to get the roc plot for (if NULL [default], all methods in the object are considered); only if x is |
replication |
a character vector with the name of replication methods (i.e., 'sub','cv','boot') that one need to get the roc plot for |
run |
if x is |
wtest |
evaluation for which test datasets are required, maximum 2 names from 'training', 'test.dep', 'test.indep' (i.e., evaluation for training data, dependent test dataset, and independent test dataset, respectively) |
smooth |
logical, specified whether the ROC curves should be smoothed through a spline procedure |
legend |
logical, specified whether a legend including AUC statistic is required on the plot |
... |
additional arguments passed to plot function |
roc generates the plots of roc curves, and getRoc generate the values of ROC
an object of class matrix
Babak Naimi naimi.b@gmail.com
Naimi, B., Araujo, M.B. (2016) sdm: a reproducible and extensible R platform for species distribution modelling, Ecography, 39:368-375, DOI: 10.1111/ecog.01881
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
file <- system.file("external/model.sdm", package="sdm")
m <- read.sdm(file) # a sdmModels Object (fitted using sdm function)
roc(m)
roc(m,1) # for the first model
roc(m, 1:2)
roc(m,method = 'glm',smooth = T) # only for models fitted using glm method & with smoothed curve
## End(Not run)
|
Loading required package: sp
sdm 1.0-67 (2019-02-26)
Loading required package: dismo
Loading required package: raster
Loading required package: gbm
Loaded gbm 2.1.5
Loading required package: tree
Loading required package: mda
Loading required package: class
Loaded mda 0.4-10
Loading required package: mgcv
Loading required package: nlme
Attaching package: 'nlme'
The following object is masked from 'package:raster':
getData
This is mgcv 1.8-28. For overview type 'help("mgcv-package")'.
Loading required package: glmnet
Loading required package: Matrix
Loading required package: foreach
Loaded glmnet 2.0-16
Loading required package: earth
Loading required package: Formula
Loading required package: plotmo
Loading required package: plotrix
Loading required package: TeachingDemos
Loading required package: rJava
Loading required package: RSNNS
Loading required package: Rcpp
Loading required package: randomForest
randomForest 4.6-14
Type rfNews() to see new features/changes/bug fixes.
Loading required package: rpart
Loading required package: kernlab
Attaching package: 'kernlab'
The following objects are masked from 'package:raster':
buffer, rotated
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.