modelo: Species distribution modeling and cross validation

Description Usage Arguments Details Value Author(s)

View source: R/mopaTrain.R

Description

Species distribution modeling with k-fold cross validation. Algorithms supported are "glm", "svm", "maxent", "mars", "rf", "cart.rpart" and "cart.tree"

Usage

1
2
3
modelo(kdata, data, algorithm = c("glm", "svm", "maxent", "mars", "rf",
  "cart.rpart", "cart.tree"), algorithm.args = NULL, weighting = FALSE,
  threshold = NULL, tuneRF.args = NULL)

Arguments

kdata

Object returned by function leaveOneOut

data

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)

algorithm

Any character of the following: "glm", "svm", "maxent", "mars", "rf", "cart.rpart" or "cart.tree"

algorithm.args

Further arguments to be passed to the selected algorithm for modeling (functions involved are described in details)

weighting

Logical for model fitting with weighted presence/absences-s. Applicable for algorithms "glm", "mars", "rf" and "cart.rpart". Default is FALSE.

threshold

Cut value between 0 and 1 to calculate the confusion matrix. Default is 0.5.

tuneRF.args

list of arguments from function tuneRF. Only used when algorihm = "rf"

Details

This function calculates the AUC with the function "auc" from package "PresenceAbsence". Package SDMTools must be detached.

Value

A list with six components:

model

fitted model using all data for training

auc

AUC statistic in the cross validation

kappa

kappa statistic in the cross validation

tss

true skill statistic in the cross validation

fold.models

fitted model with partitioned data

ObsPred

cross model prediction

Author(s)

M. Iturbide


mopa documentation built on May 2, 2019, 6:47 a.m.

Related to modelo in mopa...