Learn R Programming

EmpiricalCalibration (version 3.1.4)

calibrateConfidenceInterval: Calibrate confidence intervals

Description

Calibrate confidence intervals

Usage

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

Value

A data frame with calibrated confidence intervals and point estimates.

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.

Examples

Run this code
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

Run the code above in your browser using DataLab