camt.fwer: Perform the covariate-adaptive family-wise error rate control

Description Usage Arguments Value Author(s) References Examples

View source: R/camt.cor.func.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
camt.fwer(
  pvals,
  pi0.var,
  data = data,
  pvals.cutoff = 1e-15,
  alpha = 0.1,
  k.fix = NULL,
  EM.paras = list(iterlim = 50, tol = 1e-05, k.init = NULL, pi0.init = NULL, nlm.iter =
    5),
  trace = FALSE,
  return.model.matrix = FALSE
)

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.

data

a data frame containing the covariates, only used when pi0.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.

alpha

a numeric value for the significance level. Default is 0.1.

k.fix

a numeric value between 0 and 1. It is the k parameter of the alternative (beta) distribution. If it is null, it will be estimated via 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 pi0 and k parameter.

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

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.

Value

A list with the elements

call

the call made.

pi0

a vector of the estimated null probabilities.

k

the (estimated) value for the k parameter of the alternative distribution.

pi0.coef

a vector of the coefficients for pi0.

gamma

the estimated gamma value to dichotomize the p-values

loglik

log likelihood.

EM.paras

actually used parameters in EM algorithm.

EM.iter

the number of iteration actually used.

rejection

a vector containing the indices of the rejected hypotheses.

Author(s)

Huijuan Zhou

References

Huijuan Zhou, Xianyang Zhang, Jun Chen. Covariate Adaptive Family-wise Error Control with Applications to Genome-wide Association Studies. Submitted.

Examples

1
2
3
4
5
data <- simulate.data(feature.no = 10000, covariate.strength = 'Moderate', covariate.model = 'pi0',
	sig.density = 'Medium', sig.strength = 'L4', cor.struct = 'None')
camt.obj.fwer <- camt.fwer(pvals = data$pvals, pi0.var = data$pi0.var)
plot.camt.fwer(camt.obj.fwer, 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.