attribute_bijection: Constructs Unique Attribute Pattern Map for Binary Data

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/RcppExports.R

Description

Computes the powers of 2 from 0 up to K - 1 for K-dimensional attribute pattern.

Usage

1

Arguments

K

Number of Attributes.

Details

The bijection vector generated is \mathbf v = (2^{K-1},2^{K-2},…,1)^\top. With the bijection vector, there is a way to map the binary latent class with c=\mathbfα_c^\top\mathbf v\in\{0, 1,…, 2^{K}-1\}. For example, for K = 2, \mathbf v=(2, 1)^\top and the integer representations for attribute profiles \mathbf α_0=(0,0)^\top, \mathbf α_1=(0,1)^\top, \mathbf α_2=(1, 0)^\top, and \mathbf α_3=(1,1)^\top are c = 0, 1, 2, and 3, respectively.

Value

A vec with length K detailing the power's of 2.

Author(s)

Steven Andrew Culpepper and James Joseph Balamuta

See Also

attribute_inv_bijection()

Examples

1
2
3
4
## Construct an attribute bijection for binary data ----
bijection_k3 = attribute_bijection(3)

bijection_k3

tmsalab/edmcore documentation built on Sept. 4, 2021, 2:46 a.m.