Skip to contents

Generates all possible variable subsets of a given order k (\(k \ge 3\)).

Usage

generate_all_multiplets(n_vars, k = 3)

Arguments

n_vars

Total number of variables.

k

Order of candidate multiplets (\(k \ge 3\)).

Value

A list of integer vectors, each representing a variable subset of size k.

Details

This function implements the brute-force candidate generation strategy described by Marinazzo et al. (2024), where every possible combination of variables of size k is evaluated. Although exhaustive, the number of candidate multiplets grows combinatorially with the number of variables \(\binom{p}{k}\)

where \(p\) is the number of variables.

For large psychometric datasets this approach may become computationally expensive, motivating more selective candidate generation procedures such as those proposed by Possenti et al. (2026).

References

Marinazzo, D., Van Roozendaal, J., Rosas, F. E., Stella, M., Comolatti, R., Colenbier, N., Stramaglia, S., & Rosseel, Y. (2024). An information-theoretic approach to build hypergraphs in psychometrics. Behavior Research Methods, 56(7), 8057-8079. https://doi.org/10.3758/s13428-024-02471-8

Examples

generate_all_multiplets(
  n_vars = 5,
  k = 3
)
#> [[1]]
#> [1] 1 2 3
#> 
#> [[2]]
#> [1] 1 2 4
#> 
#> [[3]]
#> [1] 1 2 5
#> 
#> [[4]]
#> [1] 1 3 4
#> 
#> [[5]]
#> [1] 1 3 5
#> 
#> [[6]]
#> [1] 1 4 5
#> 
#> [[7]]
#> [1] 2 3 4
#> 
#> [[8]]
#> [1] 2 3 5
#> 
#> [[9]]
#> [1] 2 4 5
#> 
#> [[10]]
#> [1] 3 4 5
#>