Learn R Programming

QCA (version 0.4-6)

allExpressions: Create a matrix with all possible combinations of conditions

Description

There are $3^k-1$ possible expressions (where k is the number of conditions) for a crisp-set procedure. Possible values for conditions are 1 (presence), 0 (absence) and NA (the condition being a subset of a larger one). The matrix grows exponentially so it is not reccomended to run this function for large number of conditions (say over 12) as the computer will quickly run out of resources.

Usage

allExpressions(no.conditions, inside=TRUE, arrange=FALSE)

Arguments

no.conditions
the number of conditions from the dataset
inside
if TRUE, returns the raw result matrix; if FALSE, print the result matrix without NAs
arrange
if TRUE the program tries hard to arrange the result matrix for visual inspection (however this takes a lot of additional time for large matrices)

Value

  • a matrix with $3^k-1$ rows

References

Ragin, Charles C. 2000 Fuzzy-set social science, Chicago: The University of Chicago Press

Examples

Run this code
# for 3 conditions
allExpressions(3, inside=FALSE)

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

Run the code above in your browser using DataLab