redundant: Identify structurally redundant asf in a csf

View source: R/redundant.R

redundantR Documentation

Identify structurally redundant asf in a csf


redundant takes a character vector cond containing complex solution formulas (csf) as input and tests for each element of cond whether the atomic solution formulas (asf) it consists of are structurally redundant.


redundant(cond, x = NULL, simplify = TRUE)



Character vector specifying complex solution formulas (csf); only strings of type csf are allowed, meaning conjunctions of one or more asf.


An optional argument providing a configTable, a data frame, or a list specifying the factors' value ranges if cond contains multi-value factors; if x is not NULL, cond is tested for redundancy-freeness relative to full.ct(x), otherwise relative to full.ct(cond).


Logical; if TRUE, the result for csfs with the same number of component asfs is presented as a matrix, otherwise all results are presented as a list of logical vectors.


According to the regularity theory of causation underlying CNA, a Boolean dependency structure is causally interpretable only if it does not contain any redundant elements. Boolean dependency structures may feature various types of redundancies, one of which are so-called structural redundancies. A csf \Phi has a structural redundancy if, and only if, reducing \Phi by one or more of the asf it is composed of results in a csf \Phi' that is logically equivalent to \Phi. To illustrate, suppose that \Phi is composed of three asf: asf1 * asf2 * asf3; and suppose that \Phi is logically equivalent to \Phi': asf1 * asf2. In that case, asf3 makes no difference to the behavior of the factors in \Phi and \Phi'; it is structurally redundant and, accordingly, must not be causally interpreted. For more details see the package vignette (vignette("cna")) or Baumgartner and Falk (2019).

The function redundant takes a character vector cond composed of csf as input an tests for each element of cond whether it is structurally redundant or not. As a test for structural redundancies amounts to a test of logical equivalencies, it must be conducted relative to all logically possible configurations of the factors in cond. That space of logical possibilities is generated by full.ct(cond) in case of x = NULL, and by full.ct(x) otherwise. If all factors in cond are binary, x is optional and without influence on the output of redundant. If some factors in cond are multi-value, redundant needs to be given the range of these values. x can be a data frame or configTable listing all possible value configurations or a list of the possible values for each factor in cond.

If redundant returns TRUE for a csf, that csf must not be causally interpreted but further processed by minimalizeCsf. As of version 3.0 of the cna package, standard calls of the cna and csf functions automatically eliminate all structurally redundant asf.


A list of logical vectors or a logical matrix.

If all csf in cond have the same number of asf and simplify = TRUE, the result is a logical matrix with length(cond) rows and the number of columns corresponds to the number of asf in each csf. In all other cases, a list of logical vectors of the same length as cond is returned.


Falk, Christoph: identification and solution of the problem of structural redundancies


Baumgartner, Michael and Christoph Falk. 2019. “Boolean Difference-Making: A Modern Regularity Theory of Causation”. The British Journal for the Philosophy of Science.

See Also

condition, full.ct, is.inus, csf, minimalizeCsf.


# Binary factors.
cond1 <- c("(f + a*D <-> C)*(C + A*B <-> D)*(c + a*E <-> F)", "f + a*D <-> C")

edu.sol <- csf(cna(d.educate), inus.only = FALSE)$condition
redundant(edu.sol, d.educate)

redundant(edu.sol, d.educate, simplify = FALSE)

# Default application of csf() with automatic elimination of structural redundancies.
ct.pban <- configTable(d.pban)
cna.pban <- cna(ct.pban, con = .75, cov = .75)
csf.pban <- csf(cna.pban)
redundant(csf.pban$condition, ct.pban) # no solutions with structural redundancies are returned
# Non-default application of csf() without automatic elimination of structural redundancies.
csf.pban <- csf(cna.pban, inus.only = FALSE)
redundant(csf.pban$condition, ct.pban) # various solutions with structural redundancies are 
                                        # returned

# If no x is specified defining the factors' value ranges, the space of
# logically possible configurations is limited to the factor values contained in
# cond, resulting in structural redundancies that disappear as soon as x is specified.
cond2 <- "(C=0*F=0 + G=1<-> T=2)*(T=2 + G=2 <-> P=1)"
redundant(cond2, list(C=0:2, F=0:2, G=0:3, T=0:2, P=0:2))

cna documentation built on Aug. 11, 2023, 1:09 a.m.