pimplot.lab: Prime implicants, truth table rows, and necessity plots.

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/pimplot.lab.R

Description

A function that displays XY plots for each sufficient term and the solution formula plotted against the outcome from an object of class "qca" (obtained by using the minimize function in package QCA). The function can also plot truth table rows against the outcome. Additionally, the function can plot results obtained from necessity analyses using an object of class "sS" (obtained by using the superSubset function in package QCA).

Usage

1
2
3
4
5
6
7
8
9
pimplot.lab(data = NULL,
           results,
           outcome,
           neg.out=FALSE,
           incl.tt=NULL,
           ttrows= c(),
           necessity=FALSE,
           sol=1,
           labcol="black")

Arguments

data

For analyses of sufficiency, providing a dataframe is not necessary. For analyses of necessity on objects of class "sS, you need to provide a dataframe with the name of the outcome and of the conditions in capital letters.

results

An object of class "qca" when necessity is FALSE. An object of class "sS" when necessity is TRUE. For performing pimplot.labs of the sufficient solution for the negated outcome one must only use the minimize() result from the sufficiency analysis of the negated outcome together with neg.out set to TRUE.

outcome

A character string with the name of the outcome in capital letters. When performing pimplot.labs of the sufficient solution for the negated outcome one must only use the minimize() result from the sufficiency analysis of the negated outcome in the argument results together with neg.out set to TRUE. Changing the name in the argument outcome or using a tilde is not necessary.

neg.out

Logical. Should the negated outcome be used?

incl.tt

A numerical vector of length 1 specifying the row consistency threshold above which it should plot truth table rows. By default it is NULL and the function will produce plots using "qca" or "sS" objects. If a numerical value is specifyied, then it automatically only plots truth table rows above that consistency value. N.B. This argument cannot be used simultaneously with the ttrows argument.

ttrows

A vector of character strings specifying the names of the truth table rows to be printed. By default this vector is empty and the function will produce plots using "qca" or "sS" objects. If a value is specifyied, then it automatically only plots those particular truth table rows. N.B. This argument cannot be used simultaneously with the incl.tt argument.

necessity

logical. It indicates if the output should be for the results of sufficiency or necessity analyses. By default, FALSE, the function works with an object of class "qca" obtained from the minimize function in package QCA. When it set to TRUE the function returns plots for an object of class "sS" obtained from the superSubset function in package QCA.

sol

A vector where the first number indicates the number of the conservative or parsimonious solution according to the order in the "qca" object. For more complicated structures of model ambiguity, the intermediate solution can also be specified by using a character string of the form "c1p3i2" where c = conservative solution, p = parsimonious solution and i = intermediate solution.

labcol

Color of the labels.

Value

XY plots.

Author(s)

Ioana-Elena Oana and Juraj Medzihorsky

References

Haesebrouck, T. (2015) Pitfalls in QCA's consistency measure. Journal of Comparative Politics 2:65-80.

Schneider, C. Q., Rohlfing, I. 2013. Combining QCA and Process Tracing in Set-Theoretic Multi-Method Research. Sociological Methods Research 42(4): 559-597

See Also

minimize pimdata

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Import your data. For example:

data(SCHF)

# Get the parsimonious solution:


sol_yp <- minimize(SCHF, outcome = "EXPORT",
                conditions = c("EMP","BARGAIN","UNI","OCCUP","STOCK", "MA"),
                incl.cut = .9, 
                include = "?", 					   
                details = TRUE, show.cases = TRUE)

# Get the intermediate solution:

sol_yi <- minimize(SCHF, outcome = "EXPORT",
                conditions = c("EMP","BARGAIN","UNI","OCCUP","STOCK", "MA"),
                incl.cut = .9, 
                include = "?", 					   
                details = TRUE, show.cases = TRUE, dir.exp = c(0,0,0,0,0,0))

# Plot the prime implicants of the parsimonious solution:

pimplot.lab(data = SCHF, results = sol_yp, outcome = "EXPORT")

# Plot the prime implicants of the first intermediate solution showing all case labels:

pimplot.lab(data = SCHF, results = sol_yi, outcome = "EXPORT", sol = 1, all_labels = TRUE)

# Plot all truth table rows with a consistency higher than 0.9:

pimplot.lab(data=SCHF, results = sol_yi, incl.tt=0.9, outcome = "EXPORT", sol = 1)

# Plot truth table rows "60" and "61":

pimplot.lab(data=SCHF, results = sol_yi, ttrows =c("60","61"), 
        outcome = "EXPORT", sol = 1)

# For plotting results of necessity analyses using superSubset,
# the first stept is to obtain an "sS" object:

SUPSUB <- superSubset(SCHF, outcome="EXPORT", 
                      conditions = c("EMP","BARGAIN","UNI","OCCUP","STOCK", "MA"), 
                      relation = "necessity", incl.cut = 0.8)
SUPSUB

# This can be imputed as result and necessity should be set to \code{TRUE}:

pimplot.lab(data = SCHF, results = SUPSUB, outcome = "EXPORT", necessity = TRUE)

nenaoana/SetMethods documentation built on Aug. 3, 2018, 1:17 a.m.