Build a Random Data-Generating Structure
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).
randomDGS(n.DGS = 1, exo.facs = c(""), seed.1 = NULL, seed.2 = NULL, prob = 0.5, diversity = 1, delete.trivial = FALSE)
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. |
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.
A list with the following two components:
DGS |
A vector of the data-generating structure(s). |
tt |
The corresponding truth table(s). |
Thiem, Alrik | : development, documentation, programming, testing |
Alrik Thiem (Personal Website; ResearchGate Website)
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.
# 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
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.