Description Usage Arguments Value References Examples
View source: R/misclassification.R
Simple sensitivity analysis for disease or exposure misclassification. Confidence interval for odds ratio is computed as in Chu et al. (2006), for exposure misclassification.
1 2 3 4 5 6 7  misclassification(
case,
exposed,
type = c("exposure", "outcome"),
bias_parms = NULL,
alpha = 0.05
)

case 
Outcome variable. If a variable, this variable is tabulated against. 
exposed 
Exposure variable. 
type 
Choice of misclassification:

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

alpha 
Significance level. 
A list with elements:
obs.data 
The analyzed 2 x 2 table from the observed data. 
corr.data 
The expected 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 with confidence interval for odds ratio. 
bias.parms 
Input bias parameters. 
Lash, T.L., Fox, M.P, Fink, A.K., 2009 Applying Quantitative Bias Analysis to Epidemiologic Data, pp.79–108, Springer.
Chu, H., Zhaojie, W., Cole, S.R., Greenland, S., Sensitivity analysis of misclassification: A graphical and a Bayesian approach, Annals of Epidemiology 2006;16:834841.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26  # 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:497503.
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))
misclassification(matrix(c(4558, 3428, 46305, 46085),
dimnames = list(c("AMI death+", "AMI death"),
c("Male+", "Male")),
nrow = 2, byrow = TRUE),
type = "outcome",
bias_parms = c(.53, .53, .99, .99))
# The following example comes from Chu et al. Sensitivity analysis of
# misclassification: A graphical and a Bayesian approach.
# Annals of Epidemiology 2006;16:834841.
misclassification(matrix(c(126, 92, 71, 224),
dimnames = list(c("Case", "Control"), c("Smoker +", "Smoker ")),
nrow = 2, byrow = TRUE),
type = "exposure",
bias_parms = c(.94, .94, .97, .97))

Observed data
Outcome: Breast cancer+
Comparing: Smoker+ vs. Smoker
Smoker+ Smoker
Breast cancer+ 215 1449
Breast cancer 668 4296
2.5% 97.5%
Observed Relative Risk: 0.9653825 0.8523766 1.0933704
Observed Odds Ratio: 0.9542406 0.8092461 1.1252141

2.5% 97.5%
Misclassification Bias Corrected Relative Risk: 0.9614392
Misclassification Bias Corrected Odds Ratio: 0.9490695 0.7895687 1.1407909
Observed data
Outcome: AMI death+
Comparing: Male+ vs. Male
Male+ Male
AMI death+ 4558 3428
AMI death 46305 46085
2.5% 97.5%
Observed Relative Risk: 1.294347 1.240431 1.350607
Observed Odds Ratio: 1.323321 1.263639 1.385822

Misclassification Bias Corrected Relative Risk: 1.344039
Misclassification Bias Corrected Odds Ratio: 1.406235
Observed data
Outcome: Case
Comparing: Smoker + vs. Smoker 
Smoker + Smoker 
Case 126 92
Control 71 224
2.5% 97.5%
Observed Relative Risk: 2.196866 1.796016 2.687181
Observed Odds Ratio: 4.320882 2.958402 6.310846

2.5% 97.5%
Misclassification Bias Corrected Relative Risk: 2.377254
Misclassification Bias Corrected Odds Ratio: 5.024508 3.282534 7.690912
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.