Description Usage Arguments Value Examples
For a constant set of explanatory variables (xs
) and several dependent
variables (ys
), fit a linear model y ~ xs
for each y
in ys
.
1 |
df |
A data frame containing explanatory variables |
xs |
A character vector. The explanatory variables. These must be the
names of columns of |
ys |
A character vector. The dependent variables. These must be the
names of numeric columns of |
robust |
A flag. Use robust linear model |
A list of fitted linear models (the results of calls to stats::lm()
or MASS::rlm()
).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | if (rlang::is_installed("mirmisc")) {
gars_data <- get_combined_cohort_data(c("ga", "rs"),
gene_predicate = ~ median(.) > 0, log2 = TRUE
) %>%
dplyr::mutate(
cohort = factor(
dplyr::if_else(startsWith(mirvie_id, "RS"), "RS", "GA")
)
) %>%
dplyr::filter(!is.na(meta_major_race), !is.na(meta_collectionga))
xs <- c("cohort", "meta_major_race", "meta_collectionga")
ys <- mirmisc::get_df_gene_names(gars_data)
res <- multi_lm(gars_data, xs, ys)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.