df_observed <- data_observed(
data = df_om_sel,
exposure = "X",
outcome = "Ystar",
confounders = "C1"
)
# Using validation data -----------------------------------------------------
df_validation <- data_validation(
data = df_om_sel_source,
true_exposure = "X",
true_outcome = "Y",
confounders = "C1",
misclassified_outcome = "Ystar",
selection = "S"
)
adjust_om_sel(
data_observed = df_observed,
data_validation = df_validation
)
# Using y_model_coefs and s_model_coefs -------------------------------------
adjust_om_sel(
data_observed = df_observed,
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