Skip to contents

This function runs a QCA with necessary conditions, truth table, and minimized solution(s). This is merely a wrapper using the QCA package.

Usage

get_qca(
  df,
  dv,
  negate = FALSE,
  conditions,
  n.cut = 1,
  incl.cut = 0.8,
  complex = TRUE,
  dir.exp = NULL,
  ...
)

Arguments

df

data.frame

dv

(character) outcome variable name

negate

(logical) negate outcome? (default FALSE)

conditions

(character) vector of variable names to use as conditions

n.cut

(integer) minimum number of observations in each configuration (if less than n.cut, observations are treated as remainders; default 1)

incl.cut

(numeric) minimum coherence threshold (default .8, recommended for fuzzy sets; another conventional value is .75 for crisp sets)

complex

(logical) complex solution? (default TRUE) if FALSE and dir.exp is NULL (default), the solution is parsimonious, otherwise solution is intermediate

dir.exp

(character) vector indicating directional expectations for each condition (required for intermediate solution); negate conditions with ~ (e.g. c("cond1", "~cond2"))

...

(optional) additional named arguments passed to QCA::truthTable()

Value

list with elements:

nec

Necessary conditions (from calling QCA::pofind())

tt

Truth table (from calling QCA::truthTable())

eq

Minimized solution(s) (from calling QCA::minimize())

Examples

if (FALSE) {
df |> get_qca(
   dv="numeric_transformation",
   negate=FALSE,
   conditions=c("RH", "RF", "RI", "RT"),
   n.cut=1,
   incl.cut=.8,
   complex=TRUE
)
}