plotBiasCorrectionInference: Plot bias correction inference

View source: R/Plots.R

plotBiasCorrectionInferenceR Documentation

Plot bias correction inference

Description

Plot bias correction inference

Usage

plotBiasCorrectionInference(
  bbcResult,
  type = "raw",
  ids = bbcResult$Id,
  limits = c(-3, 3),
  logScale = FALSE,
  numericId = TRUE,
  fileName = NULL
)

Arguments

bbcResult

A (sequential) analysis object generated by the biasCorrectionInference() function.

type

The type of plot. Must be one of c("corrected", "raw", "compare").

ids

IDs of the periods/groups to plot result for; default is all IDs.

limits

The limits on log RR for plotting.

logScale

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

numericId

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

biasCorrectionInference

Examples

# Perform sequential analysis using Bayesian bias correction for this example:
data("ncLikelihoods")
data("ooiLikelihoods")
# NOT RUN
# bbcSequential = biasCorrectionInference(ooiLikelihoods, ncLikelihoodProfiles = ncLikelihoods)

# Plot it
# NOT RUN
# plotBiasCorrectionInference(bbcSequential, type = "corrected")


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