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)
)
Run the code above in your browser using DataLab