niche.size: Calculate the size of an elliptical niche region.

View source: R/niche.size.R

niche.sizeR Documentation

Calculate the size of an elliptical niche region.

Description

Calculate the size of an elliptical niche region.

Usage

niche.size(Sigma, alpha = 0.95)

Arguments

Sigma

Variance matrix for normally distributed niche axes.

alpha

Probabilistic niche size.

Details

For a given niche region N_R, the niche size is defined as the hypervolume of this region: N_S = \int_{x \in N_R} d x.

Value

Hypervolume niche size.

Examples

# for each species, size of 95% niche region using sample variance
tapply(1:nrow(fish), fish$species, function(ind) {
  X <- fish[ind,2:4] # all measurements for given species
  Sighat <- var(X) # sample variance
  niche.size(Sigma = Sighat, alpha = .95)
})

mlysy/nicheROVER documentation built on Oct. 17, 2023, 2:21 p.m.