Learn R Programming

SetMethods (version 2.1)

pimdata: Function to extract prime implicants table from object of class "qca"

Description

A function that displays each case's set membership scores in each sufficient term, the solution formula, and the outcome from an object of class "qca".

Usage

pimdata(results, outcome, intermed = FALSE, sol = 1)

Arguments

results

An object of class "qca". For performing pimdata of the sufficient solution for the negated outcome one must only use the eqmcc() result from the sufficiency analysis of the negated outcome.

outcome

A character string with the name of the outcome in capital letters. When performing pimdata of the sufficient solution for the negated outcome one must only use the eqmcc() result from the sufficiency analysis of the negated outcome in the argument results. Changing the name in the argument outcome or using a tilde is not necessary.

intermed

Logical. Use the intermediate solution?

sol

A numeric vector where the first number indicates the number of the solution in case of model ambiguity according to the order in the "qca" object.

Value

A table with set memberships.

solution_formula

The solution formula.

out

Membership in the outcome.

See Also

eqmcc pimplot

Examples

Run this code
# NOT RUN {
# Import your data. For example:

data(Schneider)

# Get the parsimonious solution:


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

# Get the intermediate solution:

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


# Get the prime implicants table for the parsimonious solution:

pimdata(results = sol_yp, outcome = "EXPORT")

# Get the prime implicants table for the first intermediate solution:

pimdata(results = sol_yi, outcome = "EXPORT", intermed = TRUE, sol = 1)

# }

Run the code above in your browser using DataLab