Description Usage Arguments Value References Examples
View source: R/misclassification.cov.R
Simple sensitivity analysis to correct for a misclassified covariate (a potential confounder or effect measure modifier).
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
)

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:

alpha 
Significance level. 
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. 
Lash, T.L., Fox, M.P, Fink, A.K., 2009 Applying Quantitative Bias Analysis to Epidemiologic Data, pp.79–108, Springer.
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))

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.