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() %>%
  dplyr::mutate(age = as.numeric(age > median(age))) %>%
  DataFrame()
benz_idx <- which(names(colData(illuminaData)) %in% "benzene")

biomarkerTMLEout <- biomarkertmle(
  se = illuminaData,
  varInt = benz_idx,
  parallel = FALSE,
  g_lib = c("SL.mean", "SL.glm"),
  Q_lib = c("SL.bayesglm", "SL.glm")
)

limmaTMLEout <- modtest_ic(biotmle = biomarkerTMLEout)

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

## End(Not run)

biotmle documentation built on Nov. 8, 2020, 5:10 p.m.