mopaTrain0: Easy species distribution modeling and cross validation

Description Usage Arguments Value Author(s) References See Also

View source: R/mopaTrain.R

Description

Species distribution modeling and k-fold cross validation for a set of presence/absence data per species, also considering different background extents (optional). Algorithms supported are "glm", "svm", "maxent", "mars", "rf", "cart.rpart" and "cart.tree"

Usage

1
2
3
4
mopaTrain0(y, x, k = 10, algorithm = c("glm", "svm", "maxent", "mars", "rf",
  "cart.rpart", "cart.tree"), algorithm.args = NULL, weighting = FALSE,
  threshold = NULL, diagrams = FALSE, tuneRF.args = NULL,
  plotnames = "unnamed")

Arguments

y

RasterStack of variables for modelling

x

Object returned by function link[mopa]{pseudoAbsences} or list/s of data frames with coordinates in the first two columns and presence/absence (1=presence, 0=absence) in the third column.

k

Integer. Number of folds for cross validation. Default is 10

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 "glm", "mars" and "rf" fitting with weighted presence/absences-s. Default is FALSE.

threshold

Cut value between 0 and 1 to calculate the confusion matrix. Default is NULL (see Details).

diagrams

logical. Only applied if x contains data for different background extents (see backgroundRadius and pseudoAbsences). Should diagrams of AUC extent fitting be printed? default is FALSE.

tuneRF.args

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

plotnames

names to be printed in the diagrams

Value

A list of six components is returned for each species in x:

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

References

Iturbide, M., Bedia, J., Herrera, S., del Hierro, O., Pinto, M., Gutierrez, J.M., 2015. A framework for species distribution modelling with improved pseudo-absence generation. Ecological Modelling. DOI:10.1016/j.ecolmodel.2015.05.018.

See Also

mopaPredict, pseudoAbsences, backgroundGrid, OCSVMprofiling, backgroundRadius


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

Related to mopaTrain0 in mopa...