plot.methytmle: Plot p-values of methytmle objects

Description Usage Arguments Value Examples

View source: R/plots.R

Description

Plot p-values of methytmle objects

Usage

1
2
## S3 method for class 'methytmle'
plot(x, ..., type = "both")

Arguments

x

Object of class methytmle as produced by an appropriate call to methyvim.

...

Additional arguments passed plot as necessary.

type

The type of plot to build: one of side-by-side histograms (type "both") comparing raw p-values to FDR-adjusted p-values (using the FDR-MSA correction) or either of these two histogram separately. Set this argument to "raw_pvals" for a histogram of the raw p-values, and to "fdr_pvals" for a histogram of the FDR-corrected p-values.

Value

Object of class ggplot containing a histogram or side-by-side histograms of the raw (marginal) and corrected p-values, with the latter computed automatically using the method of Tuglus and van der Laan.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
suppressMessages(library(SummarizedExperiment))
library(methyvimData)
data(grsExample)
var_int <- as.numeric(colData(grsExample)[, 1])
# TMLE procedure for the ATE parameter over M-values with Limma filtering
methyvim_out_ate <- suppressWarnings(
  methyvim(
    data_grs = grsExample, sites_comp = 25, var_int = var_int,
    vim = "ate", type = "Mval", filter = "limma", filter_cutoff = 0.1,
    parallel = FALSE, tmle_type = "glm"
  )
)
plot(methyvim_out_ate)

nhejazi/methyvim documentation built on April 30, 2020, 7:14 p.m.