Description Usage Arguments Details Value References See Also Examples
Given two vectors of pvalues from two independent studies, returns the adjusted pvalues for false discovery rate control on replicability claims.
1 2 3 4 5 
pv1, pv2 
numeric vectors of pvalues. If 
w1 
fraction between zero and one, of the relative weight for the pvalues from study 1. Default value is 0.5 (see Details for other values). 
input_type 
whether 
general_dependency 

directional_rep_claim 

variant 
A character string specifying the chosen variant for a potential increase in the number of discoveries.
Must be one of 
alpha 
The threshold on pvalues for selecting the features in each study and the significance level for replicability analysis (see Details). 
For FDR control at level α on replicability claims, all features with rvalue at most α are declared as replicated. In addition, the discoveries from study 1 among the replicability claims have an FDR control guarantee at level w1 * α. Similarly, the discoveries from study 2 among the replicability claims have an FDR control guarantee at level (1w1) * α.
Setting w1
to a value different than half is appropriate for stricter FDR control in one of the studies.
For example, if study two has a much larger sample size than study one (and both studies examine the same problem), then
setting w1 > 0.5 will provide a stricter FDR control for the larger study and greater power for the replicability analysis,
see Bogomolov and Heller (2018) for details.
The theoretical FDR control guarantees assume independence within each vector of pvalues. However, empirical
investigations suggest that the method is robust to deviations from independence. In practice, we recommend using it whenever the
BenjaminiHochberg procedure is appropriate for use with single studies, as this procedure can be viewed as a twodimensional
BenjaminiHochberg procedure which enjoys similar robustness properties. For general dependence, we provide the option to apply
a more conservative procedure with theoretical FDR control guarantee for any type of dependence,
by setting general_dependency
to TRUE.
If variant
is "nonadaptive"
, then the nonadaptive replicability analysis procedure of Bogomolov and Heller (2018)
is applied on the input pvalues pv1
and pv2
.
If variant
is "nonadaptivewithalphaselection"
, then for a user specified alpha
(default 0.05) only pvalues from
study one below w1 * α and from study
two below (1w1) * α are considered for replicability analysis. This additional step prevents
including in the selected sets features that cannot be discovered as replicability claims at the nominal FDR level
α, thus reducing the multiplicity adjustment necessary for replicability analysis. If variant
is "adaptive"
, then for a user specified alpha
the adaptive replicability analysis procedure is applied on the dataset, see Bogomolov and Heller (2018) for details.
The meaning of the replicability claim for a feature if directional_rep_claim
is FALSE
, is that both null hypotheses are false (or both alternatives are true). Setting directional_rep_claim
to
TRUE
is useful if the discoveries of interest are directional but the direction is unknown. For example, a directional replicability
claim for a feature is the claim that both associations examined for it are positive, or both associations examined for it
are negative, but not that one association is positive and the other negative. For directional replicability analysis,
the input pvalues pv1
and pv2
should be the leftsided input pvalues
(leftsided is the choice without loss of generality, since we assume the left and right sided pvalues sum to one for each null hypothesis).
The function returns a list with the following elements:
call  the function call. 
inputs  a list with the function's input parameters (except pv1 and pv2 ). 
results_table  a data frame with the features selected in both studies and their rvalues (see description below). 
selected1  the features selected in study 1 (when the variant is either "adaptive" or "nonadaptivewithalphaselection" ). 
selected2  the features selected in study 2, same as above. 
n_selected1  the number of selected features in study 1. 
n_selected2  the number of selected features in study 2. 
pi1  the estimate of the truenulls fraction in the study 1 among the selected in study 2, when variant = "adaptive" . 
pi2  the estimate of the truenulls fraction in the study 2 among the selected in study 1, when variant = "adaptive" .

The third element in the list, results_table
, includes the following columns:
name  char.  the name of the feature as extracted from the named vectors, or the location, if the input vectors are not named. 
p.value.1  numeric  the onesided pvalue from study 1 as inputed (denoted by pv1 ). When directional_rep_claim==TRUE the onesided pvalues in the direction of effect are presented (i.e, min(pv1,1pv1) ). 
p.value.2  numeric  the onesided pvalue from study 2 as inputed (denoted by pv2 ). When directional_rep_claim==TRUE the onesided pvalues in the direction of effect are presented (i.e, min(pv2,1pv2) ). 
r.value  numeric  the replicability adjusted pvalue (= rvalue). 
Direction  char.  the direction of the replicability claim, when directional_rep_claim = TRUE . 
Significant  char.  indicates for which features replicability claims can be made at level α, when variant is set to "adaptive" or "nonadaptivewithalphaselection" .

Bogomolov, M. and Heller, R. (2018). Assessing replicability of findings across two studies of multiple features. Biometrika.
radjust_pf
for replicability analysis in primary and followup studies.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  data(mice)
## transform the twosided pvalues to onesided 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, 1mice$twosided_pv1/2)
pv2 < ifelse(mice$dir_is_left2, mice$twosided_pv2/2, 1mice$twosided_pv2/2)
## run the examples as in the article:
mice_rv_adaptive < radjust_sym(pv1, pv2, input_type = "all", directional_rep_claim = TRUE,
variant = "adaptive", alpha=0.05)
print(mice_rv_adaptive)
mice_rv_non_adpt_sel < radjust_sym(pv1, pv2, input_type = "all", directional_rep_claim = TRUE,
variant = "nonadaptivewithalphaselection", alpha=0.05)
print(mice_rv_non_adpt_sel)
mice_rv_non_adpt < radjust_sym(pv1, pv2, input_type = "selected", directional_rep_claim = TRUE,
variant = "nonadaptive")
print(mice_rv_non_adpt)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.