corihw: corihw: Main function for Independent Hypothesis Weighting...

Description Usage Arguments Value

View source: R/corihw.R

Description

Given a vector of p-values, a vector of covariates which are independent of the p-values under the null hypothesis, a matrix Sigma of the correlation of the test statistics and a nominal significance level alpha, IHW Cor learns multiple testing weights and then applies the weighted Bonferroni) procedure.

Usage

1
2
3
corihw(pvalues, covariates, alpha, nbins = "auto", quiet = TRUE,
  nfolds = 5, lambda = 1, seed = 1L, Sigma = NULL,
  methods = "CorIHW", linear_approx = TRUE)

Arguments

pvalues

Numeric vector of unadjusted p-values.

covariates

Vector which contains the one-dimensional covariates (independent under the H0 of the p-value) for each test. Assumed continuous.

alpha

Numeric, sets the nominal level for FWER control.

nbins

Integer, number of groups into which p-values will be split based on covariate. Use "auto" for automatic selection of the number of bins. Only applicable when covariates is not a factor.

quiet

Boolean, if False a lot of messages are printed during the fitting stages.

nfolds

Number of folds into which the p-values will be split for the pre-validation procedure

lambda

A regularization constant

seed

Integer or NULL. Split of hypotheses into folds is done randomly. To have the output of the function be reproducible, the seed of the random number generator is set to this value at the start of the function. Use NULL if you don't want to set the seed.

Sigma

A sparse mxm corrolation matrix

methods

a vector that includes at least one of "IHW", CorIHW", or "M-effective"

linear_approx

A flag to perform CorIHW using linear approximation. This is a much faster procedure which yields similar results.

Value

A data frame with the weights and a rejection flag per observation


yairgoldy/corihw documentation built on Sept. 10, 2020, 11:33 p.m.