hitman_replication: High-throughput approach for testing directional replication

View source: R/hitman_replication.R

hitman_replicationR Documentation

High-throughput approach for testing directional replication

Description

High-throughput approach for testing replication of two base studies, where each study applies a two-sided test whose signed statistic and p-value are supplied via tab, and its desired to find rows where there is replication in a common direction.

Usage

hitman_replication(
  tab,
  cols = 1:4,
  reorder.rows = FALSE,
  fdr.method = c("BH", "BY"),
  prefix = NA
)

Arguments

tab

Matrix-like object with statistical and p-value columns. Only the signs of the statistics columns are used. tab should have non-duplicated row names and should not have missing values.

cols

Vector of column indices or names in the order of c(stat1, p1, stat2, p2).

reorder.rows

Logical, should rows be reordered by p-value?

fdr.method

Character string; either "BH" for Benjamini-Hochberg or "BY" for Benjamini-Yekutieli. See stats::p.adjust.

prefix

Character string of length one with prefix of returned columns, e.g. if prefix="repl", returned columns might be c("repl.chisq", "repl.p", "repl.FDR"). Prefix is not added if it is NA.

Details

Larger chi-square values are more significant.

Value

Data frame whose rows correspond to the rows of tab with the same row names and whose columns are

chisq

Chi-square for replication on 1 degreee of freedom.

p

P-value for replication

FDR

FDR for replication


jdreyf/Hitman documentation built on April 12, 2025, 1:35 p.m.