calibrateP: Calibrate the p-value

Description Usage Arguments Details Value Methods (by class) References Examples

View source: R/EmpiricalCalibrationUsingAsymptotics.R

Description

calibrateP computes calibrated p-values using the fitted null distribution

Usage

1
2
3
4
5
6
7
calibrateP(null, logRr, seLogRr, ...)

## S3 method for class 'null'
calibrateP(null, logRr, seLogRr, ...)

## S3 method for class 'mcmcNull'
calibrateP(null, logRr, seLogRr, pValueOnly, ...)

Arguments

null

An object of class null created using the fitNull function or an object of class mcmcNull created using the fitMcmcNull function.

logRr

A numeric vector of one or more 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)

...

Any additional parameters (currently none).

pValueOnly

If true, will return only the calibrated P-value itself, not the credible interval.

Details

This function computes a calibrated two-sided p-value as described in Schuemie et al (2014).

Value

The two-sided calibrated p-value.

Methods (by class)

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
5
data(sccs)
negatives <- sccs[sccs$groundTruth == 0, ]
null <- fitNull(negatives$logRr, negatives$seLogRr)
positive <- sccs[sccs$groundTruth == 1, ]
calibrateP(null, positive$logRr, positive$seLogRr)

OHDSI/EmpiricalCalibration documentation built on Nov. 28, 2018, 1:03 p.m.