View source: R/PVBcorrect_functions.R
acc_mi | R Documentation |
Perform PVB correction by multiple imputation.
acc_mi(
data,
test,
disease,
covariate = NULL,
ci = FALSE,
ci_level = 0.95,
m = 100,
method = "logreg",
seednum = NA,
mi_print = FALSE,
description = TRUE
)
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. |
ci |
View confidence interval (CI). The default is |
ci_level |
Set the CI width. The default is 0.95 i.e. 95% CI. |
m |
The number of imputation, m. |
method |
Imputation method. The default is "logreg". Other allowed methods are
"logreg.boot", "pmm", "midastouch", "sample", "cart", "rf".
See |
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. |
mi_print |
Print multiple imputation history on console.
This is |
description |
Print the name of this analysis. The default is |
A list object containing:
The accuracy results.
Harel, O., & Zhou, X.-H. (2006). Multiple imputation for correcting verification bias. Statistics in Medicine, 25(22), 3769–3786.
# no covariate
acc_mi(data = cad_pvb, test = "T", disease = "D", ci = TRUE, seednum = 12345, m = 10)
# with other imputation method. e.g. random forest "rf"
acc_mi(data = cad_pvb, test = "T", disease = "D", ci = TRUE, seednum = 12345, m = 10,
method = "rf")
# with three covariates
acc_mi(data = cad_pvb, test = "T", disease = "D", covariate = c("X1", "X2", "X3"),
ci = TRUE, seednum = 12345, m = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.