# -----
# Cebotari & Vink (2013) fuzzy data
data(CVF)
conds <- CVF[, 1:5]
PROTEST <- CVF$PROTEST
# parameters of fit (default is necessity)
pof(conds, PROTEST)
# parameters of fit negating the conditions
pof(1 - conds, PROTEST)
# same thing with
pof(~conds, PROTEST)
# negating the outcome
pof(conds, 1 - PROTEST)
# same thing as:
pof(conds, ~PROTEST)
# parameters of fit for sufficiency
pof(conds, PROTEST, relation = "suf")
# also negating the outcome
pof(conds, 1 - PROTEST, relation = "suf")
# -----
# standard analysis of necessity
# using the "coms" component from superSubset()
nCVF <- superSubset(CVF, outcome = "PROTEST", incl.cut = 0.90, cov.cut = 0.6)
# also checking their necessity inclusion score in the negated outcome
pof(nCVF$coms, 1 - PROTEST)
# -----
# standard analysis of sufficiency
# using the "pims" component from eqmcc()
# conservative solution
cCVF <- eqmcc(CVF, "PROTEST", incl.cut = 0.8, details = TRUE)
# verify if their negations are also sufficient for the outcome
pof(1 - cCVF$pims, PROTEST)
# -----
# using a DNF expression, translated using the function translate()
# notice that lower case letters means absence a causal condition
pof("natpride + GEOCON => PROTEST", data = CVF)
# same for the negation of the outcome
pof("natpride + GEOCON => ~PROTEST", data = CVF)
# same using lower letters for the negation
pof("natpride + GEOCON => protest", data = CVF)
# necessity is indicated by the reverse arrow
pof("natpride + GEOCON <= PROTEST", data = CVF)Run the code above in your browser using DataLab