plotCiCoverage creates a plot showing the coverage before and after confidence interval
calibration at various widths of the confidence interval.
plotCiCoverage( logRr, seLogRr, trueLogRr, strata = as.factor(trueLogRr), crossValidationGroup = 1:length(logRr), legacy = FALSE, evaluation, legendPosition = "top", title, fileName = NULL )
A numeric vector of effect estimates on the log scale.
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).
The true log relative risk.
Variable used to stratify the plot. Set
What should be the unit for the cross-validation? By default the unit is a single control, but a different grouping can be provided, for example linking a negative control to synthetic positive controls derived from that negative control.
If true, a legacy error model will be fitted, meaning standard deviation is linear on the log scale. If false, standard deviation is assumed to be simply linear.
A data frame as generated by the
Where should the legend be positioned? ("none", "left", "right", "bottom", "top").
Optional: the main title for the plot
Name of the file where the plot should be saved, for example
'plot.png'. See the function
A Ggplot object. Use the
ggsave function to save to file.
Creates a plot showing the fraction of effects above, within, and below the confidence interval. The empirical calibration is performed using a leave-one-out design: The confidence interval of an effect is computed by fitting a null using all other controls. The plot shows the coverage for both theoretical (traditional) and empirically calibrated confidence intervals.