fitNull: Fit the null distribution

Description Usage Arguments Details Value References Examples

View source: R/EmpiricalCalibrationUsingAsymptotics.R

Description

fitNull fits the null distribution to a set of negative controls

Usage

1
fitNull(logRr, seLogRr)

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)

Details

This function fits a Gaussian function to the negative control estimates as described in Schuemie et al (2014).

Value

An object containing the parameters of the null distribution.

References

Schuemie MJ, Ryan PB, Dumouchel W, Suchard MA, Madigan D. Interpreting observational studies: why empirical calibration is needed to correct p-values. Statistics in Medicine 33(2):209-18,2014

Examples

1
2
3
4
data(sccs)
negatives <- sccs[sccs$groundTruth == 0, ]
null <- fitNull(negatives$logRr, negatives$seLogRr)
null

OHDSI/EmpiricalCalibration documentation built on June 26, 2018, 7:12 a.m.