Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ecospat.ESM.VarContrib

Variable contribution in ESM


Description

calculates the variable contribution of each variable and method in an ESM model

Usage

ecospat.ESM.VarContrib(ESM.modeling.output,
                           ESM_EF.output)

Arguments

ESM.modeling.output

BIOMOD.formated.data object returned by ecospat.ESM.Modeling

ESM_EF.output

BIOMOD.formated.data object returned by ecospat.ESM.EnsembleModeling

Details

Calculates the ration between sum of weights of bivariate models where a focal variable was used and sum of weights of all bivariate models. This gives an indication on the proportional contribution of the variable in the final ensemble model. In the case of multiple methods (e.g., GLM, GAM...), the contributions are counted per method. For ensemble model, the contributions are then weighted means (based on the weighting score as chosen in ecospat.ESM.EnsembleModeling()) of single methods

Value

Returns a dataframe with contribution values (i.e. proportional contribution) by variable and model

Author(s)

Olivier Broennimann <Olivier.Broennimann@unil.ch> with contributions of Heidi Mod Heidi.mod1@gmail.com and Daniel Scherrer aniel.j.a.scherrer@gmail.com

See Also

Examples

require(biomod2)
# Loading test data
data(ecospat.testNiche.inv)
inv <- ecospat.testNiche.inv

# species occurrences
xy <- inv[,1:2]
sp_occ <- inv[11]

# env
current <- inv[3:10]

### Formating the data with the BIOMOD_FormatingData() function from the package biomod2
sp <- 1
myBiomodData <- BIOMOD_FormatingData( resp.var = as.numeric(sp_occ[,sp]),
                                      expl.var = current,
                                      resp.xy = xy,
                                      resp.name = colnames(sp_occ)[sp])

### Calibration of simple bivariate models
my.ESM <- ecospat.ESM.Modeling( data=myBiomodData,
                                models=c('GLM','RF'),
                                NbRunEval=2,
                                DataSplit=70,
                                Prevalence=0.5,
                                weighting.score=c("AUC"),
                                parallel=FALSE)  

### Evaluation and average of simple bivariate models to ESMs
my.ESM_EF <- ecospat.ESM.EnsembleModeling(my.ESM,weighting.score=c("SomersD"),threshold=0)

## get the model performance of ESMs 
my.ESM_EF$ESM.evaluations

## get the weights of the single bivariate models used to build the ESMs
my.ESM_EF$weights

## get the variable contributions of ESMs
ecospat.ESM.VarContrib(my.ESM,my.ESM_EF)

ecospat

Spatial Ecology Miscellaneous Methods

v3.2
GPL
Authors
Olivier Broennimann [cre, aut, ctb], Valeria Di Cola [aut, ctb], Blaise Petitpierre [ctb], Frank Breiner [ctb], Daniel Scherrer [ctb], Manuela D`Amen [ctb], Christophe Randin [ctb], Robin Engler [ctb], Wim Hordijk [ctb], Heidi Mod [ctb], Julien Pottier [ctb], Mirko Di Febbraro [ctb], Loic Pellissier [ctb], Dorothea Pio [ctb], Ruben Garcia Mateo [ctb], Anne Dubuis [ctb], Luigi Maiorano [ctb], Achilleas Psomas [ctb], Charlotte Ndiribe [ctb], Nicolas Salamin [ctb], Niklaus Zimmermann [ctb], Antoine Guisan [aut]
Initial release
2021-02-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.