Description Usage Arguments Details Value Examples
Given a list of linear models (the results of calls to stats::lm()
or
MASS::rlm()
), all of which used the same explanatory variables with the
same dataset (most likely the output of a call to multi_lm()
), perform
analyses of variance on all of them and arrange the result into a single
data frame.
1 |
lms |
A list of fitted linear models (the results of calls to |
lms_data |
The data frame that was passed as the |
type |
The type of sum of squares to use. Types I and II are currently supported. Type I can be used with either default or robust linear models, but type II cannot be used with robust linear models. |
lms_data
is needed to ensure that the elements of the y
column in the
return match the input. You should provide this argument if you can at all.
An object of class mirmodels_multi_aov_df
. A long data frame
with columns:
y
: The name of the response variable
x
: The name of the explanatory variable.
pctvarexp
: The percent of variance explained by x
.
pval
: The p-value for x explaining a non-zero amount of y
's variance.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | if (requireNamespace("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_collectionga), !is.na(meta_major_race))
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, robust = TRUE)
aovs <- multi_aov(lms)
summary(aovs)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.