Description Usage Arguments Value Examples
Get the fitted values from multiple linear models.
1 | multi_fitteds(lms, lms_data = NULL, new_data = NULL)
|
lms |
A list of fitted linear models (the results of calls to |
lms_data |
The data frame that was passed as the |
new_data |
Rather than calculating the residuals on the data where the model was fit, you can pass a new dataset and calculate the residuals there. |
A data frame of the fitted values The variables in this data frame
will have their original names. If lms_data
is given, other columns (ones
for which residuals were not calculated) of that data frame will be
returned as is.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | if (rlang::is_installed("mirmisc")) {
gars_data <- get_combined_cohort_data(c("ga", "rs"), log2 = TRUE) %>%
dplyr::mutate(
cohort = factor(
dplyr::if_else(startsWith(mirvie_id, "RS"), "RS", "GA")
),
meta_major_race = forcats::fct_drop(meta_major_race)
) %>%
dplyr::filter(!is.na(meta_major_race), !is.na(meta_collectionga))
xs <- c("cohort", "meta_major_race", "meta_collectionga")
ys <- gars_data %>%
dplyr::select(dplyr::any_of(mirmisc::get_gene_names())) %>%
purrr::map_dbl(sum) %>%
sort() %>%
tail(100) %>%
names() # ys are the highest expressed 100 genes
lms <- multi_lm(gars_data, xs, ys)
fitteds <- multi_fitteds(lms, gars_data)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.