camt.fdr: Perform covariate-adaptive false discovery rate control

Description Usage Arguments Value Author(s) References Examples

Description

The function implements a scalable, flexible, robust and powerful FDR control method for large-scale multiple testing exploiting the auxiliary covariates. It allows both the prior null probability and the alternative distribution to depend on covariates.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
camt.fdr(
  pvals,
  pi0.var = NULL,
  f1.var = NULL,
  data = NULL,
  pvals.cutoff = 1e-15,
  pi0.low = 0.1,
  alg.type = c("EM", "OS"),
  EM.paras = list(iterlim = 50, k.init = NULL, tol = 1e-05, pi0.init = NULL, nlm.iter =
    5),
  control.method = c("hybrid", "knockoff+"),
  burnin.no = 500,
  trace = FALSE,
  return.model.matrix = TRUE,
  ...
)

Arguments

pvals

a numeric vector of p-values.

pi0.var

a formula, a vector, a data frame, or a matrix of covariate values for the prior null probability.

f1.var

a formula, a vector, a data frame, or a matrix of covariate values for the alternative distribution.

data

a data frame containing the covariates, only used when pi0.var, f1.var are classes of 'formula'.

pvals.cutoff

a numeric value to replace p-values below that value, which is used to increase the stability of the algorithm.

pi0.low

the allowed minimal pi0 value, which could guard against the dominance of the prior.

alg.type

a character string indicating the algorithm used. 'OS' - direct one-step optimization using a Newton-type algorithm, 'EM' - using EM algorithm. 'OS' is fast but could be inaccurate under some scenarios. Default 'EM'.

EM.paras

a list of control arguments for the EM algorithm

  • iterliman integer value indicating the maximum number of iterations.

  • tola numeric value giving the tolerance in the relative change in the log likelihood below which the algorithm is considered to be converged.

  • pi0.init, k.inittwo scalars giving the initial guess of the average pi0 and k parameter.

  • nlm.iteran integer indicating the allowed maximum iteration in running 'nlm', used to speed up computation.

control.method

a character string indicating the FDR control variant. 'knockoff+': the knockoff+ procedure of Barber-Candes (BC), conservative at sparse signal/small FDR levels. 'hybrid': an empirical method to correct the conservativeness of 'knockoff+'. The method is based on taking the maximum over the BC-type (knockoff) and BH-type FDR estimates for a certain number (as specified by 'burnin.no') of the most promising hypotheses at the start of the algorithm. The rest use knockoff-based FDR estimator. Default is 'hybrid'.

burnin.no

an integer value indicating the number of the most promising hypotheses that will apply the 'hybrid' procedure above.

trace

a logical value indicating whether to print the process.

return.model.matrix

a logical value indicating whether to return the model matrix. Consider setting to FALSE if it's huge.

...

parameters passing to 'nlm' optimization.

Value

A list with the elements

call

the call made.

pi0

a vector of the estimated null probabilities.

k

a vector of the estimated shape parameters for the alternative distribution.

EM.paras

actually used parameters in EM algorithm.

EM.iter

the number of iteration actually used.

loglik

log likelihood.

pi0.coef, k.coef

a vector of the coefficients for pi0 and k.

pi0.var, f1.var

the actual model matrix used if its return is requested.

fdr

a numeric vector of the adjusted p-values.

pvals

a numeric vector of the original p-values used.

ts

a numeric vector of the thresholds (t) below which the corresponding hypothesis will be rejected.

Author(s)

Jun Chen

References

Xianyang Zhang, Jun Chen. Covariate Adaptive False Discovery Rate Control with Applications to Omics-Wide Multiple Testing. JASA. To appear.

Examples

1
2
3
4
5
6
data <- simulate.data(feature.no = 10000, covariate.strength = 'Moderate', covariate.model = 'pi0',
	sig.density = 'Medium', sig.strength = 'L3', cor.struct = 'None')
camt.fdr.obj <- camt.fdr(pvals = data$pvals, pi0.var = data$pi0.var, f1.var = data$f1.var, 
	alg.type = 'EM', control.method = 'knockoff+')
plot.camt.fdr(camt.fdr.obj, covariate = as.vector(rank(data$pi0.var)), covariate.name = 'Covariate rank',
	log = TRUE, file.name = 'CovariateModerate.pdf')

jchen1981/CAMT documentation built on Jan. 2, 2021, 1:44 p.m.