Compute method performance metrics
computeMetrics(
logRr,
seLogRr = NULL,
ci95Lb = NULL,
ci95Ub = NULL,
p = NULL,
trueLogRr
)
A numeric vector of effect estimates on the log scale.
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). If not provided the standard error will be inferred from the 95 percent confidence interval.
The lower bound of the 95 percent confidence interval. IF not provided it will be inferred from the standard error.
The upper bound of the 95 percent confidence interval. IF not provided it will be inferred from the standard error.
The two-sided p-value corresponding to the null hypothesis of no effect. IF not provided it will be inferred from the standard error.
A vector of the true effect sizes
Compute the AUC, coverage, mean precision, MSE, type 1 error, type 2 error, and the fraction non- estimable.
library(EmpiricalCalibration)
data <- simulateControls(n = 50 * 3, trueLogRr = log(c(1, 2, 4)))
computeMetrics(logRr = data$logRr, seLogRr = data$seLogRr, trueLogRr = data$trueLogRr)
#> Setting levels: control = FALSE, case = TRUE
#> Setting direction: controls < cases
#> auc coverage meanP mse type1 type2
#> 1.00 0.72 136.49 0.03 0.24 0.00
#> nonEstimable
#> 0.00