# csQCA using Krook (2010)
#-------------------------
data(Krook)
Krook
x <- Krook[,1:5]
# get necessity parameters of fit for all conditions
pof(x, Krook, outcome = "WNP")
# now for the negated outcome
pof(x, Krook, outcome = "WNP", neg.out = TRUE)
# get sufficiency parameters of fit for all original conditions
pof(x, Krook, outcome = "WNP", relation = "sufficiency")
# now for the negated outcome
pof(x, Krook, outcome = "WNP", neg.out = TRUE, relation = "sufficiency")
# fsQCA using Emmenegger (2011)
#------------------------------
data(Emme)
Emme
# first test for necessary conditions with superSubset(), then
# check whether the returned combinations are also necessary for
# the negation of the outcome
EmmeNR <- superSubset(Emme, outcome = "JSR", incl.cut = 0.965, cov.cut = 0.6)
EmmeNR
pof(EmmeNR$coms, Emme, outcome = "JSR", neg.out = TRUE)
# first derive the complex solution, then check whether the negations
# of the prime implicants are also sufficient for the outcome
EmmeSC <- eqmcc(Emme, outcome = "JSR", incl.cut1 = 0.9, details = TRUE)
EmmeSC
pof(1 - EmmeSC$pims$c.sol, Emme, outcome = "JSR", relation = "sufficiency")
# parameters of fit for any term, including configurations;
# use "-1" as a placeholder for a minimized literal;
# [,1] [,2] [,3] [,4] [,5] [,6]
#[1,] -1 -1 -1 1 0 1
#[2,] 1 0 1 -1 1 0
confs <- matrix(c(-1, -1, -1, 1, 0, 1,
1, 0, 1, -1, 1, 0), nrow = 2, byrow = TRUE)
confs
pof(confs, Emme, outcome = "JSR", relation = "sufficiency")
# or even vectors of line numbers from the n^k matrix
pof(c(43, 57), Emme, "JSR", relation = "sufficiency")
# in this case, the line numbers 43 and 57 represent the following
# terms / configurations:
# [,1] [,2] [,3] [,4] [,5] [,6]
#[1,] -1 -1 0 0 1 -1 -> l*r*P
#[2,] -1 -1 1 -1 -1 1 -> L*V
getRow(rep(3, 6), c(43, 57)) - 1
Run the code above in your browser using DataLab