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

fitNullNonNormalLl()

Fit the null distribution using non-normal log-likelihood approximations

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

computeExpectedAbsoluteSystematicError()

Compute the expected absolute systematic error

compareEase()

Compare EASE of correlated sets of estimates

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 the effect of the CI calibration

plotCiCoverage()

Create a confidence interval coverage plot

plotErrorModel()

Plot the systematic error model

MaxSPRT and calibration

Functions for performing empirical calibration when adjusting for sequential testing using MaxSPRT.

calibrateLlr()

Calibrate the log likelihood ratio

computeCvBinomial()

Compute critical values for Binomial data

computeCvPoisson()

Compute critical values for Poisson data

computeCvPoissonRegression()

Compute critical values for Poisson regression data

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

simulateMaxSprtData()

Simulate survival data for MaxSPRT computation