adjust_om_sel
returns the exposure-outcome odds ratio and confidence
interval, adjusted for outcome misclassification and selection bias.
adjust_om_sel(
data,
exposure,
outcome,
confounders = NULL,
y_model_coefs,
s_model_coefs,
level = 0.95
)
A list where the first item is the odds ratio estimate of the effect of the exposure on the outcome and the second item is the confidence interval as the vector: (lower bound, upper bound).
Dataframe for analysis.
String name of the exposure variable.
String name of the outcome variable.
String name(s) of the confounder(s). A maximum of three confounders is allowed.
The regression coefficients corresponding to the model: logit(P(Y=1)) = δ0 + δ1X + δ2Y* + δ2+jCj, where Y represents the binary true outcome, X is the exposure, Y* is the binary misclassified outcome, C represents the vector of measured confounders (if any), and j corresponds to the number of measured confounders. The number of parameters is therefore 3 + j.
The regression coefficients corresponding to the model: logit(P(S=1)) = β0 + β1X + β2Y* + β2+jCj, where S represents binary selection, X is the exposure, Y* is the binary misclassified outcome, C represents the vector of measured confounders (if any), and j corresponds to the number of measured confounders. The number of parameters is therefore 3 + j.
Value from 0-1 representing the full range of the confidence interval. Default is 0.95.
Values for the regression coefficients can be applied as
fixed values or as single draws from a probability
distribution (ex: rnorm(1, mean = 2, sd = 1)
). The latter has
the advantage of allowing the researcher to capture the uncertainty
in the bias parameter estimates. To incorporate this uncertainty in the
estimate and confidence interval, this function should be run in loop across
bootstrap samples of the dataframe for analysis. The estimate and
confidence interval would then be obtained from the median and quantiles
of the distribution of odds ratio estimates.
adjust_om_sel(
df_om_sel,
exposure = "X",
outcome = "Ystar",
confounders = "C1",
y_model_coefs = c(-3.24, 0.58, 1.59, 0.45),
s_model_coefs = c(0.03, 0.92, 0.12, 0.05)
)
Run the code above in your browser using DataLab