minimalizeCsf {cna} | R Documentation

## Eliminate structural redundancies from csf

### Description

`minimalizeCsf` eliminates structural redundancies from complex solutions formulas (csf) by recursively testing their component atomic solution formulas (asf) for redundancy and eliminating the redundant ones.

### Usage

    minimalizeCsf(x, ...)

    ## Default S3 method:
    minimalizeCsf(x, data = full.tt(x), verbose = FALSE, ...)
    ## S3 method for class 'cna'
    minimalizeCsf(x, n = 20, verbose = FALSE, ...)
    ## S3 method for class 'minimalizeCsf'
    print(x, subset = 1:5, ...)

### Arguments

`x` | In the default method, `x` is a character vector specifying csf. The `cna` method uses the strings representing the csf contained in an output object of `cna` (see details).
`data` | Data frame, matrix or `truthTab` with the data; optional if all factors in `x` are binary but required if some factors are multi-value.
`verbose` | Logical; if `TRUE` additional messages on the number of csf that are found to be reducible are printed.
`n` | Minimal number of csf to use.
`subset` | Integer vector specifying the numbers of csf to be displayed.
`...` | Further arguments passed to the methods.

### Details

The core criterion that Boolean dependency structures must satisfy in order to be causally interpretable is redundancy-freeness. In atomic solution formulas (asf), both sufficient and necessary conditions are completely free of redundant elements. However, when asf are conjunctively combined to complex solution formulas (csf), new redundancies may arise. A csf may contain redundant parts. To illustrate, assume that a csf is composed of three asf: asf1 * asf2 * asf3. It can happen that the conjunction asf1 * asf2 * asf3 is logically equivalent to a proper part of itself, say, to asf1 * asf2. In that case, asf3 is a so-called structural redundancy in asf1 * asf2 * asf3 and must not be causally interpreted. See the cna package vignette or Baumgartner and Falk (2018) for more details.

`minimalizeCsf` recursively tests the `asf` contained in a `csf` for structural redundancies and eliminates the redundant ones. It takes a character vector `x` specifying csf as input and builds all redundancy-free csf that can be inferred from `x`. The function is especially useful in combination with `cna`, which builds csf by conjunctively concatenating asf. One of the `cna` solution attributes, which is accessed via `details = TRUE` or `details = "r"`, is called "redundant". If a csf output by `cna` has the attribute `redundant == TRUE`, that csf has at least one structurally redundant part. The `cna` function, however, does not identify those redundant parts. For this purpose, the `cna` object must be passed on to `minimalizeCsf`.

There are two possibilities to use `minimalizeCsf`. Either the csf to be tested for structural redundancies is passed to `minimalizeCsf` as a character vector (this is the default method), or `minimalizeCsf` is applied directly to the output of `cna`. In the latter case, the csf are extracted from the `cna`-object.

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 `x`. That space of logical possibilities is generated by `full.tt(x)` if the `data` argument takes its default value. If all factors in `x` are binary, providing a non-default `data` value is optional and without influence on the output of `minimalizeCsf`. If some factors in `x` are multi-value, `minimalizeCsf` needs to be given the range of these values by means of the `data` argument. `data` can be a data frame or `truthTab` listing all possible value configurations.

### Value

`minimalizeCsf` returns an object of class "minimalizeCsf", essentially a data frame.

### Contributors

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

### References

Baumgartner, Michael and Christoph Falk. 2018. “Boolean Difference-Making: A Modern Regularity Theory of Causation”. PhilSci Archive. url: http://philsciarchive.pitt.edu/id/eprint/14876.

### See Also

`csf`, `cna`, `redundant`, `full.tt`.

### Examples

    # The default method.
    minimalizeCsf("(f + a*D <-> C)*(C + A*B <-> D)*(c + a*E <-> F)")
    minimalizeCsf("(f + a*D <-> C)*(C + A*B <-> D)*(c + a*E <-> F)",
                  verbose = TRUE) # Same result, but with some messages.

    # The cna method.
    dat1 <- selectCases("(C + A*B <-> D)*(c + a*E <-> F)")
    ana1 <- cna(dat1, details = c("r"))
    csf(ana1)
    # The attribute "redundant" taking the value TRUE in ana1 shows that this csf contains
    # at least one redundant element. Only the application of minimalizeCsf() identifies
    # the redundant element.
    minimalizeCsf(ana1)

    # Real data entailing a large number of csf with many redundancies.
    tt.js <- fstt(d.jobsecurity)
    cna.js <- cna(tt.js, con = .8, cov = .8)
    minim100 <- minimalizeCsf(cna.js, n = 100) # may take a couple of seconds...
    minim100  # By default the first 5 solutions are displayed.

    # With mv data.
    tt.pban <- mvtt(d.pban)
    cna.pban <- cna(tt.pban, con = .75, cov = .75)
    csf.pban <- csf(cna.pban, 100)
    sol.pban <- csf.pban$condition

    minim.pban <- minimalizeCsf(sol.pban, tt.pban)
    as.character(minim.pban$condition)

    # Alternatively, a more direct replication of the above using the cna method.
    minim.pban <- minimalizeCsf(cna.pban, n = 100)
    print(minim.pban, 1:50) # print the first 50 redundancy-free csf

[Package cna version 2.2.0 Index]