Description Usage Arguments Details Value Author(s) References See Also Examples
Adaptation of the Evaluation Strip method proposed by Elith et al.(2005). This function enables to plot the response curves of a model independently of the algorithm used for building the model. It therefore permits a direct comparison of predicted responses from the different statistical approaches on the same data.
1 2 3 4 5 6 7 8 9 10 
models 
a character vector specifying the models for which the response curves have to be plotted. Compatible with GAM, GBM, GLM, ANN, CTA, RF, FDA, MARS and MAXENT. 
Data 
a dataframe containing the variables for which the response curves have to be plotted. They must have the same names as the ones used to calibrate the model. RasterStack are also supported. 
show.variables 
the names or the column numbers of 'Data' for selecting the variables to be plotted. By default all columns are taken 
do.bivariate 
'logical', if FALSE (default), the predicted response curves are plotted for every singe variable independently (2D dimension). If TRUE, the predicted response curves are represented in 3D for all pairs of variables 
fixed.var.metric 
either 'mean' (default), 'median', 'min' or 'max' specifying the statistic used to fix as constant the remaining variables when the predicted response is estimated for one of the variables 
save.file 
can be set to "pdf", "jpeg" or "tiff" to save the plot. Pdf options can be changed by setting the default values of pdf.options(). 
name 
the name of the file produced if save.file is different to "no" (extensions are already included) 
ImageSize 
the size of the image in pixels if save.file is different to "no". Affects "jpeg" and "tiff" outputs only. Default if 480 pixels which is the R default. 
plot 
if TRUE (the default) then a plot is produced 
... 
further arguments :

For building the predicted response curves, n1 variables are set constant to a fixed value (mean, median, min or max i.e fixed.var.metric
arg) and only the remaining one (resp. 2 for 3D response plot) is varying across its whole range (given by Data
). n the case of categorical variable, the most represented class is taken. The variations observed and the curve thus obtained shows the sensibility of the model to that specific variable. This method does not account for interactions between variables.
In the evaluation strip initially proposed by Elith et al. 2005 the remaining variables are set to the mean.
a 4D array is returned. It contains the necessary outputs to produce the plots. This is useful to make your own custom response plot graphics.
Array returned structure :
First dimension: the dimension of the predictions
Second dimension: 2 or 3 columns: The first one (resp. the first two) is (are) the explanatory variable(s) to plot, the last one, the probability of occurrence
Third dimension: The set of environmental variables for which the response.plot was asked to run.
Fourth dimension: the selected models
Wilfried Thuiller, Damien Georgs
Elith, J., Ferrier, S., Huettmann, FALSE. & Leathwick, J. R. 2005 The evaluation strip: A new and robust method for plotting predicted responses from species distribution models. Ecological Modelling 186, 280289.
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 75 76 77 78 79 80 81 82 83 84 85  ## Not run:
# 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 < 'VulpesVulpes'
# 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 = raster::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('RF','GLM'),
models.options = myBiomodOption,
NbRunEval=2,
DataSplit=80,
Prevalence=0.5,
VarImport=0,
models.eval.meth = c('TSS'),
SaveObj = TRUE,
do.full.models=FALSE)
# 4. Plot response curves
# 4.1 Load the models for which we want to extract the predicted response curves
myGLMs < BIOMOD_LoadModels(myBiomodModelOut, models='GLM')
# 4.2 plot 2D response plots
myRespPlot2D < response.plot2(models = myGLMs,
Data = get_formal_data(myBiomodModelOut,'expl.var'),
show.variables= get_formal_data(myBiomodModelOut,'expl.var.names'),
do.bivariate = FALSE,
fixed.var.metric = 'median',
col = c("blue", "red"),
legend = TRUE,
data_species = get_formal_data(myBiomodModelOut,'resp.var'))
# 4.2 plot 3D response plots
## here only for a lone model (i.e "VulpesVulpes_PA1_AllData_GLM")
myRespPlot3D < response.plot2(models = myGLMs[1],
Data = get_formal_data(myBiomodModelOut,'expl.var'),
show.variables= get_formal_data(myBiomodModelOut,'expl.var.names'),
do.bivariate = TRUE,
fixed.var.metric = 'median',
data_species = get_formal_data(myBiomodModelOut,'resp.var'),
display_title=FALSE)
### all the values used to produce this plot are stored into the returned object
### you can redo plots by yourself and customised them
dim(myRespPlot2D)
dimnames(myRespPlot2D)
dim(myRespPlot3D)
dimnames(myRespPlot3D)
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.