Giter Club home page Giter Club logo

independenthypothesisweighting.jl's Introduction

IndependentHypothesisWeighting

Build Status Coverage

This package provides a preliminary implementation of the Independent Hypothesis Weighting method for multiple testing with side-information, as described in:

Ignatiadis N, Huber W (2021). “Covariate powered cross-weighted multiple testing.” Journal of the Royal Statistical Society: Series B (Statistical Methodology), 83: 720-751.

Ignatiadis N, Klaus B, Zaugg J, Huber W (2016). “Data-driven hypothesis weighting increases detection power in genome-scale multiple testing.” Nature Methods. doi: 10.1038/nmeth.3885, 13: 577–580.

This package is work in progress, so that we currently recommend using the R package IHW, which is available on Bioconductor. Also please see the MultipleTesting.jl package that provides methods for multiple testing without side-information (here we build upon the interface defined in MultipleTesting.jl).

Example Usage

Load packages:

using Distributions
using IndependentHypothesisWeighting
using Random
using StatsBase

Generate synthetic data: 10,000 p-values that can be partitioned into two groups, as encoded by the side-information Xs.

Random.seed!(1)
Xs = CategoricalVector(sample(1:2, 10000))
Ps = rand(BetaUniformMixtureModel(0.7, 0.2), 10000) .* (Xs.==1) .+ rand(Uniform(), 10000) .* (Xs.==2) 

Suppose we seek to control the false discovery rate at 10%. As a baseline, that does not use the grouping side-information, we may run the Benjamini-Hochberg procedure:

α = 0.1
sum(adjust(Ps, BenjaminiHochberg()) .<= α ) # 580 discoveries

580 p-values are significant. Let us run Independent Hypothesis Weighting (IHW) with the grouping side-information:

ihw_grenander = IHW(weight_learner = GrenanderLearner(), α = α)
ihw_grenander_fit = fit(ihw_grenander, Ps, Xs)
sum(adjust(ihw_grenander_fit) .<= α) # 677 discoveries

IHW increased the significant discoveries to 677.

independenthypothesisweighting.jl's People

Contributors

nignatiadis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

fridljda

independenthypothesisweighting.jl's Issues

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.