Learn R Programming

QCA (version 1.0-2)

allExpressions: Create a Matrix with all Possible Combinations of Conditions

Description

There are exactly $3^k$ possible expressions (where $k$ is the number of conditions) for a binary crisp-set procedure. For multi-value crisp data, the general formula for the number of possible expressions is prod(noflevels + 1), where noflevels is a vector with the number of levels for each causal condition. As the matrix grows exponentially, it is not recommended to run this function for a large number of conditions (> 15).

Usage

allExpressions(noflevels, raw = FALSE, arrange = FALSE)

Arguments

noflevels
The number of levels for each causal condition
raw
Logical, return the raw result matrix; if FALSE, print the result matrix without NAs
arrange
Logical, try to arrange the result matrix for visual inspection (takes a lot of additional time for large matrices)

Value

  • A matrix with prod(noflevels + 1) rows

References

C. C. Ragin. Fuzzy-Set Social Science, University of Chicago Press, Chicago, 2000.

See Also

createMatrix

Examples

Run this code
# for 3 conditions
allExpressions(rep(3, 3))

# the same matrix, this time arranged better
allExpressions(rep(3, 3), arrange = TRUE)

Run the code above in your browser using DataLab