sim_omics: Simulate & test mediation methods on omics dataset

View source: R/sim_omics.R

sim_omicsR Documentation

Simulate & test mediation methods on omics dataset

Description

Simulate & test mediation methods on omics dataset.

Usage

sim_omics(
  b1 = 1,
  t2 = b1,
  t1 = 5,
  nsamp = 50,
  ngene = 100,
  FDR = 0.25,
  Sigma = diag(ngene),
  prop.consistent = 1/ngene,
  prop.inconsistent = 0,
  prop.em = 0,
  prop.my = 0,
  sd.mn = 0,
  nsim = 10^3,
  fdr.method = c("BH", "BY"),
  seed = 0,
  verbose = TRUE
)

Arguments

b1

Numeric value that beta1 ("b1"), the EM coefficient, takes for non-null mediators.

t2

Numeric value that theta2 ("t2"), the MY coefficient, takes for non-null mediators.

t1

Numeric value of theta1 i.e. the effect of the exposure on the outcome.

nsamp

Number of samples.

ngene

Number of genes.

FDR

FDR threshold to apply.

Sigma

Gene covariance matrix.

prop.consistent

Proportion of genes that are consistent mediators. Must be at least 1/ngene.

prop.inconsistent

Proportion of genes that are inconsistent mediators.

prop.em

Proportion of genes where E –> M but not M –> Y given E.

prop.my

Proportion of genes where M –> Y given E but not E –> M.

sd.mn

Numeric standard deviation of measurement noise.

nsim

Number of simulations.

fdr.method

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

seed

Random seed for reproducibility.

verbose

Logical; should the number of simulations be printed every 100 simulations?

Value

Matrix with proportion of significant calls for every method for true and null mediators.


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