fdr_est: A function to compute the estimated pointwise FDR for every...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/fdr_est.R

Description

A function to compute the estimated pointwise FDR based on the proposed joint significance mixture null method (JS-mixture).

Usage

1
fdr_est(alpha00, alpha01, alpha10, alpha1, alpha2, input_pvalues, exact = 0)

Arguments

alpha00

A numeric number represents the proportion of null H_{00}

alpha01

A numeric number represents the proportion of null H_{01}

alpha10

A numeric number represents the proportion of null H_{10}

alpha1

A numeric number represents the proportion of null alpha=0

alpha2

A numeric number represents the proportion of null beta=0

input_pvalues

A matrix contains two columns of p-values for candidate mediators. Column 1 is the p-value of testing if an exposure is associated with the mediator (alpha!=0). Column 2 is the p-value of testing if a mediator is associated with the outcome adjusted for the exposure (beta!=0)

exact

The option to choose from two methods. exact=0: approximation without estimating the CDFs; exact=1: estimate the CDFs nonparametrically

Details

A function to estimate the pointwise FDR based on the proposed method to estimate the mixture null distribution. See Dai et al (2020) for details of how to compute quantiles using the approximation method (exact=0) or the exact method (exact=1).

Value

The estimated pointwise FDR for p-max

Author(s)

James Y. Dai and X. Wang

References

James Y. Dai, Janet L. Stanford, Michael LeBlanc. A multiple-testing procedure for high-dimensional mediation hypotheses, Journal of the American Statistical Association, 2020, DOI: 10.1080/01621459.2020.1765785.

Examples

1
2
3
4
5
6
7
8
data(snp_input)
input_pvalues <- snp_input
#To save time for illustration, we use 10 percent of rows
input_pvalues <- input_pvalues[sample(1:nrow(input_pvalues),size=ceiling(nrow(input_pvalues)/10)),]

nullprop <- null_estimation(input_pvalues)
fdr <- fdr_est(nullprop$alpha00,nullprop$alpha01,nullprop$alpha10,
               nullprop$alpha1,nullprop$alpha2,input_pvalues,exact=0)

HDMT documentation built on Jan. 30, 2022, 1:07 a.m.

Related to fdr_est in HDMT...