View source: R/misclassification.R
misclassification  R Documentation 
Simple sensitivity analysis for disease or exposure misclassification. Confidence interval for odds ratio adjusted using sensitivity and specificity is computed as in Chu et al. (2006), for exposure misclassification.
misclassification(
case,
exposed,
type = c("exposure", "exposure_pv", "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:
If PPV/NPV is chosen in case of exposure misclassification, this vector is the following:

alpha 
Significance level. 
For exposure misclassification, biasadjusted measures are available using sensitivity and specificity, or using predictive values.
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.
# 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))
# The next example, using PPV/NPV, comes from Bodnar et al. Validity of birth
# certificatederived maternal weight data.
# Paediatric and Perinatal Epidemiology 2014;28:203212.
misclassification(matrix(c(599, 4978, 31175, 391851),
dimnames = list(c("Preterm", "Term"), c("Underweight", "Normal weight")),
nrow = 2, byrow = TRUE),
type = "exposure_pv",
bias_parms = c(0.65, 0.74, 1, 0.98))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.