boot.bias | R Documentation |
Generate R
bootstrap replicates of either selection or misclassification bias functions.
It then generates a confidence interval of the parameter, by first order normal approximation or the bootstrap percentile interval.
Replicates giving negative cell(s) in the adjusted 2-by-2 table are silently ignored.
boot.bias(bias_model, R = 1000, conf = 0.95, ci_type = c("norm", "perc"))
bias_model |
An object of class "episensr.boot", i.e. either selection bias function or misclassification bias function. |
R |
The number of bootstrap replicates. |
conf |
Confidence level. |
ci_type |
A character string giving the type of interval required. Values can be either "norm" or "perc", default to "norm". |
A list with elements:
model |
Model ran. |
boot_mod |
Bootstrap resampled object, of class |
nrep |
Number of replicates used. |
bias_ciRR |
Bootstrap confidence interval object for relative risk. |
bias_ciOR |
Bootstrap confidence interval object for odds ratio. |
ci |
Confidence intervals for the bias adjusted association measures. |
conf |
Confidence interval. |
boot, selection, misclassification
misclass_eval <- misclassification(matrix(c(215, 1449, 668, 4296),
dimnames = list(c("Breast cancer+", "Breast cancer-"),
c("Smoker+", "Smoker-")),
nrow = 2, byrow = TRUE),
type = "exposure",
bias_parms = c(.78, .78, .99, .99))
set.seed(123)
boot.bias(misclass_eval)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.