predict_esuitability: Predict suitability based on Mahalanobis distance to niche...

View source: R/ellipsoid_suitability.R

predict_esuitabilityR Documentation

Predict suitability based on Mahalanobis distance to niche centroid

Description

predict_esuitability predicts a SpatRaster of environmental suitability based on Mahalanobis distances to a niche centroid and a covariance matrix.

Usage

predict_esuitability(ellipsoid_model = NULL, centroid = NULL,
                     covariance_matrix = NULL, variables,
                     suitability_threshold = 5, tolerance = 1e-60)

Arguments

ellipsoid_model

object produced with the function ellipsoid_suitability. If defined, arguments centroid and covariance_matrix are not used. Default = NULL. This argument can be overlooked if centroid and covariance_matrix are defined.

centroid

centroid from which distances are measured in variables. The length and variables of centroid must correspond with those of layers in variables. Ignored if ellipsoid_model is defined. Default = NULL.

covariance_matrix

covariance matrix to be used when measuring the Mahalanobis distances. Ignored if ellipsoid_model is defined. Default = NULL.

variables

a SpatRaster of variables representing the environmental conditions in the area where the model will be transferred to.

suitability_threshold

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

tolerance

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

Value

A list containing:

  • niche centroid

  • covariance matrix

  • proportion of suitable areas in environmental and geographic space

  • suitability SpatRaster


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