# NOT RUN {
# 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"), neg.out = TRUE)
# }
Run the code above in your browser using DataLab