fdr.optimization: Function for numeric optimization to get an FDR corrected...

View source: R/power.R

fdr.optimizationR Documentation

Function for numeric optimization to get an FDR corrected significance thresold

Description

Function for numeric optimization to get an FDR corrected significance thresold

Usage

fdr.optimization(
  x,
  fdr,
  m0,
  type,
  exp.vector,
  es.vector,
  nSamples,
  mean.vector,
  disp.vector = NULL,
  useSimulatedPower = TRUE,
  simThreshold = 4,
  ssize.ratio.de = ssize.ratio.de
)

Arguments

x

Adjusted significance threshold to be found during optimization

fdr

Chosen FDR threshold

m0

Number of null hypothesis

type

Either DE or eQTL power

exp.vector

Vector of expression probabilities for each DEG/eQTL

es.vector

Effect size vector (Fold Change for DEGs, Rsq for eQTLs)

nSamples

Sample size

mean.vector

Mean value for each DEG / eQTL gene

disp.vector

Dispersion value for each DEG (only required for DE power)

useSimulatedPower

Option to simulate eQTL power for small mean values to increase accuracy (only required for the eQTL power)

simThreshold

Threshold until which the simulated power is taken instead of the analytic (only required with eQTL power)

ssize.ratio.de

In the DE case, ratio between sample size of group 0 (control group) and group 1 (1=balanced design)

Value

Optimizing this function to 0 will lead to the correct adjusted significance threshold x


heiniglab/scPower documentation built on Jan. 9, 2025, 12:13 p.m.