# Load Example Data
data("example_data")
# Get names of omics
colnames_omic_fts <- colnames(example_data)[grep("feature_",
colnames(example_data))][1:10]
# Meet in the middle with a dichotomous outcome
res <- meet_in_middle(df = example_data,
exposure = "exposure1",
outcome = "disease1",
omics = colnames_omic_fts,
covars = c("age", "sex"),
outcome_family = "binomial")
# Meet in the middle with a continuous outcome
res <- meet_in_middle(df = example_data,
exposure = "exposure1",
outcome = "weight",
omics = colnames_omic_fts,
covars = c("age", "sex"),
outcome_family = "gaussian")
# Meet in the middle with a continuous outcome and no covariates
res <- meet_in_middle(df = example_data,
exposure = "exposure1",
outcome = "weight",
omics = colnames_omic_fts,
outcome_family = "gaussian")
Run the code above in your browser using DataLab