BIOMOD_presenceonly: evaluate models with presences only metrics

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/BIOMOD_presenceonly.R

Description

This function enables to evaluate BIOMOD.models.out and BIOMOD.EnsembleModeling.out object with presence-only evaluation methods (Boyce index and Minimal Predicted Area MPA)

Usage

1
2
BIOMOD_presenceonly(modeling.output = NULL, EM.output = NULL,
  save.output = T)

Arguments

modeling.output

"BIOMOD.models.out" object produced by a BIOMOD_Modeling run

EM.output

a "BIOMOD.EnsembleModeling.out" returned by BIOMOD_EnsembleModeling

save.output

logical. If TRUE (Default) the output is saved to the ".BIOMOD_DATA" folder

Details

'em.by' of 'BIOMOD.EnsembleModeling' must be 'PA_dataset+repet' to have an ensemble for each RUN of the 'NbRunEval' argument (BIOMOD_Modeling funtion) for evaluation. The Boyce index returns NA values for 'SRE' models because it is not possible to be calculated with binary predictions. This is also the reason why there are sometimes NA values for 'GLM' models if they don not converge.

Value

data.frame containing evaluation scores for the evaluation metrics used for the BIOMOD_Modeling function and additional Boyce index and MPA

Author(s)

Frank Breiner

References

Engler, R., A. Guisan, and L. Rechsteiner. 2004. An improved approach for predicting the distribution of rare and endangered species from occurrence and pseudo-absence data. Journal of Applied Ecology.

See Also

ecospat.boyce, ecospat.mpa, BIOMOD_Modeling, BIOMOD_EnsembleModeling

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
## Not run: 
require(PresenceAbsence)

# species occurrences
DataSpecies <- read.csv(system.file("external/species/mammals_table.csv",
                                    package="biomod2"), row.names = 1)
head(DataSpecies)

# the name of studied species
myRespName <- 'GuloGulo'

# the presence/absences data for our species 
myResp <- as.numeric(DataSpecies[,myRespName])

# the XY coordinates of species data
myRespXY <- DataSpecies[,c("X_WGS84","Y_WGS84")]


# Environmental variables extracted from BIOCLIM (bio_3, bio_4, bio_7, bio_11 & bio_12)
myExpl = stack( system.file( "external/bioclim/current/bio3.grd", 
                             package="biomod2"),
                system.file( "external/bioclim/current/bio4.grd", 
                             package="biomod2"), 
                system.file( "external/bioclim/current/bio7.grd", 
                             package="biomod2"),  
                system.file( "external/bioclim/current/bio11.grd", 
                             package="biomod2"), 
                system.file( "external/bioclim/current/bio12.grd", 
                             package="biomod2"))

# 1. Formatting Data
myBiomodData <- BIOMOD_FormatingData(resp.var = myResp,
                                     expl.var = myExpl,
                                     resp.xy = myRespXY,
                                     resp.name = myRespName)

# 2. Defining Models Options using default options.
myBiomodOption <- BIOMOD_ModelingOptions()

# 3. Doing Modelisation

myBiomodModelOut <- BIOMOD_Modeling( myBiomodData, 
                                     models = c('SRE','CTA','RF'), 
                                     models.options = myBiomodOption, 
                                     NbRunEval=1, 
                                     DataSplit=80, 
                                     Yweights=NULL, 
                                     VarImport=3, 
                                     models.eval.meth = c('TSS','ROC'),
                                     SaveObj = TRUE,
                                     rescal.all.models = FALSE,
                                     do.full.models = FALSE)

# 4. Doing Ensemble Modelling
myBiomodEM <- BIOMOD_EnsembleModeling( modeling.output = myBiomodModelOut,
                                       chosen.models = 'all',
                                       em.by = 'PA_dataset+repet',
                                       eval.metric = c('TSS'),
                                       eval.metric.quality.threshold = c(0.7),
                                       models.eval.meth = c('TSS','ROC'),
                                       prob.mean = TRUE,
                                       prob.cv = FALSE,
                                       prob.ci = FALSE,
                                       prob.ci.alpha = 0.05,
                                       prob.median = FALSE,
                                       committee.averaging = FALSE,
                                       prob.mean.weight = TRUE,
                                       prob.mean.weight.decay = 'proportional' )   

# evaluate Biomod models with the Boyce index and MPA
pres.only.eval <- BIOMOD_presenceonly(myBiomodModelOut, myBiomodEM)
pres.only.eval$eval

## End(Not run)

biomod2 documentation built on May 31, 2017, 2:55 a.m.