plot.camt.fwer: Plot the camt.fwer results

Description Usage Arguments Value Author(s) References Examples

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

Description

The function plots the null probabilities 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.fwer'
plot(
  camt.fwer.obj,
  covariate,
  covariate.type = c("continuous", "categorical"),
  covariate.name = "covariate",
  alpha = 0.1,
  nlimit = 10000,
  log = FALSE,
  logit = TRUE,
  file.name = "CAMT.fwer.plot"
)

Arguments

camt.fwer.obj

a list returned from running 'camt.fwer'.

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 FWER 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 should be plotted on the logit scale.

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)

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.