Learn R Programming

TMTI (version 1.0.1)

kFWER_TMTI: kFWER_TMTI. Computes the largest rejection set possible with kFWER control.

Description

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

Usage

kFWER_TMTI(
  pvals,
  k,
  alpha = 0.05,
  B = 1000,
  gammaList = NULL,
  tau = NULL,
  K = NULL,
  verbose = FALSE
)

Value

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

Arguments

pvals

A vector p-values.

k

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

alpha

Significance level.

B

Number of bootstrap replications if gamma needs to be approximated. Not used if specifying a list of functions using the gammaList argument or if length(pvals) <= 100. Defaults to 1000.

gammaList

A list of pre-specified gamma functions. If NULL, gamma functions will be approximated via bootstrap, assuming independence. Defaults to NULL.

tau

Numerical (in (0,1)); threshold to use in tTMTI. If set to NULL, then either TMTI (default) or rtTMTI is used.

K

Integer; Number of smallest p-values to use in rtTMTI. If se to NULL, then either TMTI (default) or tTMTI is used.

verbose

Logical, indicating whether or not to print progress.

Examples

Run this code
nfalse = 50
m = 100
pvals = c (
  sort(runif(nfalse, 0, 0.05 / m)),
  sort(runif(m - nfalse, 0.1, 1))
)
kFWER_TMTI (
  pvals = pvals,
  k = 5,
  alpha = 0.05,
  verbose = FALSE
)

Run the code above in your browser using DataLab