dot-getCutoff: Find cutoff to transform abundance values into binary values

.getCutoffR Documentation

Find cutoff to transform abundance values into binary values

Description

This function finds the best cutoff to transform abundance values into binary values while optimising sensitivity and specificity values based on observations

Usage

.getCutoff(Obs, Fit)

Arguments

Obs

a vector containing binary observed values (0 or 1)

Fit

a vector containing relative abundance values (between 0 and 1)

Author(s)

Damien Georges

Examples


vec.obs = c(rep(0, 60), rep(1, 40))
vec.pred = c(sample(x = seq(0, 0.2, 0.01), size = 50, replace = TRUE)
             , sample(x = seq(0.15, 1, 0.01), size = 50, replace = TRUE))
## plot(vec.obs, vec.pred)

cutoff = .getCutoff(Obs = vec.obs, Fit = vec.pred)
str(cutoff)


leca-dev/RFate documentation built on Sept. 19, 2024, 6:09 a.m.