ellipsoid_suitability: Suitability model based on Mahalanobis distance to niche...

View source: R/ellipsoid_suitability.R

ellipsoid_suitabilityR Documentation

Suitability model based on Mahalanobis distance to niche centroid

Description

ellipsoid_suitability produces a model of environmental suitability based on the environmental Mahalanobis distance to the centriod of the environmental values characterized by species occurrences.

Usage

ellipsoid_suitability(data, variables, suitability_threshold = 5,
                      project = FALSE, projection_variables,
                      tolerance = 1e-60)

Arguments

data

a numerical matrix containing geographic coordinates of species occurrences to be used; columns must be: longitude and latitude.

variables

a SpatRaster of variables representing the environmental conditions in the area of interest.

suitability_threshold

(numeric) value (percentage) to be used as threshold; default = 5.

project

(logical) whether or not to project the model to other scenario(s). If TRUE, argument projection_variables must be defined. Default = FALSE.

projection_variables

a SpatRaster (if only one scenario) or named list of SpatRaster objects (if more than one scenario) with variables representing the environmental conditions of scenarios to transfer the model to. Variable names must match between initial and projection scenarios.

tolerance

the tolerance for detecting linear dependencies. Default = 1e-60.

Details

Distance used for creating the model is Mahalanobis distance. All values outside the ellipsoid produced using the centroid and covariance matrix derived from environmental values in data, and the value in suitability_threshold will be zero.

Values in maps (from 0 to 1) can be interpreted as suitability.

Value

A list containing:

  • occurrences (geographic coordinates and environmental values)

  • niche centroid

  • covariance matrix

  • proportion of suitable areas in environmental and geographic space

  • suitability SpatRaster if projection_variables is a SpatRaster or list of suitability SpatRaster(s) if projection_variables is a list


fmachados/grinnell documentation built on Jan. 29, 2024, 6:48 p.m.