R/RcppExports.R
attribute_bijection.Rd
Computes the powers of 2 from \(0\) up to \(K - 1\) for \(K\)-dimensional attribute pattern.
attribute_bijection(K)
K | Number of Attributes. |
---|
A vec
with length \(K\) detailing the power's of 2.
The bijection vector generated is \(\mathbf v = (2^{K-1},2^{K-2},\dots,1)^\top\). With the bijection vector, there is a way to map the binary latent class with \(c=\mathbf\alpha_c^\top\mathbf v\in\{0, 1,\dots, 2^{K}-1\}\). For example, for \(K = 2\), \(\mathbf v=(2, 1)^\top\) and the integer representations for attribute profiles \(\mathbf \alpha_0=(0,0)^\top\), \(\mathbf \alpha_1=(0,1)^\top\), \(\mathbf \alpha_2=(1, 0)^\top\), and \(\mathbf \alpha_3=(1,1)^\top\) are \(c\) = 0, 1, 2, and 3, respectively.
Steven Andrew Culpepper and James Joseph Balamuta
## Construct an attribute bijection for binary data ---- bijection_k3 = attribute_bijection(3) bijection_k3#> [,1] #> [1,] 4 #> [2,] 2 #> [3,] 1