misclassification_cov: Sensitivity analysis for covariate misclassification.

Description Usage Arguments Value References Examples

View source: R/misclassification.cov.R

Description

Simple sensitivity analysis to correct for a misclassified covariate (a potential confounder or effect measure modifier).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
misclassification_cov(
  case,
  exposed,
  covariate,
  bias_parms = NULL,
  alpha = 0.05
)

misclassification.cov(
  case,
  exposed,
  covariate,
  bias_parms = NULL,
  alpha = 0.05
)

Arguments

case

Outcome variable. If a variable, this variable is tabulated against.

exposed

Exposure variable.

covariate

Covariate to stratify on.

bias_parms

Vector defining the bias parameters. This vector has 4 elements between 0 and 1, in the following order:

  1. Sensitivity of confounder classification among those with the outcome,

  2. Sensitivity of confounder classification among those without the outcome,

  3. Specificity of confounder classification among those with the outcome,and

  4. Specificity of confounder classification among those without the outcome.

alpha

Significance level.

Value

A list with elements:

obs.data

The analyzed stratified 2 x 2 tables from the observed data.

corr.data

The expected stratified observed data given the true data assuming misclassification.

obs.measures

A table of observed relative risk and odds ratio with confidence intervals.

adj.measures

A table of adjusted relative risk and odds ratio.

bias.parms

Input 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# The data for this example come from:
# Berry, R.J., Kihlberg, R., and Devine, O. Impact of misclassification of in vitro
# fertilisation in studies of folic acid and twinning: modelling using population
# based Swedish vital records.
# BMJ, doi:10.1136/bmj.38369.437789.82 (published 17 March 2004)
misclassification.cov(array(c(1319, 38054, 5641, 405546,
565, 3583, 781, 21958,
754, 34471, 4860, 383588),
dimnames = list(c("Twins+", "Twins-"),
c("Folic acid+", "Folic acid-"), c("Total", "IVF+", "IVF-")),
dim = c(2, 2, 3)),
bias_parms = c(.6, .6, .95, .95))

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