fitSDM | R Documentation |
Fit logistic regression, random forest or Maxent models using the outputs of createPresAb and some covariates.
fitSDM(species, model, envDat, spDat, k = 5, write, outPath)
species |
String. Species name (see getSpNames). |
model |
string. One of "lr", "rf" or "max" for logistic regression, random forest or Maxent. |
envDat |
String. rasterStack object with n layers each representing a covariate. |
spDat |
String. Outputs of createPresAb for the chosen species. |
k |
Numeric. Number of folds for cross validation. Defaults to 5. |
write |
Logical. If TRUE writes results to file in outPath. |
outPath |
String. Where to store the outputs if write = TRUE. |
A list with seven elements: 1) species name; 2) number of occurrence records; 3) a model object (either of type glm for "lr" or randomForest); 4) Number of folds for validation; 5) AUC score; 6) predicted probabilities of occurrence in raster format; and 7) the data used to fit the model (a dataframe with a column for observations and further columns for the corresponding covariates).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.