misclass_cov: Covariate misclassification

View source: R/misclass_cov.R

misclass_covR Documentation

Covariate misclassification

Description

misclass_cov() allows to provide adjusted measures of association corrected for misclassification of a covariate (a potential confounder or effect measure modifier).

Usage

misclass_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 (for misclass_cov()):

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

Fox, M.P, MacLehose, R.F., Lash, T.L., 2021 Applying Quantitative Bias Analysis to Epidemiologic Data, pp.176–179, Springer.

See Also

Other misclassification: misclass(), probsens.irr()

Examples

# 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)
misclass_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 June 8, 2025, 10:34 a.m.