calculateRIVPACSMetrics: Calculate RIVPACS metrics

View source: R/predict.R

calculateRIVPACSMetricsR Documentation

Calculate RIVPACS metrics

Description

This function calculates the observed-expected ratio for both the RIVPACS model and a null model. In addition, the Bray-Curtis metric of taxonomic dissimilarity are calculated.

Usage

calculateRIVPACSMetrics(O, E, N, cutoff = 0.5)

Arguments

O

the observed occurrence matrix

E

a matrix of expected probabilities for the RIVPACS model

N

a matrix of expected probabilities for the null model

cutoff

a cutoff value to remove rare speces; species with an expected model probability of less than this value are removed.

Examples

x <- matrix(rbinom(100, size = 1, prob = 0.5), ncol = 10)
y <- matrix(c(0.1,0.8,0.9,0.2), ncol = 2)
group <- rep(1:2, each = 5)
E <- calculateExpected(y, x, group)
N <- calculateNullExpected(x)
z <- matrix(rbinom(20, size = 1, prob = 0.5), ncol = 10)
calculateRIVPACSMetrics(z, E, N)

jasonelaw/RIVPACS documentation built on Sept. 27, 2022, 6:34 p.m.