Package QCAtools. January 3, 2017

Similar documents
Package datasets.load

Package weco. May 4, 2018

Package gtrendsr. October 19, 2017

Package braqca. February 23, 2018

Package IATScore. January 10, 2018

Package fastdummies. January 8, 2018

Package strat. November 23, 2016

Package gtrendsr. August 4, 2018

Package messaging. May 27, 2018

Package sfc. August 29, 2016

Package OLScurve. August 29, 2016

Package mdftracks. February 6, 2017

Package fitbitscraper

Package preprosim. July 26, 2016

Package geojsonsf. R topics documented: January 11, Type Package Title GeoJSON to Simple Feature Converter Version 1.3.

Package profvis. R topics documented:

Package bisect. April 16, 2018

Package svalues. July 15, 2018

Package cattonum. R topics documented: May 2, Type Package Version Title Encode Categorical Features

Package clipr. June 23, 2018

Package CuCubes. December 9, 2016

Package reval. May 26, 2015

Package climber. R topics documented:

Package kirby21.base

Package estprod. May 2, 2018

Package fastqcr. April 11, 2017

Package jstree. October 24, 2017

Package gggenes. R topics documented: November 7, Title Draw Gene Arrow Maps in 'ggplot2' Version 0.3.2

Package calpassapi. August 25, 2018

Package docxtools. July 6, 2018

Package shinyhelper. June 21, 2018

Package ECctmc. May 1, 2018

Package quickreg. R topics documented:

Package states. May 4, 2018

Package comparedf. February 11, 2019

Package autocogs. September 22, Title Automatic Cognostic Summaries Version 0.1.1

Package repec. August 31, 2018

Package NFP. November 21, 2016

Package WordR. September 7, 2017

Propositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Package ggimage. R topics documented: December 5, Title Use Image in 'ggplot2' Version 0.1.0

Package barcoder. October 26, 2018

Package SEMrushR. November 3, 2018

Qualitative Comparative Analysis (QCA) and Fuzzy Sets. 24 June 2013: Code of Good Standards. Prof. Dr. Claudius Wagemann

Package pwrab. R topics documented: June 6, Type Package Title Power Analysis for AB Testing Version 0.1.0

Package oec. R topics documented: May 11, Type Package

Package rtext. January 23, 2019

Package queuecomputer

Package MOST. November 9, 2017

Package panelview. April 24, 2018

Package effectr. January 17, 2018

Package autoshiny. June 25, 2018

List of figures List of tables Acknowledgements

Package dalmatian. January 29, 2018

Package erp.easy. March 2, 2017

Package postgistools

Package dbx. July 5, 2018

Package esabcv. May 29, 2015

Package omu. August 2, 2018

Package ggimage. R topics documented: November 1, Title Use Image in 'ggplot2' Version 0.0.7

Package canvasxpress

Package vinereg. August 10, 2018

Package crossword.r. January 19, 2018

Package listdtr. November 29, 2016

Package facerec. May 14, 2018

Package corenlp. June 3, 2015

Package edfreader. R topics documented: May 21, 2017

Package splithalf. March 17, 2018

Package io. January 15, 2018

Package benchmarkme. R topics documented: February 26, Type Package Title Crowd Sourced System Benchmarks Version 0.2.

Package ggmosaic. February 9, 2017

Package phrasemachine

Package rsppfp. November 20, 2018

Package catenary. May 4, 2018

Package dotcall64. January 11, 2018

Package balance. October 12, 2018

Package PCADSC. April 19, 2017

Package robotstxt. November 12, 2017

Package validara. October 19, 2017

Package ggseas. June 12, 2018

Package fbroc. August 29, 2016

Package RndTexExams. R topics documented:

Package regexselect. R topics documented: September 22, Version Date Title Regular Expressions in 'shiny' Select Lists

Package sankey. R topics documented: October 22, 2017

Mixed Integer Linear Programming

Package sylcount. April 7, 2017

Package GetITRData. October 22, 2017

Package OsteoBioR. November 15, 2018

Package CatEncoders. March 8, 2017

Package qualmap. R topics documented: September 12, Type Package

Package rldcp. November 10, 2017

Package MatchIt. April 18, 2017

Package corclass. R topics documented: January 20, 2016

Package bigreadr. R topics documented: August 13, Version Date Title Read Large Text Files

Package pairsd3. R topics documented: August 29, Title D3 Scatterplot Matrices Version 0.1.0

Package raker. October 10, 2017

Package assortnet. January 18, 2016

Package gridgraphics

Package TestDataImputation

Package ClusterBootstrap

Transcription:

Title Helper Functions for QCA in R Version 0.2.3 Package QCAtools January 3, 2017 Author Jirka Lewandowski <jirka.lewandowski@wzb.eu> [aut, cre] Maintainer Jirka Lewandowski <jirka.lewandowski@wzb.eu> Helper functions for Qualitative Comparative Analysis: evaluate and plot Boolean formulae on fuzzy set score data, apply Boolean operations, compute consistency and coverage measures. Depends R (>= 3.1.0) Imports stringr (>= 0.6.2), ggplot2 (>= 0.9.3.1), directlabels (>= 2013.6.15), graphics, QCA (>= 2.5) License GPL (>= 3) LazyData true RoxygenNote 5.0.1 NeedsCompilation no Repository CRAN Date/Publication 2017-01-03 23:54:33 R topics documented: and.............................................. 2 consistency......................................... 3 evaluate_dnf......................................... 4 format_dnf......................................... 5 formula_to_function.................................... 5 plot.qca........................................... 6 QCAtools.......................................... 6 xyplot............................................ 7 Index 8 1

2 and and And Logical and of two conditions Logical or of two conditions Logical not of a condition and(v1, v2) or(v1, v2) not(v) v1 v2 v A vector of fuzzy set scores of cases A vector of fuzzy set scores of cases A vector of fuzzy set scores of cases the fuzzy set scores of the logical conjunction of v1 and v2 for each case, i.e. the minimum in each component the fuzzy set scores of the logical disjunction of v1 and v2 for each case, i.e. the maximum in each component the fuzzy set scores of the negation of v for each case, i.e. 1-v and(c(0,0.5,1), c(0.25, 0.75, 0.75)) or(c(0,0.5,1), c(0.25, 0.75, 0.75)) not(c(0,0.5,1))

consistency 3 consistency Compute the consistency value Computes the consistency score of "formula1 -> formula2" (sufficient condition) or "formula1 <- formula2" (necessary condition), depending on whether type is "->" or "<-". If type is "<->" it computes an equivalence score of formula1 and formula2 via the formula sum(min(x,y))/(sum(max(x,y)) consistency(formula1, type = "->", formula2, data) formula1 type formula2 data A string, list of strings or function representing a Boolean formula in disjunctive normal form either "->", "<-" or "<->", depending on the direction of the implication that is to be evaluated A string, list of strings or function representing a Boolean formula in disjunctive normal form A data frame where the rows represent cases and the columns the sets. Column names must be as in the formula. Details Compute a consistency score for an implication/necessity/sufficiency statement. If formula is a function, it must take a data.frame and return a vector. If formula is a string or list of strings, the following conventions hold: Set names must be capitalized in the formula and the data; if they are lowercase, they are interpreted as the negation of the set. If formula is a string, logical or is expressed as a +, and logical and as a *. If formula is a list of strings, the strings are assumed to be the dosjuncts and are concatenated with +. The formula must be in disjunctive normal form, i.e. it must be a disjunction of conjunctions of elementary or negated elementary sets. Example: A*b*C + a*b the consistency score of the implication described by formula1, type and formula2 require(qca) data(d.urban) consistency("mlc + FRB", "->", "CP", d.urban)

4 evaluate_dnf evaluate_dnf Evaluate a formula When given a Boolean formula (see details) and a data.frame of cases and fuzzy set score for conditions, computes for each case the score of the membership in the set described by the formula evaluate_dnf(data, formula) data formula A data frame where the rows represent cases and the columns the sets. Column names must be as in the formula. A string, list of strings or function representing a Boolean formula in disjunctive normal form Details If formula is a function, it must take a data.frame and return a vector. If formula is a string or list of strings, the following conventions hold: Set names must be capitalized in the formula and the data; if they are lowercase, they are interpreted as the negation of the set. If formula is a string, logical or is expressed as a +, and logical and as a *. If formula is a list of strings, the strings are assumed to be the dosjuncts and are concatenated with +. The formula must be in disjunctive normal form, i.e. it must be a disjunction of conjunctions of elementary or negated elementary sets. Example: A*b*C + a*b the fuzzy set score of the set described by the formula for each case in the data require(qca) data(d.urban) evaluate_dnf(d.urban, "MLC*frb + CP")

format_dnf 5 format_dnf Rewrite a list of clauses to a string containing a Boolean formula in disjunctive normal form Rewrite a list of clauses to a string containing a Boolean formula in disjunctive normal form format_dnf(dnf) dnf list of clauses string containing a Boolean formula in disjunctive normal form formula_to_function Convert formula to function When given a Boolean formula (in disjunctive normal form, see details), this function produces a function that takes a data.frame of a QCA data table and computes the fuzzy set score for each case of membership in the set described by the formula formula_to_function(formula) formula A string or vector of strings containing a Boolean formula in disjunctive normal form Details Set names must be capitalized in the formula and the data; if they are lowercase, they are interpreted as the negation of the set. If formula is a string, logical or is expressed as a +, and logical and as a *. If formula is a list of strings, the strings are assumed to be the dosjuncts and are concatenated with +. Disjunctive normal form means that the formula must be a disjunction of conjunctions of elementary or negated elementary sets. Example: A*b*C + a*b

6 QCAtools a function that takes a data.frame and computes the fuzzy set score of the set described by the formula for each case into a vector formula_to_function("a*b*c + a*b") plot.qca Plot the fuzzy set scores of the solution and the outcome against each other Plot the fuzzy set scores of the solution and the outcome against each other ## S3 method for class 'qca' plot(x,...) x an object of class qca as returned by eqmcc of the package QCA... further arguments passed on to xyplot the ggplot plot object ## Not run: require(qca) data(d.urban) solution <- eqmcc(d.urban, outcome="rt", conditions=c("mlc", "FRB", "CP", "WSR")) plot(solution) ## End(Not run) QCAtools QCAtools. Several convenience functions for QCA in R

xyplot 7 xyplot Plot fuzzy set score of two sets against each other Plot fuzzy set score of two sets against each other xyplot(x, y, data, labels = FALSE, main.diagonal = TRUE, anti.diagonal = FALSE) x y data labels main.diagonal anti.diagonal Formula that describes the fuzzy set to plot along the x axis Formula that describes the fuzzy set to plot along the y axis Data set of basic fuzzy set scores flag whether to label individual points with the case names flag whether to plot the main diagonal flag whether to plot the anti diagonal the ggplot plot object require(qca) data(d.urban) xyplot("mlc", "WSR", d.urban)

Index and, 2 consistency, 3 eqmcc, 6 evaluate_dnf, 4 format_dnf, 5 formula_to_function, 5 not (and), 2 or (and), 2 plot.qca, 6 QCAtools, 6 QCAtools-package (QCAtools), 6 xyplot, 6, 7 8