FEE0_eCDF: Create empirical cumulative distribution function of FEE0

Description Usage Arguments Value Examples

View source: R/fee_ind.R

Description

Use null model approach to generate empirical cumulative distribution function (eCDF) of FEE0.

Usage

1
2
3
4
5
6
FEE0_eCDF(
  num_species,
  num_traits,
  dis_metric = c("euclidean", "manhattan"),
  pool_traits = NULL
)

Arguments

num_species

integer; number of species.

num_traits

integer; number of traits (i.e., dimension of the trait space).

dis_metric

string specifying the scheme of quantifying species dissimilarity in trait space. The currently available options are "euclidean" (the default) and "manhattan". Euclidean distances are root sum-of-squares of differences, and manhattan distances are the sum of absolute differences.

pool_traits

a matrix (or data frame) of numeric functional traits for species pool. Columns are for different traits and rows are for different species in the species pool. If pool_traits is NULL, the calculation is then under the assumption of no prior knowledge of trait values (i.e., uniform distribution of trait values).

Value

The eCDF of FEE0, used to transfer FEE0 metric to FEE index

Examples

1
2
3
4
5
6
7
d_trait <- cbind(tr1 = rnorm(10, 0, 1), tr2 = rnorm(10, 3, 2))
ecdf1 <- FEE0_eCDF(3, 4)
ecdf1(1.5)
ecdf2 <- FEE0_eCDF(9, 2, pool_traits = d_trait)
ecdf3 <- FEE0_eCDF(9, 2)
ecdf2(1.5)
ecdf3(1.5)

tz05/FEE documentation built on Dec. 23, 2021, 1:03 p.m.

Related to FEE0_eCDF in tz05/FEE...