multiple.bias: Extract adjusted 2-by-2 table from episensr object

View source: R/multiple.bias.R

multiple.biasR Documentation

Extract adjusted 2-by-2 table from episensr object

Description

Extract the adjusted 2-by-2 table from an episensr function, so that it can be re-used into an other episensr function when performing multiple (combined) bias analysis. Allowed functions are: selection, misclassification, confounders, probsens, probsens.sel, and probsens.conf.

Usage

multiple.bias(
  x,
  bias_function = c("selection", "misclassification", "confounders", "probsens.sel",
    "probsens.conf", "probsens"),
  ...
)

Arguments

x

An object of class 'episensr' or 'episensr.probsens'.

bias_function

Bias function to be called. Choices between 'selection', 'misclassification', 'confounders', 'probsens', 'probsens.sel', 'probsens.conf'.

...

Additional arguments passed on to methods.

Details

For probabilistic bias analyses, median of cells are passed to the next function as starting 2-by-2 table.

Value

A list with the elements corresponding to the bias function called.

See Also

selection, misclassification, confounders, probsens, probsens.sel, probsens.conf

Examples

dat <- matrix(c(118, 832, 103, 884),
dimnames = list(c("BC+", "BC-"), c("AD+", "AD-")), nrow = 2, byrow = TRUE)

dat %>%
misclassification(., type = "exposure", bias_parms = c(.56, .58, .99, .97)) %>%
multiple.bias(., bias_function = "selection", bias_parms = c(.73, .61, .82, .76))

episensr documentation built on Aug. 30, 2023, 5:09 p.m.