Description Usage Arguments Details Value Author(s) References Examples
ipwm
implements a method for estimating the marginal causal odds ratio by constructing weights (modified inverse probability weights) that address both confounding and joint misclassification of exposure and outcome.
1 2 3 4 
formulas 
a list of objects of class 
data 

outcome_true 
a character string specifying the name of the true outcome variable that is free of misclassification but possibly unknown ( 
outcome_mis 
a character string specifying the name of the counterpart of 
exposure_true 
a character string specifying the name of the true exposure variable that is free of misclassification but possibly unknown ( 
exposure_mis 
a character string specifying the name of the counterpart of 
nboot 
number of bootstrap samples. Setting 
conf_level 
the desired confidence level of the confidence interval 
fix_nNAs 
logical indicator specifying whether or not to fix the joint distribution of 
semiparametric 
logical indicator specifying whether or not to parametrically sample 
optim_args 
arguments passed onto 
force_optim 
logical indicator specifying whether or not to force the 
sp 
scalar shrinkage parameter in the interval 
This function is an implementation of the weighting method described by Penning de Vries et al. (2018). The method defaults to the estimator proposed by Gravel and Platt (2018) in the absence of exposure misclassification.
The function assumes that the exposure or the outcome has a misclassified version. An error is issued when both outcome_mis
and exposure_mis
are set to NULL
.
Provided force_optim = FALSE
, ipwm
is considerably more efficient when the optim
function is not invoked; i.e., when (1) exposure_mis = NULL
and the formula for outcome_true
does not contain terms involving outcome_mis
or exposure_true
, (2) outcome_mis = NULL
and the formula for exposure_true
does not contain terms involving exposure_mis
or outcome_true
, or (3) all(is.na(data[, exposure_true]) == is.na(data[, outcome_true]))
and the formulas for exposure_true
and outcome_true
do not contain terms involving exposure_mis
or outcome_mis
. In these cases, ipwm
uses iteratively reweighted least squares via the glm
function for maximum likelihood estimation. In all other cases, optim_args
is passed on to optim
for optimisation of the joint likelihood of outcome_true
, outcome_mis
, exposure_true
and exposure_mis
.
ipwm
returns an object of class ipwm
.
The returned object is a list containing the following elements:
logOR 
the estimated log odds ratio; 
call 
the matched function call. 
If nboot != 0
, the list also contains
SE 
a bootstrap estimate of the standard error for the estimator of the log odds ratio; 
CI 
a bootstrap percentile confidence interval for the log odds ratio. 
Bas B. L. Penning de Vries, [email protected]
Gravel, C. A., & Platt, R. W. (2018). Weighted estimation for confounded binary outcomes subject to misclassification. Statistics in medicine, 37(3), 425436.
Penning de Vries, B. B. L., van Smeden, M., & Groenwold, R. H. H. (2018). A weighting method for simultaneous adjustment for confounding and joint exposureoutcme misclassifications. arXiv preprint arXiv:XXXX.XXXXX.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18  data(sim) # simulated data on 10 covariates, exposure A and outcome Y.
formulas < list(
Y ~ A + L1 + L2 + L3 + L4 + L5 + L6 + L7 + L8 + L9 + L10 + B + Z,
A ~ L1 + L2 + L3 + L4 + L5 + L6 + L7 + L8 + L9 + L10 + B + Z,
Z ~ L1 + L2 + L3 + L4 + L5 + L6 + L7 + L8 + L9 + L10 + B,
B ~ L1 + L2 + L3 + L4 + L5 + L6 + L7 + L8 + L9 + L10
)
ipwm_out < ipwm(
formulas = formulas,
data = sim,
outcome_true = "Y",
outcome_mis = "Z",
exposure_true = "A",
exposure_mis = "B",
nboot = 200,
sp = 1e6
)
ipwm_out

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