Plot bias correction inference

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.

Value

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

Details

Plot empirical bias distributions learned from analyzing negative controls.

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")