Plot negative and positive control estimates.

plotControls(
  logRr,
  seLogRr = NULL,
  ci95Lb = NULL,
  ci95Ub = NULL,
  trueLogRr,
  estimateType = "relative risk",
  fileName = NULL,
  title = NULL
)

Arguments

logRr

A numeric vector of effect estimates on the log scale.

seLogRr

The standard error of the log of the effect estimates. Hint: often the standard error = (log(<lower bound 95 percent confidence interval>) - log(<effect estimate>))/qnorm(0.025). If not provided the standard error will be inferred from the 95 percent confidence interval.

ci95Lb

The lower bound of the 95 percent confidence interval. IF not provided it will be inferred from the standard error.

ci95Ub

The upper bound of the 95 percent confidence interval. IF not provided it will be inferred from the standard error.

trueLogRr

A vector of the true effect sizes

estimateType

A character string to denote the effect size estimate type. Used for the x-axis and the true effect size labels.

fileName

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

title

An optional title to display above the plot.

Value

A Ggplot object. Use the ggsave function to save to file.