Description Usage Arguments Details Value Examples
Returns the model, the performance metrics, and/or distribution maps depending on arguments.
1 2 3 4 5 6 | model(data, method, responsetype, response, predictors, secondary = NULL,
enviStack = NULL, enviPix = NULL, seed = NULL, aggregated = NULL,
pseudoabsence = NULL, gbm.trees = 2000,
maxargs = c("outputformat=logistic", "defaultprevalence=0.5"),
model = FALSE, prediction = FALSE, flat = FALSE, moran = FALSE,
rast = TRUE, rast.occ = TRUE, ...)
|
data |
|
method |
SDM methos used: "gam", "rf", "gbm", "max", or "gbm.step". See details for details |
responsetype |
Type of the response: "count", "continuous", or "presence". Presence denotes bimodal responses [0|1] |
response |
Column name of response in data argument |
predictors |
Column names of predictors to use in data argument |
secondary |
Column name in data. Use this to calculate model performance metrics from instead of response. Default is NULL. |
enviStack |
|
enviPix |
|
seed |
Integer. For reproduceability. |
aggregated |
logical or |
pseudoabsence |
logical or |
gbm.trees |
gbm.trees param for dismo::gbm |
maxargs |
argument to pass tp maxent |
model |
|
prediction |
return ONLY the prediction. Default is |
flat |
return model performance metrics only (as |
moran |
add spatial autocorrelation metric to model metric. Default is |
rast |
return |
rast.occ |
additionally adds bimodal occurence map. see details for threshold calculation. |
... |
ellipsis is used to pass arguments to subsequent functions like |
SDM methos used are "gam", "rf", "gbm", "max", or "gbm.step".
If you want spatial autocorrelation metrics you probably need to pass additional arguments to moranii
.
Note that calculations may take very long depending on number of points and parametrization.
enviStack
and enviPix
are the same in different data types.
It is sufficient if you supply only oneāthe other will be generated.
For big data sets and repetitive tasks it may be worthwhile to pass both to increase performance
A model
, or a data.frame
or a list
depending on arguments
1 2 3 4 5 6 7 8 | data<-get.environ(species,deutschebucht)
mo<-model(data=data,method="rf",responsetype = "continuous", response = "species1", predictors = c("mgs","mud","depth"),enviStack = deutschebucht, model=TRUE)
qqplot(data$species1,mo$predicted)
mo<-model(data=data,method="rf",responsetype = "continuous", response = "species1", predictors = c("mgs","mud","depth"),enviStack = deutschebucht, rast=TRUE)
par(mfrow=c(1,2))
plot(mo$raster$full,main="prediction")
plot(raster(deutschebucht,layer=match("species1",names(deutschebucht))),main="true distribution")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.