Mass-univariate GLM Analysis
Arguments
- x
data.frame or similar: Predictor variables
- y
data.frame or similar: Each column is a different outcome. The function will train one GLM for each column of
y.- scale_y
Logical: If TRUE, scale each column of
yto have mean 0 and sd 1. IfNULL, defaults to TRUE ifyis numeric, FALSE otherwise.- center_y
Logical: If TRUE, center each column of
yto have mean 0. IfNULL, defaults to TRUE ifscale_yis TRUE, FALSE otherwise.- verbosity
Integer: Verbosity level.
Examples
if (FALSE) { # \dontrun{
# 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)
y <- data.table(rnormmat(500, 40))
x <- data.table(
x1 = y[[3]] - y[[5]] + y[[14]] + rnorm(500),
x2 = y[[21]] + rnorm(500)
)
massmod <- massGLM(x, y)
plot(massmod)
} # }