df_observed <- data_observed(
data = df_uc,
exposure = "X_bi",
outcome = "Y_bi",
confounders = c("C1", "C2", "C3")
)
# Using validation data -----------------------------------------------------
df_validation <- data_validation(
data = df_uc_source,
true_exposure = "X_bi",
true_outcome = "Y_bi",
confounders = c("C1", "C2", "C3", "U")
)
adjust_uc(
data_observed = df_observed,
data_validation = df_validation
)
# Using u_model_coefs -------------------------------------------------------
adjust_uc(
data_observed = df_observed,
u_model_coefs = c(-0.19, 0.61, 0.70, -0.09, 0.10, -0.15)
)
Run the code above in your browser using DataLab