fsQCApermTest: A Simple Permutation Test for Type I Error in fsQCA

View source: R/fsQCApermTest.R

fsQCApermTestR Documentation

A Simple Permutation Test for Type I Error in fsQCA

Description

A permutation test for fuzzy-set qualitative comparative analysis (fsQCA), designed to calculate the probability of a false positive given the number of hypotheses implicitly tested and the distribution of the data.

Usage

fsQCApermTest(
  y,
  configs,
  total.configs,
  num.iter = 10000,
  my.seed = 123,
  adj.method = "holm"
)

Arguments

y

The outcome variable of interest.

configs

A list of configurations to be tested against y.

total.configs

The total number of configurations used in the original fsQCA analysis. This will generally equal the number of lines in the truth table used for Boolean minimization.

num.iter

The number of iterations to use for the permutation test. Larger numbers of iterations result in more precise p-values.

my.seed

The seed used to generate random numbers.

adj.method

The method used to calculate adjusted p-values (see stats::p.adjust() for details).

Value

An object containing the aggregate results of the permutation test as well as the individual permutations.

Note

Adopted from the archived CRAN package QCAfalsePositive by Bear Braumoeller. The original package has been removed from CRAN and is no longer maintained. It is included in drhutools for continued accessibility.

Examples


intersect  <- pmin(social.revolutions$breakdown, social.revolutions$pop.ins)
intersect2 <- pmin(social.revolutions$breakdown, (1 - social.revolutions$pop.ins))
intersect3 <- pmin((1 - social.revolutions$breakdown), social.revolutions$pop.ins)
intersect4 <- pmin((1 - social.revolutions$breakdown), (1 - social.revolutions$pop.ins))

test <- fsQCApermTest(y = social.revolutions$soc.rev,
  configs = list(BI = intersect, Bi = intersect2,
                 bI = intersect3, bi = intersect4),
  total.configs = 4)
summary(test)
plot(test)


drhutools documentation built on June 4, 2026, 9:08 a.m.