Learn R Programming

pweight (version 0.0.1)

bayes_weights: Bayes p-value weights

Description

Computes the optimal Bayes p-value weights for multiple testing. Given estimated means mu and standard errors sigma of test statistics T, the weighting scheme optimizes the expected number of discoveries using T as test statistics in multiple testing at some specific level q.

Usage

bayes_weights(mu, sigma, q)

Arguments

mu
the estimated means, a vector of length J.
sigma
the standard errors, a positive vector of length J
q
level at which tests will be performed

Value

A list containing:w - the optimal Bayes weights;lambda - the dual certificate, normalizing constant produced by solving the optimization problem;q_star - true value of q solved for;q_threshold - maximal value of q for which problem can be solve exactly;

Details

Specifically, it is assumed that T are Gaussian with mean eta. One-sided tests of eta>=0 against eta<0< code=""> are conducted using the test statistics T. To optimize power, different levels are allocated to different tests. This is based on the prior information about eta in mu,sigma

For more details, see the paper "Optimal Multiple Testing Under a Gaussian Prior on the Effect Sizes", by Dobriban, Fortney, Kim and Owen, http://arxiv.org/abs/1504.02935

See Also

Other p.value.weighting: exp_weights; iGWAS; spjotvoll_weights

Examples

Run this code
J <- 100
mu <- rnorm(J)
sigma <- 1 * rep(1, J)
q <- 0.05 / J
res <- bayes_weights(mu, sigma, q)

Run the code above in your browser using DataLab