Plot bias distributions

plotBiasDistribution(
  biasDist,
  limits = c(-2, 2),
  logScale = FALSE,
  numericId = TRUE,
  fileName = NULL
)

Arguments

biasDist

A bias distribution object generated by the fitBiasDistribution() or sequentialFitBiasDistribution() function.

limits

The lower and upper limits in log-RR to plot.

logScale

Whether or not to show bias in log-RR; default FALSE (shown in RR).

numericId

(For sequential or group case only) whether or not to treat Id as a numeric variable; default: TRUE.

fileName

Name of the file where the plot should be saved, for example 'plot.png'. See the function ggplot2::ggsave in the ggplot2 package for supported file formats.

Value

A ggplot object. Use the ggplot2::ggsave function to save to file.

Details

Plot empirical bias distributions learned from analyzing negative controls.

Examples

# Fit a bias distribution for this example:
data("ncLikelihoods")
# NOT RUN
# singleBiasDist = fitBiasDistribution(ncLikelihoods[[5]], seed = 1)

# Plot it
# NOT RUN
# plotBiasDistribution(singleBiasDist)