createMatrix {QCA}R Documentation

Create a base matrix for the truth table

Description

The truth table consists from all combinations of presence/absence of conditions (coded binary 1/0). There are 2^k such combinations and this function should be among the fastests to create this matrix, using ideas inspired from expand.grid

Usage

createMatrix(noflevels)

Arguments

noflevels a vector containing the number of levels for each variable in the dataset

Author(s)

Adrian Dusa
University of Bucharest, Faculty of Sociology and Social Work
dusa.adrian@unibuc.ro

References

Ragin, Charles C. (1987) The Comparative Method. Moving beyond qualitative and quantitative strategies, Berkeley: University of California Press

See Also

truthTable

Examples

# create a binary matrix based on 3 conditions
createMatrix(rep(2, 3))

# create a matrix based on 3 conditions where the second has three levels
createMatrix(c(2, 3, 2))

# the matrix has 2*3*2 = 12 rows

[Package QCA version 0.6-3 Index]