Skip to contents

Compute the marginal null t-statistics for a set of contrasts and their (two-sided) p-value by bootstrapping the residuals

Usage

row_lm_test(
  Y,
  X,
  C,
  alternative = c("two.sided", "less", "greater"),
  groups = matrix(1:ncol(Y), ncol = 1)
)

Arguments

Y

A data matrix of size $n$ observations (in row) and $D$ features in columns

X

A design matrix of size $n$ observations (in row) and $p$ variables (in columns)

C

A contrast matrix of size $L$ tested contrasts (in row) and $p$ columns corresponding to the parameters to be tested

alternative

A character string specifying the alternative hypothesis. Must be one of "two.sided" (default), "greater" or "less".

groups

A numeric matrix of \(n\) rows and \(B\) columns values in \(1, ..., n\), the indicator of the sample used in the test.

Value

A list containing the following components:

statistic

the value of the t-statistics

p.value

the p-values for the tests

Each of these elements is a matrix of size m x B, coerced to a vector of length m if B=1