massGLM: Mass-univariate GLM Analysis

View source: R/massGLM.R

massGLMR Documentation

Mass-univariate GLM Analysis

Description

Mass-univariate GLM Analysis

Usage

massGLM(x, y, scale_y = NULL, center_y = NULL, verbosity = 1L)

Arguments

x

tabular data: Predictor variables. Usually a small number of covariates.

y

data.frame or similar: Each column is a different outcome. The function will train one GLM for each column of y. Usually a large number of features.

scale_y

Logical: If TRUE, scale each column of y to have mean 0 and sd 1. If NULL, set to TRUE if y is numeric, FALSE otherwise.

center_y

Logical: If TRUE, center each column of y to have mean 0. If NULL, set to TRUE if scale_y is TRUE, FALSE otherwise.

verbosity

Integer: Verbosity level.

Value

MassGLM object.

Author(s)

EDG

Examples

set.seed(2022)
y <- rnormmat(500, 40, return_df = TRUE)
x <- data.frame(
  x1 = y[[3]] - y[[5]] + y[[14]] + rnorm(500),
  x2 = y[[21]] + rnorm(500),
  g = factor(sample(letters[1:3], 500, replace = TRUE))
)
massmod <- massGLM(x, y)
# Print table of coefficients, p-values, etc. for all models
summary(massmod)

rtemis documentation built on Oct. 20, 2026, 1:06 a.m.