massGLM | R Documentation |
Run a mass-univariate analysis with either: a) single outome (y) and multiple predictors (x), one at a time, with an optional common set of covariates in each model - "massx" b) multiple different outcomes (y) with a fixed set of predictors (x) - "massy" Therefore, the term mass-univariate refers to looking at one variable of interest (with potential covariates of no interest) at a time
massGLM(
x,
y,
scale.x = FALSE,
scale.y = FALSE,
type = NULL,
xnames = NULL,
ynames = NULL,
coerce.y.numeric = FALSE,
save.mods = FALSE,
print.plot = FALSE,
include_anova_pvals = NA,
verbose = TRUE,
trace = 0
)
x |
Matrix / data frame of features |
y |
Matrix / data frame of outcomes |
scale.x |
Logical: If TRUE, scale and center |
scale.y |
Logical: If TRUE, scale and center |
type |
Character: "massx" or "massy". Default = NULL, where if (NCOL(x) > NCOL(y)) "massx" else "massy" |
xnames |
Character vector: names of |
ynames |
Character vector: names of |
coerce.y.numeric |
Logical: If |
save.mods |
Logical: If TRUE, save models. |
print.plot |
Logical: If TRUE, print plot. |
include_anova_pvals |
Logical: If TRUE, include ANOVA p-values,
(generated by |
verbose |
Logical: If TRUE, print messages during run |
trace |
Integer: If > 0, print more verbose output to console. |
E.D. Gennatas
## Not run:
# Common usage is "reversed":
# x: outcome of interest as first column, optional covariates
# in the other columns
# y: features whose association with x we want to study
set.seed(2022)
features <- rnormmat(500, 40)
outcome <- features[, 3] - features[, 5] + features[, 14] + rnorm(500)
massmod <- massGLM(outcome, features)
plot(massmod)
plot(massmod, what = "coef")
plot(massmod, what = "volcano")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.