R/get_replication_rate.R
get_replication_rate.RdCalculate replication rate between two studies
get_replication_rate(dat, x, y, alpha = 0.05)A list with replication rates from study A to B, B to A, and symmetric replication rate.
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
#>