selectiveInference (version 1.2.5)

scaleGroups: Center and scale design matrix by groups

Description

For internal use by groupfs.

Usage

scaleGroups(x, index, center = TRUE, normalize = TRUE)

Arguments

x

Design matrix.

index

Group membership indicator of length p.

center

Center groups, default is TRUE.

normalize

Scale groups by Frobenius norm, default is TRUE.

Value

x

Optionally centered/scaled design matrix.

xm

Means of groups in original design matrix.

xs

Frobenius norms of groups in original design matrix.