Learn R Programming

QCA (version 0.5-1)

eqmcc: Enhanced Quine-McCluskey algorithm

Description

This function is designed to improve the speed and memory problems that qmcc() currently hasm and it has very high chances to replace the main qmcc() in the future; all tests have been successful, the solutions are exactly the same down to the last literal. It has about the same options as qmcc(), minus the "details" and "diffmatrix" arguments which are no longer required. It is called "eqmcc" because it doesn't follow the classic minimization algorithm but a more direct and rapid 'e'nhancement.

Usage

eqmcc(mydata, outcome = "", conditions = c(""), incl.rem = FALSE,
     expl.1 = FALSE, expl.0 = FALSE, expl.ctr = FALSE, expl.mo = FALSE,
     incl.1 = FALSE, incl.0 = FALSE, incl.ctr = FALSE, incl.mo = FALSE,
     quiet = FALSE, chart = FALSE, use.letters = TRUE, show.cases = FALSE)

Arguments

mydata
a truth table (an R object with class "truthTable"), or the dataset used for minimization (either as a dataframe or as a matrix)
outcome
the name of the outcome variable from the dataset
conditions
a string vector containing the conditions' names from the dataset (if not specified, all variables but the outcome are included)
incl.rem
include the remainders in the minimization procedure
expl.1
explain the outcomes equal to 1
expl.0
explain the outcomes equal to 0
expl.ctr
explain the contradictions
expl.mo
explain the missing outcomes (not implemented yet)
incl.1
include the outcomes equal to 1 in the minimization procedure
incl.0
include the outcomes equal to 0 in the minimization procedure
incl.ctr
include the contradictions in the minimization procedure
incl.mo
include the missing outcome in the minimization procedure (not implemented yet)
quiet
print the solution without any other information
chart
print the prime implicants chart
use.letters
should letters be used instead of column names
show.cases
show the lines corresponding to every minimized prime implicant

References

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

Dusa, Adrian 2007 Enhancing Quine-McCluskey, http://www.compasss.org/WPShort.htm

See Also

truthTable, qmcc

Examples

Run this code
data(Osa)

# explaining only the presence of the outcome
eqmcc(Osa, outcome="OUT", expl.1=TRUE)

# now including the remainers and the contradictions
eqmcc(Osa, outcome="OUT", expl.1=TRUE, incl.rem=TRUE, incl.ctr=TRUE)

# the same as above, but we want to see the prime implicants chart
eqmcc(Osa, outcome="OUT", expl.1=TRUE, incl.rem=TRUE, incl.ctr=TRUE, chart=TRUE)

# printing the lines corresponding to each prime implicant
eqmcc(Osa, outcome="OUT", expl.1=TRUE, incl.rem=TRUE, incl.ctr=TRUE, show.cases=TRUE)

# now explaining the absence of the outcome
eqmcc(Osa, outcome="OUT", expl.0=TRUE, incl.rem=TRUE, incl.ctr=TRUE, show.cases=TRUE)

Run the code above in your browser using DataLab