Description Usage Arguments Details Value Note Author(s) See Also Examples
For all the models currently implemented, BIOMOD is able to project potential distributions of species or land-use classes for other areas, other resolutions or other time scales.
1 2 | Projection(Proj = NULL, Proj.name, GLM = TRUE, GBM = TRUE, GAM = TRUE, CTA = TRUE, ANN = TRUE, SRE = TRUE, quant=0.025, FDA = TRUE, MARS = TRUE, RF = TRUE, BinRoc = FALSE, BinKappa = FALSE, BinTSS = FALSE, FiltRoc = FALSE, FiltKappa = FALSE, FiltTSS = FALSE, repetition.models=TRUE, compress="xz")
Projection.raster(RasterProj=NULL, Proj.name, GLM=TRUE, GBM=TRUE, GAM=TRUE, CTA=TRUE, ANN=TRUE, SRE=TRUE, quant=0.025, FDA=TRUE, MARS=TRUE, RF=TRUE, BinRoc=FALSE, BinKappa=FALSE, BinTSS=FALSE, FiltRoc=FALSE, FiltKappa=FALSE, FiltTSS=FALSE, repetition.models=TRUE, stack.out=TRUE, compress="xz")
|
Proj |
a matrix containing the same variables than for calibrating the models (using the Models function) (the column names are case-sensitive !) but on another geographical space, resolution, or time scale. |
RasterProj |
an object of class 'RasterStack' containing the same variables than for calibrating the models (using the Models function) (the names are case-sensitive !) but on another geographical space, resolution, or time scale. |
Proj.name |
The name of your projection dataset (or any name you want to give to it) which will be used for storing the outputs of the function and also used by other functions to automatically restore the outputs in R from the hard disk |
GLM |
if TRUE, the model will be used to render projections |
GAM |
if TRUE, the model will be used to render projections |
GBM |
if TRUE, the model will be used to render projections |
CTA |
if TRUE, the model will be used to render projections |
ANN |
if TRUE, the model will be used to render projections |
SRE |
if TRUE, the model will be used to render projections |
quant |
the value defines the extreme percentiles of the response data not to be used by the SRE for calibration (see |
FDA |
if TRUE, the model will be used to render projections |
MARS |
if TRUE, the model will be used to render projections |
RF |
if TRUE, the model will be used to render projections |
BinRoc |
set it to TRUE if you want the results to be also produced in binary using the Roc curve threshold for all models |
BinKappa |
set it to TRUE if you want the results to be also produced in binary using Kappa threshold for all models |
BinTSS |
set it to TRUE if you want the results to be also produced in binary using TSS threshold for all models |
FiltRoc |
set it to TRUE if you want the results to be also produced as filtered values using the Roc curve threshold for all models |
FiltKappa |
set it to TRUE if you want the results to be also produced as filtered value using Kappa threshold for all models |
FiltTSS |
set it to TRUE if you want the results to be also produced as filtered value using TSS threshold for all models |
repetition.models |
type TRUE to render projections on the 100 percent calibrated model and also on the repetition models. |
stack.out |
When working with rasters, set it to TRUE to stack all projections on a singl raster stack. Not recommended when having very large datasets with several repetitions and pseudo-absences. |
compress |
logical or character string specifying whether saving to a named file is to use compression. FALSE corresponds to no compression, and character strings "gzip", or "xz" specify the type of compression. See ?save for more details. Default is "xz" |
Note that the models set to TRUE need to have been run in the Models function to be able to run with Projection(). Else, they simply won't be taken into account.
Also take in consideration that the models can only render predictions and/or projections using the same set of variables than the ones used to calibrate them. For the variable names, mind that R is case-sensitive.
Compression : See help for the save function for more detailed explanation about compression options. Only gzip and xz are available here.
No values are returned but a series of objects are produced in the appropriate directory automatically generated by the function itself. The directory name is of the type "proj.Proj.name". If you run several projections campaign with different datasets, a directory will hence be produced per projection that is being run. Note that if Projection() is run with the same Proj.name argument, the results will overwright.
The files (arrays with 4 dimensions) are produced per species and contain the projections in binary or filtered format for all the models selected and for the repetitions if wanted. See the structure in the examples below.
WARNING : From one R session to another and as a general reminder, do think about reloading the objects stored in the .RData file produced by the Models() function. They contain vital information for the models to work properly when called by other functions such as Projection().
Wilfried Thuiller, Bruno Lafourcade
Models
, ProjectionBestModel
, Ensemble.Forecasting
, ProbDensFunc
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 | ## Not run:
data(Sp.Env)
data(CoorXY)
#This command is necessary for the run of BIOMOD as a new dataframe is produced for the Models function
Initial.State(Response=Sp.Env[,13:14], Explanatory=Sp.Env[,4:10],
IndependentResponse=NULL, IndependentExplanatory=NULL)
#Here are done 1 PA runs and 1 repetitions for each run. This will hence take several minutes.
Models(RF=TRUE, SRE=TRUE, GLM = FALSE, TypeGLM = "quad", Test = "AIC", CTA = TRUE, CV.tree = 50, ANN = FALSE, CV.ann = 2,
NbRunEval = 1, DataSplit = 80, Roc=TRUE, Optimized.Threshold.Roc=TRUE, Kappa=TRUE, TSS=TRUE, VarImport=5,
NbRepPA=1, strategy="circles", coor=CoorXY, distance=2, nb.absences=1000)
#Render Future projections under climate change scenario
data(Future1)
head(Future1) #the head() function enables to visualise the 5 firts lines of a dataframe
Projection(Proj = Future1[,4:10], Proj.name="Future1", RF=TRUE, SRE=TRUE, CTA=TRUE, BinKappa=TRUE, FiltKappa=TRUE)
#view the results produced, example with the projections in probabilities :
load("proj.Future1/Proj_Future1_Sp277")
Proj_Future1_Sp277[100:150,,1,1]
#and plot them
data(CoorXY)
load("proj.Future1/Proj_Future1_Sp277_BinKappa")
load("proj.Future1/Proj_Future1_Sp277_FiltKappa")
par(mfrow=c(1,4))
level.plot(Sp.Env[,13], CoorXY, show.scale=FALSE, title="original data")
level.plot(Proj_Future1_Sp277[,"CTA",2,1], CoorXY, show.scale=FALSE, title="probabilities by CTA")
level.plot(Proj_Future1_Sp277_BinKappa[,"CTA",2,1], CoorXY, show.scale=FALSE, title="binary by Kappa")
level.plot(Proj_Future1_Sp277_FiltKappa[,"CTA",2,1], CoorXY, show.scale=FALSE, title="filtered by Kappa")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.