df_observed <- data_observed(
data = df_uc_sel,
exposure = "X",
outcome = "Y",
confounders = c("C1", "C2", "C3")
)
# Using validation data -----------------------------------------------------
df_validation <- data_validation(
data = df_uc_sel_source,
true_exposure = "X",
true_outcome = "Y",
confounders = c("C1", "C2", "C3", "U"),
selection = "S"
)
adjust_uc_sel(
data_observed = df_observed,
data_validation = df_validation
)
# Using u_model_coefs and s_model_coefs -------------------------------------
adjust_uc_sel(
data_observed = df_observed,
u_model_coefs = c(-0.19, 0.61, 0.72, -0.09, 0.10, -0.15),
s_model_coefs = c(-0.01, 0.92, 0.94)
)
Run the code above in your browser using DataLab