Code Monkey home page Code Monkey logo

dbhsample's Introduction

dbh

An R package for the dependent-adjusted Benjamini-Hochberg and step-up procedures

Overview

This R package implements the dependent-adjusted Benjamini-Hochberg procedure, Benjamini-Yekutieli procedure, and step-up procedures for parametric and non-parametric multiple testing problems with exact false discovery rate control. The procedures are proposed in our paper: Conditional calibration for false discovery rate control under dependence. The current version supports one- and two-sided tests on multivariate z-statistics (dBH_mvgauss), multivariate t-statistis (dBH_mvt), and fixed-design homoscedastic Gaussian linear models (dBH_lm). The procedures for other problems will be added in the future versions.

Installation

if (!require("devtools")){
    install.packages("devtools")
}
devtools::install_github("lihualei71/dbh")

Usage Examples

We illustrate the usage of dBH_mvgauss below. For details please read the manual.

library(dbh)

## basic example code
# Generate mu and Sigma for an AR process
n <- 100
rho <- 0.8
Sigma <- rho^(abs(outer(1:n, 1:n, "-")))
mu1 <- 2.5
nalt <- 10
mu <- c(rep(mu1, nalt), rep(0, n - nalt))

# Generate the z-values
set.seed(1)
zvals <- rep(NA, n)
zvals[1] <- rnorm(1)
for (i in 2:n){
    zvals[i] <- zvals[i - 1] * rho + rnorm(1) * sqrt(1 - rho^2)
}
zvals <- zvals + mu

# Run dBH_1(\alpha) for one-sided tests
alpha <- 0.05
res <- dBH_mvgauss(zvals = zvals, Sigma = Sigma, side = "right", alpha = alpha,
                   gamma = 1, niter = 1, avals_type = "BH")

# Run dBH_1(\alpha) for two-sided tests
res <- dBH_mvgauss(zvals = zvals, Sigma = Sigma, side = "right", alpha = alpha,
                   gamma = 1, niter = 1, avals_type = "BH") 

dbhsample's People

Contributors

lihualei71 avatar yixiangluo avatar

Watchers

James Cloos avatar

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.