if (FALSE) {
# 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
}
Run the code above in your browser using DataLab