boot.bias: Bootstrap resampling for selection and misclassification bias...

Description Usage Arguments Value See Also Examples

View source: R/boot.bias.R

Description

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.

Usage

1
boot.bias(bias_model, R = 1000, conf = 0.95, ci_type = c("norm", "perc"))

Arguments

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".

Value

A list with elements:

model

Model ran.

boot_mod

Bootstrap resampled object, of class boot.

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.

See Also

boot, selection, misclassification

Examples

1
2
3
4
5
6
7
8
9
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)

Example output

95 % confidence interval of the bias adjusted measures: 
   RR: 0.8371582 1.108244 
   OR: 0.7895771 1.144564 
---
 Based on 1000 bootstrap replicates
There were 50 or more warnings (use warnings() to see the first 50)

episensr documentation built on Aug. 20, 2021, 9:06 a.m.