P-value calibration

Functions for calibrating p-values based on an empirical null distribution estimated using negative controls.

fitNull()

Fit the null distribution

fitMcmcNull()

Fit the null distribution using MCMC

computeTraditionalP()

Compute the (traditional) p-value

calibrateP()

Calibrate the p-value

plotMcmcTrace()

Plot the MCMC trace

plotForest()

Create a forest plot

plotCalibration()

Create a calibration plot

plotCalibrationEffect()

Plot the effect of the calibration

plotExpectedType1Error()

Plot the expected type 1 error as a function of standard error

Confidence interval calibration

Functions for calibrating confidence intervals based on a systematic error model fitted using negative and positive controls.

fitSystematicErrorModel()

Fit a systematic error model

convertNullToErrorModel()

Convert empirical null distribution to systematic error model

computeTraditionalCi()

Compute the (traditional) confidence interval

calibrateConfidenceInterval()

Calibrate confidence intervals

plotTrueAndObserved()

Plot true and observed values

evaluateCiCalibration()

Evaluate confidence interval calibration

plotCiCalibration()

Create a confidence interval calibration plot

plotCiCalibrationEffect()

Plot true and observed values

plotCiCoverage()

Create a confidence interval coverage plot

plotErrorModel()

Plot the systematic error model

Data

Data (real and simulated) for testing and demonstrating empirical calibration.

sccs

Incidence rate ratios from Self-Controlled Case Series

caseControl

Odds ratios from a case-control design

cohortMethod

Relative risks from a new-user cohort design

southworthReplication

Relative risks from an unadjusted new-user cohort design

grahamReplication

Relative risks from an adjusted new-user cohort design

simulateControls()

Simulate (negative) controls