randomDGS {QCApro}R Documentation

Build a Random Data-Generating Structure

Description

This evaluation function can be used to randomly build data-generating structures. It has initially been programmed for Baumgartner and Thiem (2017) to test the correctness of QCA's three search strategies (conservative/complex, intermediate, parsimonious).

Usage

randomDGS(n.DGS = 1, exo.facs = c(""), seed.1 = NULL, seed.2 = NULL, 
          prob = 0.5, diversity = 1, delete.trivial = FALSE)

Arguments

n.DGS

The number of random data-generating structures to be built.

exo.facs

A character vector with the names of the exogenous factors.

seed.1

The seed for the random generation of output function values.

seed.2

The seed for the random selection of a DGS in cases of structural ambiguities.

prob

The probability of assigning a positive output function value to a minterm.

diversity

The diversity index value.

delete.trivial

Logical, delete "TRUE" and "FALSE" from set of structures.

Details

The argument n.DGS specifies the number of random data-generating structures to be built.

The argument exo.facs is a character vector with the names of the exogenous factors.

The argument seed.1 sets the seed for the random generation of output function values, whereas seed.2 sets the seed for the random selection of a DGS in cases of structural ambiguities.

The argument prob is the probability of assigning a positive output function value to a minterm. The argument diversity specifies the diversity index value. It must be a number between 0 and 1.

The argument delete.trivial is logical, and specifies whether "TRUE" and "FALSE" should be deleted from the set of structures.

Value

A list with the following two components:

DGS

A vector of the data-generating structure(s).

tt

The corresponding truth table(s).

Contributors

Thiem, Alrik : development, documentation, programming, testing

Author(s)

Alrik Thiem (Personal Website; ResearchGate Website)

References

Baumgartner, Michael, and Alrik Thiem. 2017. “Often Trusted but Never (Properly) Tested: Evaluating Qualitative Comparative Analysis.” Sociological Methods & Research. Advance online publication. DOI: 10.1177/0049124117701487.

See Also

submodels

Examples

# randomly generate three data-generating structures on the basis of four
# exogenous factors
str <- randomDGS(n.DGS = 3, exo.facs = LETTERS[1:4], seed.1 = 1375, seed.2 = 3917)
str$DGS

# all correctness-preserving submodels of DGS 2, bd + abC, can then be found with the 
# 'submodels' function
submodels(str$DGS[2])$submodels

[Package QCApro version 1.1-2 Index]