detailMeasures function

Calculate summary measures for msc, asf, and csf

Calculate summary measures for msc, asf, and csf

detailMeasures can calculate all available measures for sufficiency and necessity evaluation (e.g. prevalence-adjusted consistency and antecedent-adjusted coverage), independently of whether they are used for model building, as well as additional solution attributes (e.g. exhaustiveness or faithfulness).

detailMeasures(cond, x, what = c("inus", "cyclic", "exhaustiveness", "faithfulness", "coherence"), cycle.type = c("factor", "value"), ...)

Arguments

  • cond: Character vector specifying a set of minimally sufficient conditions (msc) or solution formulas (asf or csf) in the standard format (cf. condition/condList). Blanks are allowed.
  • x: Data frame, configTable, or matrix.
  • what: Character vector specifying the evaluation measures and additional solution attributes to be computed. Possible elements are all the measures in showMeasures. Can also be TRUE/FALSE. If FALSE, no additional measures are returned; if TRUE, all measures in showDetailMeasures are computed.
  • cycle.type: Character string specifying what type of cycles to be detected: "factor" (the default) or "value" (cf. cyclic).
  • ...: Pass more arguments to .det() methods.

Details

The cna function can build its models using one out of four measures for sufficiency evaluation and one out of four measures for necessity evaluation (cf. section 3.2 of the cna package vignette, call vignette("cna"), or De Souter & Baumgartner 2025). The measures that are not used for model building may still be useful for cross-validation or selecting among the resulting models. The detailMeasures function can calculate all these measures, independently of whether they are used for model building. The measures can be passed to the detailMeasures function by their names or aliases in showConCovMeasures.

In addition, detailMeasures computes exhaustiveness, faithfulness, and coherence, which are three measures for overall data fit (cf. sections 5.2 and 5.3 of vignette("cna")). It identifies models with cyclic substructures, and, if the CNA algorithm is modified through cna's control argument, detailMeasures can determine whether models have redundant parts and whether they have inus form. These additional solution attributes are passed to the detailMeasures function by their names in showDetailMeasures.

Note: First, coherence and redundant are only meaningful for complex solution formulas (csf). Second, redundant and inus are interdependent as follows: if redundant is TRUE for a csf, then inus is FALSE for that csf (see example below).

Returns

A data.frame.

See Also

cna, msc, asf, csf, configTable, condition, cyclic, showMeasures

References

De Souter, Luna and Michael Baumgartner. 2025. New sufficiency and necessity measures for model building withCoincidence Analysis. Zenodo. https://doi.org/10.5281/zenodo.13619580

Examples

cond <- csf(cna(d.women))$condition detailMeasures(cond, d.women) detailMeasures(cond, d.women, what = c("ex", "fa", "PAcon", "PACcov", "AACcon", "AAcov")) # Mixing msc, asf and csf. detailMeasures(c("ES*ws*WNP -> QU", "QU*LP + WM*LP <-> WNP", "(ES + WM <-> QU)*(WS + ES*WM + QU*LP + WM*LP <-> WNP)"), d.women) # In the following example, the csf is not inus, although all its component asfs are: cond <- c("(f+a*D <-> C)", "(C+A*B <-> D)", "(c+a*E <-> F)", "(f+a*D <-> C)*(C+A*B <-> D)*(c+a*E <-> F)") ct <- full.ct(cond) detailMeasures(cond, ct) # The reason is that one of the asfs is redundant: redundant(cond[4])