localFDR: localFDR estimation for given data

View source: R/localFDR.R

localFDRR Documentation

localFDR estimation for given data

Description

localFDR returns localFDR estimates for given multi-dimensional lists of raw data, z-values, or p-values. localFDR imports SPMix for a two-component semiparametric mixture model to estimate the localFDR.

Usage

localFDR(
  z,
  tol = 5e-06,
  p_value = FALSE,
  alternative = "greater",
  max_iter = 30,
  mono = TRUE,
  Uthre_gam = 0.99,
  Lthre_gam = 0.01
)

Arguments

z

Matrix which column indicates z-values, probit-transformed p-values.

tol

Stopping criteria for the EM algorithm. If maximum absolute difference of current and previous gamma value is smaller than tol, i.e. max_i |\gamma_i^{(k+1)}-\gamma_i^{(k)} <tol, for k-th step, then optimization stops. (default: 5e-6)

p_value

If TRUE, input are p-values. If FALSE, input are z-values. (default: FALSE)

alternative

a character string specifying the alternative hypothesis, must be one of "two.sided", "greater" (default) or "less". You can specify just the initial letter. (default: "greater")

max_iter

Maximum number of iterations in the EM algorithm. (default: 30)

mono

If TRUE, FDR is in ascending order of z-values. (default: TRUE)

Uthre_gam

Upper threshold of gamma which are used to compute stopping criteria for the EM algorithm.

Lthre_gam

Lower threshold of gamma which are used to compute stopping criteria for the EM algorithm.

Value

Estimates of localFDR for given z-values / p-values.

localFDR

local FDR estimates for given z-values / p-values


JungiinChoi/multiLocalFDR documentation built on Aug. 15, 2024, 1:04 a.m.