j.occ: Expected value of joint occupancy for order i and its...

View source: R/J.occupancy.R

j.occR Documentation

Expected value of joint occupancy for order i and its standard deviation

Description

This function computes joint occupancy (the average number of sites harbouring a given number of i species simultaneously), and its standard deviation.

Usage

j.occ(s.data, order, metric = "raw")

Arguments

s.data

A species-by-site presence/absence matrix with entries indicating occurrence (1) and non-occurrence (0) of species in a site.

order

Specific number of species for which joint occupancy and its standard deviation is computed.

metric

The type of rescaling applied to the joint occupancy metric. Available options are: Simpson_eqn for Simpson equivalent, Sorensen_eqn for Sorensen equivalent, and raw for the raw form of index without rescaling.

Value

Returns a list with the following outputs:

jo.val

Joint occupancy value.

jo.sd

The standard deviation of jo.val.

References

Lagat, V. K., Latombe, G. and Hui, C. (2021a). A multi-species co-occurrence index to avoid type II errors in null model testing. DOI: ⁠<To be added>⁠.

Examples

ex.data <- read.csv(system.file("extdata", "274.csv", package = "msco"))
jo <- msco::j.occ(ex.data, order = 3, metric = "raw")
jo

ex.data2 <- read.csv(system.file("extdata", "65.csv", package = "msco"))
jo2 <- msco::j.occ(ex.data2, order = 3, metric = "raw")
jo2

vitaliskim/msco documentation built on Sept. 29, 2023, 9:22 p.m.