Learn R Programming

LMest (version 2.4.5)

sq: Create a matrix with the combination of vectors of (1,0)

Description

Function that creates a matrix with the combination of all possible row vectors with 't' elements equal to 1 and 'J-t' elements equal to 0. If 't' is NULL the function generates all the possible combinations of vectors of length 'J' with elements (1,0).

Usage

sq(J,t = NULL)

Arguments

J

an integer

t

an integer

Value

M

the resulting matrix