Running the analysis
Running the analysis
Fit the models - Step 1/14
First of all we create the directory were the results will be stored
> dir.create("biomod.output")
and set the new working directory
> setwd("biomod.output")
To fit our models and the ensemble model we will use the procedure implemented in the R package “biomod2”. The first step is to format the input data. In the module 2 we prepared a dataset including three replicates (to take into account the coordinates uncertainty in datasets). We need to train a complete model from each of them. A detailed description of the procedure will be shown for the first replicate, with the remaining two runs executed within a for loop. We will use the first replicate (i=1) of the krameri dataset. These are only presence data (resp.var=rep(1, nrow(krameri[[i]])), the explanatory variables are in the vars_training object. We will provide coordinates of the first replicate (resp.xy=krameri[[i]]) Together with occurrences data we need absence data. In our case we do not have true absence so we will use pseudo-absence. We set one replicate (PA.nb.rep=1) of 1000 pseudoabsences (PA.nb.absences=1000), randomly placed (PA.strategy='random') in the study area identified in module 2. Regarding the choice of pseudoabsences, see Barbet-Massin et al. (2012).
> i=1
> mydata<-BIOMOD_FormatingData(resp.var=rep(1, nrow(krameri[[i]])),
+ expl.var=vars_training,
+ PA.nb.rep=1,
+ PA.nb.absences=1000,
+ PA.strategy='random',
+ resp.xy=krameri[[i]],
+ resp.name=paste("krameri.", i, sep=""))
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= krameri.1 Data Formating -=-=-=-=-=-=-=-=-=-=-=-=-
! No data has been set aside for modeling evaluation
> Pseudo Absences Selection checkings...
> random pseudo absences selection
> Pseudo absences are selected in explanatory variables
-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Done -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-