Calculate replication rate between two studies

get_replication_rate(dat, x, y, alpha = 0.05)

Arguments

dat

A data.table containing p-values from two studies.

x

The column name of the first study's p-values.

y

The column name of the second study's p-values.

alpha

Significance threshold for determining replication.

Value

A list with replication rates from study A to B, B to A, and symmetric replication rate.

Examples

dat <- data.table::data.table(
  q_DescartesHuman = c(0.01, 0.2, 0.03, 0.5, 0.04),
  q_HumanCellLandscape = c(0.02, 0.03, 0.2, 0.6, 0.01)
)
replication_rates <- get_replication_rate(dat,
x="q_DescartesHuman", y="q_HumanCellLandscape",
)
print(replication_rates)
#> $RR_A_to_B
#> [1] 0.6666667
#> 
#> $RR_B_to_A
#> [1] 0.6666667
#> 
#> $RR_sym
#> [1] 0.6666667
#>