Learn R Programming

sampling (version 0.2)

disjonctive: Disjonctive matrix

Description

Transform a categorical variable into a matrix of indicators. The values of the categorical variable must be integer (positive or negative).

Usage

disjonctive(strat)

Arguments

strat
vector of integer numbers.

See Also

balancedstratification

Examples

Run this code
# definition of the variable of stratification
strat=c(-2,3,-2,3,4,4,4,-2,-2,3,4,0,0,0)
# computation of the matrix
disjonctive(strat)

Run the code above in your browser using DataLab