Species distribution modeling with k-fold cross validation. Algorithms supported are "glm", "svm", "maxent", "mars", "rf", "cart.rpart" and "cart.tree"
modelo(kdata, data, algorithm = c("glm", "svm", "maxent", "mars", "rf",
"cart.rpart", "cart.tree"), algorithm.args = NULL, weighting = FALSE,
threshold = NULL, tuneRF.args = NULL)
Object returned by function leaveOneOut
Object returned by function biomat. 2D matrix with the dependent variable (presence/absence) in the first column and the independent variables in the rest (extracted from varstack)
Any character of the following: "glm"
, "svm", "maxent", "mars", "rf", "cart.rpart"
or "cart.tree"
Further arguments to be passed to the selected algorithm for modeling (functions involved are described in details)
Logical for model fitting with weighted presence/absences-s. Applicable for algorithms "glm", "mars", "rf" and "cart.rpart". Default is FALSE.
Cut value between 0 and 1 to calculate the confusion matrix. Default is 0.5.
list of arguments from function tuneRF
. Only used when algorihm = "rf"
A list with six components:
fitted model using all data for training
AUC statistic in the cross validation
kappa statistic in the cross validation
true skill statistic in the cross validation
fitted model with partitioned data
cross model prediction
This function calculates the AUC with the function "auc" from package "PresenceAbsence". Package SDMTools must be detached.