Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

implicIndep

Test for Implicational Independence between two Factors


Description

This evaluation function tests for the implicational independence between two factors. It has been programmed for Thiem and Baumgartner (2016).

Usage

implicIndep(expression, n.samples = 1, size.sample = 100, corr = "0")

Arguments

expression

A string representing the Boolean function to be evaluated.

n.samples

The number of datasets to be sampled.

size.sample

The size of each data sample.

corr

The direction of correlation between the endogenous factor and the implicationally independent factor.

Details

Randomly sample n.samples different data-sets with uniform probability mass function (any other discrete function would do as well; proficient users may adjust this at the relevant places in the function); and run QCA for each dataset; check whether the irrelevant factor is eliminated and get the correlations between the irrelevant factor and the outcome factor.

The correlation can be controlled with corr: "0" means no correlation; "+" positive correlation, and "-" negative correlation. The larger the sample size, the larger the positive / negative correlation. The argument expression may represent any Boolean function in disjunctive normal form as shown below, including proper causal structures such as "(X1*X2 + X3*X4 <=> Y)*(Z1 + z1)" or non-causal structures such as "(x1*X2 + X1*x2 + X1*X3 + X2*X3 <=> Y)*(Z1 + z1)" (contains redundant prime implicants) or "(X3*x2 + X2 <=> Y)*(Z1 + z1)" (contains redundant conjuncts).

If expression is no causal structure, an additional note will be issued together with the test output for whether the irrelevant factor has been eliminated.

You can use the following possibilities for expression: "(X1X2 + X3X4 <=> Y)(Z1 + z1)" if a factor has one letter and a one-digit number, "(AB + CD <=> E)(F + f)" if a factor has one letter, "(X1*X2 + X3*X4 <=> Y)*(Z1 + z1)" or "(A*B + C*D <=> E)*(F + f)" (curly-bracket notation is not supported). Empty spaces and the type of the biconditional operator (<->/<=>) have no effect.

Value

A list with the following five components:

tt

The evaluated truth tables.

dat.list

The test datasets generated on the basis of the evaluaetd truth tables.

sol.list

The corresponding solutions.

cor.list

The correlations between the endogenous factor and the irrelevant factor.

test

The result for whether the irrelevant factor has been eliminated in all tests.

Contributors

Baumgartner, Michael : testing
Thiem, Alrik : development, documentation, programming, testing

Author(s)

References

Thiem, Alrik, and Baumgartner, Michael. 2016. “Modeling Causal Irrelevance in Evaluations of Configurational Comparative Methods.” Sociological Methodology 46 (1):345-57. DOI: 10.1177/0081175016654736.

See Also

Examples

## Not run: 
# simulation with 10 sample datasets
simulation <- vector(mode = "list", length = 3)
n.samples <- 10 

# directions of correlation and number of cases in each sample
corr <- c("-", "0", "+") 
nofc <- c(40, 160, 640) 
simulation <- lapply(nofc, function (x) {lapply(corr, function (y) {
  implicIndep("(X1*X2 + X3*X4 <=> Y)*(Z1 + z1)", n.samples, x, y)})})

# has Z1 been eliminated in all data experiments of a block of tests?
series.test <- matrix(sapply(1:length(corr), function (x) {sapply(1:length(nofc),
  function (y) {simulation[[x]][[y]]$test == "Z1 has been eliminated."})}),
  ncol = length(corr), dimnames = list(as.character(nofc), corr))
series.test

## End(Not run)

QCApro

Advanced Functionality for Performing and Evaluating Qualitative Comparative Analysis

v1.1-2
GPL-3
Authors
Alrik Thiem [aut, cre, cph], Michael Baumgartner [ctb], Adrian Dusa [ctb], Reto Spoehel [ctb]
Initial release
2018-01-10

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.