plot.camt.fdr: Plot the camt.fdr results

Description Usage Arguments Value Author(s) References Examples

Description

The function plots the null probabilities, f1 shape parameters and p-values against covariate values. Significant hypotheses are highlighted in red.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## S3 method for class 'camt.fdr'
plot(
  camt.fdr.obj,
  covariate,
  covariate.type = c("continuous", "categorical"),
  covariate.name = "covariate",
  alpha = 0.1,
  nlimit = 10000,
  log = FALSE,
  logit = TRUE,
  file.name = "CAMT.plot.pdf"
)

Arguments

camt.fdr.obj

a list returned from running 'camt.fdr'.

covariate

a vector containing the one-dimensional covariate values.

covariate.type

a character string of either "continuous" or "categorical".

covariate.name

a character string for the name of the covariate to be plotted.

alpha

a numeric value, the target FDR level.

nlimit

an integer, the number of insignificant hypotheses to be sampled to reduce the visualization complexity.

log

a logical value indicating whether the p-values should be plotted on the log scale.

logit

a logical value indicating whether the pi0/k should be plotted on the logit scale.

file.name

file.name a character string (ended with .pdf) for the name of the generated pdf file. Could include the path.

Value

A list of 'ggplot2' objects.

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.