jackknife | R Documentation |
The Jackknife function providing a detailed reflection of the impact of each variable on the overall model, considering four difference measures: ROC-AUC, TSS, AICc, and Deviance.
jackknife(data, dependent, independent, user_formula = NULL, cv = 3,
response_type = "l", weights = NULL)
data |
data.frame or matrix of data to be used in model calibration. Columns represent dependent and independent variables. |
dependent |
(character) name of dependent variable. |
independent |
(character) vector of name(s) of independent variable(s). |
user_formula |
(character) custom formula to test. Default = NULL. |
cv |
(numeric) number of folds to use for k-fold cross-validation exercises. Default = 3. |
response_type |
(character) a character string that must contain "l", "p", "q" or a combination of them. l = lineal, q = quadratic, p = interaction between two variables. Default = "l". |
weights |
(numeric) a vector with the weights for observations. |
list including model performance metrics (ROC-AUC, TSS, AICc, and deviance) for the complete model, model performance when excluding a specific predictor, and the independent contribution of that predictor to the model.
# Load data
data("enm_data", package = "enmpa")
jk <- jackknife(data = enm_data,
dependent = "Sp",
independent = c("bio_1", "bio_12"),
user_formula = NULL,
cv = 3, response_type = "lpq")
jk
# plot JK's results
plot_jk(jk, metric = "TSS")
plot_jk(jk, metric = "ROC_AUC")
plot_jk(jk, metric = "AIC")
plot_jk(jk, metric = "Residual_deviance")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.