plot.bioTMLE: Plot p-values from moderated statistical tests for class...

Description Usage Arguments Value Examples

View source: R/plots.R

Description

Histogram of raw or FDR-adjusted p-values from the moderated t-test.

Usage

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

Arguments

x

object of class biotmle as produced by an appropriate call to biomarkertmle

...

additional arguments passed plot as necessary

type

character describing whether to provide a plot of unadjusted or adjusted p-values (adjustment performed via Benjamini-Hochberg)

Value

object of class ggplot containing a histogram of the raw or Benjamini-Hochberg corrected p-values (depending on user input).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## Not run: 
library(dplyr)
library(biotmleData)
library(SuperLearner)
library(SummarizedExperiment)
data(illuminaData)

colData(illuminaData) <- colData(illuminaData) %>%
  data.frame() %>%
  mutate(age = as.numeric(age > median(age))) %>%
  DataFrame()
benz_idx <- which(names(colData(illuminaData)) %in% "benzene")

biomarkerTMLEout <- biomarkertmle(
  se = illuminaData,
  varInt = benz_idx,
  bppar_type = BiocParallel::SerialParam(),
  g_lib = c("SL.mean", "SL.glm"),
  Q_lib = c("SL.mean", "SL.glm")
)

limmaTMLEout <- modtest_ic(biotmle = biomarkerTMLEout)

plot(x = limmaTMLEout, type = "pvals_adj")

## End(Not run)

nhejazi/biotmle documentation built on Oct. 15, 2021, 5:46 p.m.