knitr::opts_chunk$set( collapse = FALSE, comment = ">", fig.path = "README-" )
Given p-values from two independent studies with multiple endpoints (features), the functions in the package return the adjusted p-values for false discovery rate control on replicability claims.
In replicability analysis we seek to reject the null hypothesis of no replicability in favor of the alternative hypothesis of replicability: that the finding replicated across the studies.
We do so by testing for signal in both studies. This is in contrast to a typical meta-analysis, where the test can also reject when only a single study has signal.
The procedures implemented in the functions compute the adjusted p-values for FDR control on replicability claims. By declaring as replicability discoveries the features with adjusted p-values (termed r-values) below the desired nominal level (e.g., 0.05), the FDR on replicability claims is controlled at the nominal level. See Bogomolov and Heller (2013), Heller, Bogomolov and Benjamini (2014), and Bogomolov and Heller (2018) for details.
The function radjust_sym should be used for replicability analysis of two independent studies, each examining multiple features. The features for replicability are first selected in each study separately based on the results of that study.
The function radjust_pf should be used for replicability analysis of a primary study and an independent follow-up study, where the features in the follow-up study are selected from the primary study.
Using radjust_sym:
library(radjust) ## transform the example two-sided p-values to one-sided in the same direction (left): ## (we use the direction of the test statistic to do so and assume that it is continuous) pv1 <- ifelse(mice$dir_is_left1, mice$twosided_pv1/2, 1-mice$twosided_pv1/2) pv2 <- ifelse(mice$dir_is_left2, mice$twosided_pv2/2, 1-mice$twosided_pv2/2) radjust_sym(pv1, pv2, input_type = "all", directional_rep_claim = TRUE, variant = "adaptive", alpha=0.05)
Primary and follow-up studies (radjust_pf):
rv <- radjust_pf(pv1 = crohn$pv1, pv2 = crohn$pv1, m = 635547) head(rv)
You can install radjust from github with:
# install.packages("devtools") devtools::install_github("shay-y/radjust")
Use the citation() R function:
citation("radjust")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.