calibrateConfidenceInterval: Calibrate confidence intervals

Description Usage Arguments Details Value Examples

View source: R/ConfidenceIntervalCalibration.R

Description

Calibrate confidence intervals

Usage

1
calibrateConfidenceInterval(logRr, seLogRr, model, ciWidth = 0.95)

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).

model

An object of type systematicErrorModel as created by the fitSystematicErrorModel function.

ciWidth

The width of the confidence interval. Typically this would be .95, for the 95 percent confidence interval.

Details

Compute calibrated confidence intervals based on a model of the systematic error.

Value

A data frame with calibrated confidence intervals and point estimates.

Examples

1
2
3
4
5
data <- simulateControls(n = 50 * 3, mean = 0.25, sd = 0.25, trueLogRr = log(c(1, 2, 4)))
model <- fitSystematicErrorModel(data$logRr, data$seLogRr, data$trueLogRr)
newData <- simulateControls(n = 15, mean = 0.25, sd = 0.25, trueLogRr = log(c(1, 2, 4)))
result <- calibrateConfidenceInterval(newData$logRr, newData$seLogRr, model)
result

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