adjust_uc_om_sel {multibias} | R Documentation |
Adust for uncontrolled confounding, outcome misclassification, and selection bias.
Description
adjust_uc_om_sel
returns the exposure-outcome odds ratio and
confidence interval, adjusted for uncontrolled confounding, outcome
misclassificaiton, and selection bias.
Usage
adjust_uc_om_sel(
data_observed,
data_validation = NULL,
u_model_coefs = NULL,
y_model_coefs = NULL,
u0y1_model_coefs = NULL,
u1y0_model_coefs = NULL,
u1y1_model_coefs = NULL,
s_model_coefs = NULL,
level = 0.95
)
Arguments
data_observed |
Object of class |
data_validation |
Object of class |
u_model_coefs |
The regression coefficients corresponding to the model: logit(P(U=1)) = α0 + α1X + α2Y, where U is the binary unmeasured confounder, X is the exposure, and Y is the binary true outcome. The number of parameters therefore equals 3. |
y_model_coefs |
The regression coefficients corresponding to the model: logit(P(Y=1)) = δ0 + δ1X + δ2Y* + δ2+jCj, where Y represents 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 therefore equals 3 + j. |
u0y1_model_coefs |
The regression coefficients corresponding to the model: log(P(U=0,Y=1)/P(U=0,Y=0)) = γ2,0 + γ2,1X + γ2,2Y* + γ2,2+jCj, where U is the binary unmeasured confounder, Y is 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 therefore equals 3 + j. |
u1y0_model_coefs |
The regression coefficients corresponding to the model: log(P(U=1,Y=0)/P(U=0,Y=0)) = γ1,0 + γ1,1X + γ1,2Y* + γ1,2+jCj, where U is the binary unmeasured confounder, Y is 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 therefore equals 3 + j. |
u1y1_model_coefs |
The regression coefficients corresponding to the model: log(P(U=1,Y=1)/P(U=0,Y=0)) = γ3,0 + γ3,1X + γ3,2Y* + γ3,2+jCj, where U is the binary unmeasured confounder, Y is 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 therefore equals 3 + j. |
s_model_coefs |
The regression coefficients corresponding to the model: logit(P(S=1)) = β0 + β1X + β2Y* + β2+jC2+j, 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 therefore equals 3 + j. |
level |
Value from 0-1 representing the full range of the confidence interval. Default is 0.95. |
Details
Bias adjustment can be performed by inputting either a validation dataset or
the necessary bias parameters. Two different options for the bias
parameters are availale here: 1) parameters from separate models
of U and Y (u_model_coefs
and y_model_coefs
)
or 2) parameters from a joint model of U and Y
(u1y0_model_coefs
, u0y1_model_coefs
, and
u1y1_model_coefs
). Both approaches require s_model_coefs
.
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.
Value
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).
Examples
df_observed <- data_observed(
data = df_uc_om_sel,
exposure = "X",
outcome = "Ystar",
confounders = c("C1", "C2", "C3")
)
# Using validation data -----------------------------------------------------
df_validation <- data_validation(
data = df_uc_om_sel_source,
true_exposure = "X",
true_outcome = "Y",
confounders = c("C1", "C2", "C3", "U"),
misclassified_outcome = "Ystar",
selection = "S"
)
adjust_uc_om_sel(
data_observed = df_observed,
data_validation = df_validation
)
# Using u_model_coefs, y_model_coefs, s_model_coefs -------------------------
adjust_uc_om_sel(
data_observed = df_observed,
u_model_coefs = c(-0.32, 0.59, 0.69),
y_model_coefs = c(-2.85, 0.71, 1.63, 0.40, -0.85, 0.22),
s_model_coefs = c(0.00, 0.74, 0.19, 0.02, -0.06, 0.02)
)
# Using u1y0_model_coefs, u0y1_model_coefs, u1y1_model_coefs, s_model_coefs
adjust_uc_om_sel(
data_observed = df_observed,
u1y0_model_coefs = c(-0.20, 0.62, 0.01, -0.08, 0.10, -0.15),
u0y1_model_coefs = c(-3.28, 0.63, 1.65, 0.42, -0.85, 0.26),
u1y1_model_coefs = c(-2.70, 1.22, 1.64, 0.32, -0.77, 0.09),
s_model_coefs = c(0.00, 0.74, 0.19, 0.02, -0.06, 0.02)
)