Learn R Programming

intSDM

The goal of intSDM is to assist users in creating a reproducible workflow for large-scale integrated species distribution models (ISDM). The package does this by providing the tools and functions to obtain species’ occurrence data from GBIF and environmental covariates from WorldClim, specify the components of an ISDM, estimate the model, and produce useful outputs. The package estimates the ISDM using a Bayesian framework with the integrated nested Laplace approximation method, which is computationally efficient in comparison to MCMC methods. Furthermore, the package builds wrapper functions around inlabru and PointedSDMs, two R packages designed to simplify modelling spatial processes and integrated species distribution models respectively. As a result, good knowledge of both these packages is required before using intSDM.

The outputs of the model are objects which are typically useful in species distribution modelling analyses. These include: models, predictions, maps of predictions and cross-validation scores. The default of intSDM is to produce single-species models and outputs; however the package does also allow multi-species models to assist the user in obtaining estimates of species richness.

Installation

You can install the development version of this package from GitHub with:

#install.packages('devtools')
devtools::install_github("PhilipMostert/intSDM")

or directly through CRAN:

install.packages('intSDM')

Functionality

The package contains two main functions: startWorkflow which initializes the workflow, and sdmWorkflow, which estimates one of the specified outcomes of the workflow. startWorkflow produces an R6, which has a multitude of different slot functions to help customize the workflow. These include:

Function nameFunction use
.$plot()Plot data and other objects required for the model.
.$addStructured()Add data not available on GBIF.
.$addMesh()Create an inla.mesh object.
.$addGBIF()Add data from GBIF.
.$addArea()Specify sampling domain.
.$addCovariates()Add spatial covariates.
.$crossValidation()Specify the cross-validation method.
.$modelOptions()Add R-INLA, inlabru and PointedSDMs options.
.$specifySpatial()Add penalizing complexity priors to the spatial effects.
.$biasFields()Specify an additional spatial effect for a dataset.
.$workflowOutput()Specify the output of the workflow.
.$specifyPriors()Specify the priors of the model.
.$modelFormulaAdd a formula for the covariates and bias of the model.
.$obtainMeta()Obtain metadata for the occurrence records.

Documentation and examples for each of these slot functions may easily be obtained using .$help().

Examples of the package being used is provided as vignettes within the package.

Copy Link

Version

Install

install.packages('intSDM')

Monthly Downloads

273

Version

2.1.1

License

GPL (>= 3)

Maintainer

Philip Mostert

Last Published

January 13th, 2025

Functions in intSDM (2.1.1)

formatStructured

formatStructured: Function to add structured data into the workflow.
initValues

initValues: Function to obtain initial values from a intModel object.
startWorkflow

startWorkflow: function to commence the integrated species distribution model workflow.
obtainArea

obtainArea: Function to obtain a boundry for a specified country.
obtainCovariate

obtainCovariate: Function to obtain a covariate later for a specified country.
generateAbsences

Function to generate absences for data that comes from checklist data.
species_model

R6 class for creating a species_model object.
obtainRichness

obtainRichness: Function to obtain richness estimates from a fitISDM object.
sdmWorkflow

sdmWorkflow: Function to compile the reproducible workflow.
obtainGBIF

obtainGBIF: Function to obtain occurrence data from GBIF.