Learn R Programming

episensr (version 0.7.1)

misclassification: Sensitivity analysis for misclassification.

Description

Simple sensitivity analysis for misclassification.

Usage

misclassification(exposed, case, implement = c("exposure", "outcome"),
  type = c("exposure", "outcome"), bias = NULL, alpha = 0.05, dec = 4,
  print = TRUE)

Arguments

exposed
Exposure variable. If a variable, this variable is tabulated against.
case
Outcome variable.
implement
Deprecated; please use type instead.
type
Choice of misclassification:
  1. Exposure: bias analysis for exposure misclassification; corrections using sensitivity and specificity: nondifferential and independent errors,
  2. Outcome: bias analysis for outcome misclassification.
bias
Vector defining the bias parameters. This vector has 4 elements between 0 and 1, in the following order:
  1. Sensitivity of exposure (or outcome) classification among those with the outcome,
  2. Sensitivity of exposure (or outcome) classification
alpha
Significance level.
dec
Number of decimals in the printout.
print
A logical scalar. Should the results be printed?

Value

  • A list with elements:
  • obs.dataThe analysed 2 x 2 table from the observed data.
  • corr.dataThe expected observed data given the true data assuming misclassfication.
  • obs.measuresA table of observed relative risk and odds ratio with confidence intervals.
  • adj.measuresA table of adjusted relative risk and odds ratio.
  • bias.parmsInput bias parameters.

References

Lash, T.L., Fox, M.P, Fink, A.K., 2009 Applying Quantitative Bias Analysis to Epidemiologic Data, pp.79--108, Springer.

Examples

Run this code
# The data for this example come from:
# Fink, A.K., Lash,  T.L. A null association between smoking during pregnancy
# and breast cancer using Massachusetts registry data (United States).
# Cancer Causes Control 2003;14:497-503.
misclassification(matrix(c(215, 1449, 668, 4296),
dimnames = list(c("Breast cancer+", "Breast cancer-"),
c("Smoker+", "Smoker-")),
nrow = 2, byrow = TRUE),
type = "exposure",
bias = c(.78, .78, .99, .99))
misclassification(matrix(c(4558, 3428, 46305, 46085),
dimnames = list(c("AMI death+", "AMI death-"),
c("Male+", "Male-")),
nrow = 2, byrow = TRUE),
type = "outcome",
bias = c(.53, .53, .99, .99))

Run the code above in your browser using DataLab