fwer: Calculates FWER for a given suite of tests, requirements, and...

View source: R/fwer.R

fwerR Documentation

Calculates FWER for a given suite of tests, requirements, and true probabilities (assumed to be greater than the requirements)

Description

Calculates FWER for a given suite of tests, requirements, and true probabilities (assumed to be greater than the requirements)

Usage

fwer(requirements_df, nsims = 10000, interval_type = "cp", conf.level = 0.95)

Arguments

nsims

defaults to 10000

interval_type

defaults to "cp" (Clopper-Pearson). Can be set to "ws" (Wilson-Score)

conf.level

confidence level of the two sided intervals

requirement_df

df containing the following columns: tests, n, prob, requirements

Examples

fake_data <- data.frame(
   	tests = c("Test 1", "Test 2", "NC"),
   	n = c(100, 50, 500),
   	prob = c(.992, .962, .023),
   	requirements = c(.99, .95, .04)
)
fwer(requirements_df=fake_data, nsims=10000, conf.level=.95)

njjms/nicks documentation built on May 4, 2022, 8:10 a.m.