cnaOpt (version 0.1.0)

findOutcomes: Identify the factors that can possibly be modeled as outcomes prior to running CNA

Description

Prior to running CNA (or any other configurational comparative method), findOutcomes identifies those factors in data x that can be modeled as outcomes relative to specified consistency and coverage thresholds con and cov.

Usage

findOutcomes(x, con = 1, cov = 1, ...)

Arguments

x

A data.frame or truthTab; if x is of type multi-value ("mv") or fuzzy-set ("fs"), x must be a truthTab.

con, cov

Numeric scalars between 0 and 1 specifying consistency and coverage thresholds.

Additional arguments passed to truthTab, for instance type, rm.dup.factors, rm.dup.factors, or case.cutoff.

Value

A data.frame.

Details

findOutcomes first runs conCovOpt to find the con-cov optima for all factors in x and then applies selectMax to select those factors with con-cov optima meeting the consistency and coverage thresholds specified in con and cov.

In case of "cs" and "mv" data, an actual model (asf) meeting the specified con and cov thresholds is guaranteed to exist for every factor value with an entry TRUE in the outcome column. The function DNFbuild can be used to build these models. The same does not hold for "fs" data. In case of "fs" data, an entry TRUE in the outcome column simply means that the existence of a model reaching the specified con and cov thresholds cannot be excluded prior to an actual application of cna.

See Also

conCovOpt, selectMax, selectCases, DNFbuild, full.tt

Examples

Run this code
# NOT RUN {
# CS data
findOutcomes(d.educate)
findOutcomes(d.educate, con = 0.75, cov = 0.75)

# A causal chain.
target1 <- "(A + B <-> C)*(C + D <-> E)"
dat1 <- selectCases(target1, full.tt(target1))
findOutcomes(dat1)

# A causal cycle.
target2 <- "(A + Y1 <-> B)*(B + Y2 <-> A)*(A + Y3 <-> C)" 
dat2 <- selectCases(target2, full.tt(target2))
findOutcomes(dat2)


# MV data
findOutcomes(mvtt(d.pban)) # no possible outcomes at con = cov = 1 
findOutcomes(mvtt(d.pban), con = 0.8) 
findOutcomes(d.pban, type = "mv", con = 0.8, cov= 0.8) 


# FS data
findOutcomes(fstt(d.jobsecurity)) # no possible outcomes at con = cov = 1 
findOutcomes(d.jobsecurity, type = "fs", con = 0.86) 


# }

Run the code above in your browser using DataLab