incidenceMatrix: Compute the incidence matrix indicating group memebership

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Compute a p-by-J sparse matrix indicating which group(s) the variable(s) belong(s) to.

Usage

1

Arguments

X

The design matrix, without an intercept, as in grpregOverlap.

group

A list of vectors containing group information, as in grpregOverlap.

Details

This function is intended to provide an interface for users to construct the so-called incidence matrix, denoted as M, with dimension p-by-J, where p is the number of variables, and J is the number of groups. If variable i is contained by group j, then M[i, j] = 1; otherwise, M[i, j] = 0.

Note that since a variable can be contained by multiple groups, so the sum of row M[i, ] can be larger than 1.

Value

A sparse p-by-J matrix as described above.

Author(s)

Yaohui Zeng <yaohui-zeng@uiowa.edu>

See Also

grpregOverlap, overlapMatrix

Examples

1
2
3
4
5
data(pathway.dat)
X <- pathway.dat$expression
group <- pathway.dat$pathways
incidence.mat <- incidenceMatrix(X, group)
dim(incidence.mat)

grpregOverlap documentation built on May 2, 2019, 4:47 a.m.