acc_ipb: PVB correction by inverse probability bootstrap sampling...

View source: R/PVBcorrect_functions.R

acc_ipbR Documentation

PVB correction by inverse probability bootstrap sampling (IPB)

Description

Perform PVB correction by inverse probability bootstrap sampling.

Usage

acc_ipb(
  data,
  test,
  disease,
  covariate = NULL,
  option = 1,
  interaction = FALSE,
  ci = FALSE,
  ci_level = 0.95,
  ci_perc = FALSE,
  b = 1000,
  seednum = NULL,
  return_data = FALSE,
  return_detail = FALSE,
  description = TRUE
)

Arguments

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.

option

1 = IPW weight, 2 = W_h weight, described in Arifin (2023), modified weight of Krautenbacher (2017). The default is option = 1. For small weights, option = 2 is more stable (Arifin, 2023).

interaction

Allow interaction terms between covariates in propensity score calculation. The default is FALSE.

ci

View confidence interval (CI). The default is FALSE.

ci_level

Set the CI width. The default is 0.95 i.e. 95% CI.

b

The number of bootstrap samples, b.

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.

return_data

Return data for the bootstrapped samples.

return_detail

Return accuracy measures for each of the bootstrapped samples.

description

Print the name of this analysis. The default is TRUE. This can be turned off for repeated analysis, for example in bootstrapped results.

ci_percentile

Calculate CI by percentile method. The default is normal distribution method (FALSE).

Value

A list object containing:

acc_results

The accuracy results.

References

  1. Arifin, W. N., & Yusof, U. K. (2022). Partial Verification Bias Correction Using Inverse Probability Bootstrap Sampling for Binary Diagnostic Tests. Diagnostics, 12(11), 2839.

  2. Arifin, W. N. (2023). Partial verification bias correction in diagnostic accuracy studies using propensity score-based methods (PhD thesis, Universiti Sains Malaysia). https://erepo.usm.my/handle/123456789/19184

  3. Krautenbacher, N., Theis, F. J., & Fuchs, C. (2017). Correcting Classifiers for Sample Selection Bias in Two-Phase Case-Control Studies. Computational and Mathematical Methods in Medicine, 2017, 1–18. https://doi.org/10.1155/2017/7847531

  4. Nahorniak, M., Larsen, D. P., Volk, C., & Jordan, C. E. (2015). Using inverse probability bootstrap sampling to eliminate sample induced bias in model based analysis of unequal probability samples. PLoS One, 10(6), e0131765.

Examples

# no covariate
acc_ipb(data = cad_pvb, test = "T", disease = "D", b = 1000, seednum = 12345)

# with three covariates
acc_ipb(data = cad_pvb, test = "T", disease = "D", covariate = c("X1","X2","X3"),
        b = 1000, seednum = 12345)

wnarifin/PVBcorrect documentation built on May 12, 2024, 4:13 p.m.