plotBiasDistribution: Plot bias distributions

View source: R/Plots.R

plotBiasDistributionR Documentation

Plot bias distributions

Description

Plot bias distributions

Usage

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.

Details

Plot empirical bias distributions learned from analyzing negative controls.

Value

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

See Also

fitBiasDistribution, sequentialFitBiasDistribution

Examples

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

# Plot it
# NOT RUN
# plotBiasDistribution(singleBiasDist)


OHDSI/EvidenceSynthesis documentation built on Sept. 7, 2024, 12:09 a.m.