View source: R/PVBcorrect_functions.R
acc_ebg | R Documentation |
Perform PVB correction by Begg and Greenes' method (as extended by Alonzo & Pepe, 2005).
acc_ebg(
data,
test,
disease,
covariate = NULL,
saturated_model = FALSE,
show_fit = FALSE,
show_boot = FALSE,
description = TRUE,
ci = FALSE,
ci_level = 0.95,
ci_type = "basic",
R = 999,
seednum = NULL,
r_print_freq = 100
)
data |
A data frame, with at least "Test" and "Disease" variables. |
test |
The "Test" variable name, i.e. the test result. The variable must be in binary; positive = 1, negative = 0 format. |
disease |
The "Disease" variable name, i.e. the true disease status. The variable must be in binary; positive = 1, negative = 0 format. |
covariate |
The name(s) of covariate(s), i.e. other variables associated with either test or disease status. Specify as name vector, e.g. c("X1", "X2") for two or more variables. The variables must be in formats acceptable to GLM. |
saturated_model |
Set as |
show_fit |
Set to |
show_boot |
Set to |
description |
Print the name of this analysis. The default is |
ci |
View confidence interval (CI). The default is |
ci_level |
Set the CI width. The default is 0.95 i.e. 95% CI. |
ci_type |
Set confidence interval (CI) type. Acceptable types are "norm", "basic", "perc", and "bca",
for bootstrapped CI. See |
R |
The number of bootstrap samples. Default |
seednum |
Set the seed number for the bootstrapped CI. The default is not set, so it depends on the user to set it outside or inside the function. |
r_print_freq |
Print the current bootstrap sample number at each specified interval.
Default |
A list object containing:
An object of class "boot" from boot
.
Contains Sensitivity, Specificity, PPV, and NPV
A list of objects of type "bootci" from boot.ci
.
Contains Sensitivity, Specificity, PPV, NPV.
The accuracy results.
Alonzo, T. A., & Pepe, M. S. (2005). Assessing accuracy of a continuous screening test in the presence of verification bias. Journal of the Royal Statistical Society: Series C (Applied Statistics), 54(1), 173–190.
Begg, C. B., & Greenes, R. A. (1983). Assessment of diagnostic tests when disease verification is subject to selection bias. Biometrics, 207–215.
He, H., & McDermott, M. P. (2012). A robust method using propensity score stratification for correcting verification bias for binary tests. Biostatistics, 13(1), 32–47.
# point estimates
acc_ebg(data = cad_pvb, test = "T", disease = "D")
acc_ebg(data = cad_pvb, test = "T", disease = "D", covariate = "X3")
acc_ebg(data = cad_pvb, test = "T", disease = "D", covariate = "X3", saturated_model = TRUE)
# with bootstrapped confidence interval
acc_ebg(data = cad_pvb, test = "T", disease = "D", ci = TRUE, seednum = 12345)
acc_ebg(data = cad_pvb, test = "T", disease = "D", covariate = "X3", ci = TRUE, seednum = 12345)
acc_ebg(data = cad_pvb, test = "T", disease = "D", covariate = "X3", saturated_model = TRUE,
ci = TRUE, seednum = 12345)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.