Description Usage Arguments Value Author(s) References Examples
QCAfit is a function calculating parameters of fit useful in QCA and fsQCA that are consistency, coverage, PRI and PRODUCT. It works with both single and multiple conditions.
1 |
x |
is a vector containing the values of a condition or a matrix with more than one conditions. |
y |
is a vector containing the values of the output. |
cond.lab |
is a vector containing the label(s) of the condition(s). |
necessity |
logical. It indicates if the output should be for sufficient or necessary condition(s). By default, |
negation |
logical. It indicates if the parameters of fit should be computed for the positive or the negative outcome. By default, |
It returns a matrix containing the parameters of fit for each condition.
Mario Quaranta
Schneider, C. Q., Wagemann, C. (2012) Set-Theoretic Methods for the Social Sciences, Cambridge University Press: Cambridge.
Schneider, C. Q., Wagemann, C., Quaranta, M. (2012) How To... Use Software for Set-Theoretic Analysis. Online Appendix to "Set-Theoretic Methods for the Social Sciences". Available at www.cambridge.org/schneider-wagemann
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # Generate fake data
set.seed(1234)
a <- runif(100, 0, 1)
b <- runif(100, 0, 1)
c <- runif(100, 0, 1)
y <- runif(100, 0, 1)
# Only one condition, for sufficiency
QCAfit(a, y, cond.lab = "A")
# With three conditions, for sufficiency
QCAfit(cbind(a, b, c), y, cond.lab = c("A", "B", "C"))
# Only one condition, for necessity
QCAfit(a, y, cond.lab = "A", necessity = TRUE)
# With three conditions, for necessity
QCAfit(cbind(a, b, c), y, cond.lab = c("A", "B", "C"), necessity = TRUE)
# With three conditions and negated output, for sufficiency
QCAfit(cbind(a, b, c), y, cond.lab = c("A", "B", "C"), negation = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.