AmatrixSparse: Generate the matrix A, whose columns are the vertices of the...

View source: R/AmatrixSparse.R

AmatrixSparseR Documentation

Generate the matrix A, whose columns are the vertices of the marginal polytope, as a sparse matrix.

Description

Generate the matrix A, whose columns are the vertices of the marginal polytope, as a sparse matrix.

Usage

AmatrixSparse(bS, M)

Arguments

bS

A binary matrix specifying the set of observation patterns. Each row encodes a single pattern.

M

A vector of positive integers giving the alphabet sizes of the discrete variables.

Value

The matrix A.

Examples

bS=matrix(c(1,1,0, 1,0,1, 0,1,1),byrow=TRUE,ncol=3)
M=c(2,2,2)
AmatrixSparse(bS,M)



MCARtest documentation built on Oct. 29, 2024, 5:08 p.m.