varImportance: variable importance

Description Usage Arguments Details Author(s) References Examples

Description

Calculates relative importance of different variables in the models using several approaches.

Usage

1
getVarImp(x,id,wtest,...)

Arguments

x

sdmModels object

id

numeric, specify the model (modelID) for which the variable importance values are extracted

wtest

specifies which dataset ('training','test.dep','test.indep') should be used (if exist) to calculate the importance of variables

...

additional arguments as for getModelId function

Details

getVarImp function returns an object including different measures of variable importance, and if be put in plot function, a barplot is generated. If the ggplot2 package is installed on your machine, the plot is generated using ggplot (unless you turn gg = FALSE), otherwise, the standard barplot is used.

Author(s)

Babak Naimi naimi.b@gmail.com

http://r-gis.net

http://biogeoinformatics.org

References

Naimi, B., Araujo, M.B. (2016) sdm: a reproducible and extensible R platform for species distribution modelling, Ecography, DOI: 10.1111/ecog.01881

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
## Not run: 
# if m is a sdmModels object (output of the sdm function) then:

getVarImp(m,id=1,wtest='training') # variable importance based on training dataset

vi <- getVarImp(m,id=1,wtest='test.dep') 

vi

plot(vi,'auc')

plot(vi,'cor')
#############
# You can get Mean variable importance (and confidence interval) for multiple models:

vi <- getVarImp(m,id=1:10,wtest='test.dep') # specify the modelIDs of the models

vi

plot(vi,'cor')

# you can use the getModelId function to find the id of the specific method, replication, etc.
# or you may put the arguments of the getModelId in the getVarImp function:

vi <- getVarImp(m, method='glm') # Mean variable importance for the method glm

vi

plot(vi)

plot(vi, gg = F) # R standard plot is used instead of ggplot



## End(Not run)

sdm documentation built on April 30, 2020, 1:04 a.m.