indmat {cds}R Documentation

Create an Indicator Matrix

Description

Creates an indicator matrix from a grouping vector.

Usage

indmat(grp.vec, K = length(unique(grp.vec)))

Arguments

grp.vec

Numeric vector giving the group membership.

K

Scalar indicating the number of groups. Defaults to the number of unique elements in grp.vec.


[Package cds version 1.0.3 Index]