View source: R/ConfidenceIntervalCalibration.R
calibrateConfidenceInterval | R Documentation |
Calibrate confidence intervals
calibrateConfidenceInterval(logRr, seLogRr, model, ciWidth = 0.95)
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 |
ciWidth |
The width of the confidence interval. Typically this would be .95, for the 95 percent confidence interval. |
Compute calibrated confidence intervals based on a model of the systematic error.
A data frame with calibrated confidence intervals and point estimates.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.