massGLAM | 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
massGLAM(
x,
y,
scale.x = FALSE,
scale.y = FALSE,
mod = c("glm", "gam"),
type = NULL,
xnames = NULL,
ynames = NULL,
spline.index = NULL,
gam.k = 6,
save.mods = TRUE,
print.plot = FALSE,
include_anova_pvals = NA,
verbose = TRUE,
trace = 0,
n.cores = 1
)
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 |
mod |
Character: "glm" or "gam". |
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 |
spline.index |
Integer vector: indices of features to fit splines for. |
gam.k |
Integer: The dimension of the spline basis. |
save.mods |
Logical: If TRUE, save models. Default = TRUE |
print.plot |
Logical: If TRUE, print plot. Default = FALSE (best to choose which p-values you want to plot directly) |
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. |
n.cores |
Integer: Number of cores to use. (Testing only, do not change from 1) |
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 <- massGLAM(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.