mini_batch_rowTestFUN: Mini batch version of a rowTestFUN function.

View source: R/mini_batch_rowTestFUN.R

mini_batch_rowTestFUNR Documentation

Mini batch version of a rowTestFUN function.

Description

Mini batch version of a rowTestFUN function.

Usage

mini_batch_rowTestFUN(
  rowTestFUN,
  Y,
  categ,
  alternative = c("two.sided", "less", "greater"),
  max_batch_size = 1e+06
)

Arguments

rowTestFUN

A function taking as inputs Y, categ and Alternative and giving as a result a matrix of $p$-values. Example rowWelchTests or rowWilcoxonTests.

Y

A m \times n numeric matrix whose rows correspond to variables and columns to observations

categ

Either a numeric vector of n categories in 0, 1 for the observations, or a n x B matrix stacking B such vectors (typically permutations of an original vector of size n)

alternative

A character string specifying the alternative hypothesis. Must be one of "two.sided" (default), "greater" or "less". As in t.test, alternative = "greater" is the alternative that class 1 has a larger mean than class 0.

max_batch_size

A number specifying the maximum size of information in each batch

Value

the p-values for the test

Examples

p <- 53 
n <- 35
mat <- matrix(rnorm(p * n), ncol = n)
cls <- rep(c(0, 1), times = c(10, n - 10))
mini_batch_rowTestFUN(rowTestFUN = rowWelchTests, Y = mat, 
                      categ = cls, alternative = "two.sided", 
                      max_batch_size = 1e6)

pneuvial/sanssouci documentation built on July 4, 2025, 3:16 p.m.