kFWER_LocalTest: kFWER_LocalTest. Computes the largest rejection set possible...

kFWER_LocalTestR Documentation

kFWER_LocalTest. Computes the largest rejection set possible with kFWER control.

Description

kFWER_LocalTest. Computes the largest rejection set possible with kFWER control.

Usage

kFWER_LocalTest(LocalTest, pvals, k, alpha = 0.05, verbose = FALSE)

Arguments

LocalTest

A function that returns a p-value for a joint hypothesis test.

pvals

A vector p-values.

k

An integer denoting the desired k at which to control the kFWER.

alpha

Significance level.

verbose

Logical, indicating whether or not to print progress.

Value

The number of marginal hypotheses that can be rejected with kFWER control.

Examples

nfalse = 50
m = 100
pvals = c (
  sort(runif(nfalse, 0, 0.05 / m)),
  sort(runif(m - nfalse, 0.1, 1))
)
kFWER_LocalTest (
  LocalTest = function (x) min(x) * length(x),
  pvals = pvals,
  k = 5,
  alpha = 0.05,
  verbose = FALSE
)

TMTI documentation built on Aug. 10, 2022, 5:06 p.m.