Learn R Programming

QCA (version 1.1-2)

deMorgan: Negate Set-Theoretic Expressions using DeMorgan's Laws

Description

This function negates simple or complex set-theoretic expressions using the two DeMorgan laws.

Usage

deMorgan(expression, prod.split = "", use.tilde = FALSE)

Arguments

expression
A string representing a set-theoretic expression or a solution object of class "qca".
prod.split
The intersection (product) operator (if any).
use.tilde
Logical, use tilde for negation with bivalent variables.

Value

  • A list of solutions with their negations as components if expression is an object of class "qca", or simply a list with the following components if expression is a string:
  • initialThe initial expression.
  • negatedThe negation of the initial expression.

Details

DeMorgan's two laws posit that the complement of a union is the intersection of its separate complements, and the complement of an intersection is the union of its separate complements (Hohn 1966, p.80). The argument expression can be any complex string representing a set-theoretic expression of unions and intersections, or a solution object of class "qca" (objects returned by eqmcc()). Expressions must not contain values from multivalent variables.

References

Hohn, Franz E. 1966. Applied Boolean Algebra: An Elementary Introduction. 2nd ed. New York: Macmillan. Ragin, Charles C. 1987. The Comparative Method: Moving beyond Qualitative and Quantitative Strategies. Berkeley: University of California Press.

See Also

eqmcc

Examples

Run this code
# example from Ragin (1987, p.99)
deMorgan("AC + B~C")

# with different intersection operators
deMorgan("A*C + B*~C", prod.split = "*")
deMorgan("A&C + B&~C", prod.split = "&")

# use solution object of class "qca" returned by eqmcc() function; 
# even with multiple solutions
data(d.Kro)
Kro.sol <- eqmcc(d.Kro, outcome = "WNP", include = "?")
deMorgan(Kro.sol)

Run the code above in your browser using DataLab