View source: R/varImportance.R
varImportance | R Documentation |
Computes variable importance scores for all variables present in a maxnet model object. Scores are indicative and should be interpreted with caution as variable interaction is not considered in the computation of the scores.
varImportance(
theModel,
occSWD = NULL,
bkgSWD = NULL,
responseType = c("link", "exponential", "cloglog", "logistic"),
numReplicates = 5
)
theModel |
Object of class maxnet |
occSWD |
Data.frame. Environmental data at occurrence locations in SWD format. |
bkgSWD |
Data.frame. Background environmental data in SWD format. |
responseType |
Character. A MaxEnt response scale; one of "link", "exponential", "logistic" or "cloglog". |
numReplicates |
Integer. Number of permutations performed to compute importance. |
The method used to compute variable importance follows that used in R packages biomod2 and ecospat. First, model predictions are made for each row of the combined environmental data table formed by stacking occSWD and bkgSWD. This is the reference or full-model result.
For each variable in the maxnet model object, values for the variable are permuted between rows and a model prediction made for each row using the permuted or shuffled data table. The permutation is performed numReplicates times for each variable.
At each permutation, a Pearson correlation is computed between reference predictions and the predicted values from the shuffled table. The importance score is 1 - correlation coefficient.
A vector of mean scores for each variable expressed as a percentage of the sum of all mean scores is returned.
A named vector of percent importance scores for the variables present in the maxnet model object sorted from highest to lowest.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.