col_index: A function indexing the columns of A

View source: R/col_index.R

col_indexR Documentation

A function indexing the columns of A

Description

A map from the joint space to an index set.

Usage

col_index(M, x)

Arguments

M

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

x

An element of the joint space.

Value

A positive integer no greater than the cardinality of the joint space uniquely identifying x.

Examples

M=c(2,2,2)
col_index(M,c(1,1,1))
col_index(M,c(1,1,2))

M=c(4,3,2)
col_index(M,c(1,1,1))
col_index(M,c(2,1,1))
col_index(M,c(1,2,1))
col_index(M,c(1,1,2))

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

Related to col_index in MCARtest...