Title: | Bootstrapped Robustness Assessment for Qualitative Comparative Analysis |
---|---|
Description: | Test the robustness of a user's Qualitative Comparative Analysis solutions to randomness, using the bootstrapped assessment: baQCA(). This package also includes a function that provides recommendations for improving solutions to reach typical significance levels: brQCA(). Data included come from McVeigh et al. (2014) <doi:10.1177/0003122414534065>. |
Authors: | C. Ben Gibson [aut] , Burrel Vann Jr [aut, cre] |
Maintainer: | Burrel Vann Jr <[email protected]> |
License: | GPL-3 |
Version: | 1.4.11.27 |
Built: | 2024-11-28 07:04:49 UTC |
Source: | CRAN |
This function performs the the Bootstrapped Assessment for QCA (baQCA) on a given QCA model object.
baQCA( mod, sim = 2000, all = TRUE, include = c(""), row.dom = FALSE, omit = c(), dir.exp = c() )
baQCA( mod, sim = 2000, all = TRUE, include = c(""), row.dom = FALSE, omit = c(), dir.exp = c() )
mod |
name of the QCA model object – the minimization of the truth table. |
sim |
the number of simulations the baQCA function should run. Default set to |
all |
logical, whether or not causal conditions AND outcome should be resampled (with replacement). Default set to |
include |
[from QCA package] “A vector of additional output function values to be included in the minimization.” Default set to |
row.dom |
[from QCA package] “Logical, impose row dominance as constraint on solution to eliminate dominated inessential prime implicants.” Default set to |
omit |
[from QCA package] “A vector of configuration index values or matrix of configurations to be omitted from minimization.” Default set to |
dir.exp |
[from QCA package] “A vector of directional expectations for deriving intermediate solutions.” Default set to |
This function returns a value which is the probability of a random QCA result (e.g. a result from random data) given the parameters set by the researcher in the model (configurational n threshold, consistency score threshold, etc), and a confidence interval around this value. This value is interpreted similarly to a p-value."
qca.data <- rallies[,8:13] rownames(qca.data)<-rownames(rallies) truth<-QCA::truthTable(qca.data,outcome="P",sort.by="incl",incl.cut1=0.85,n.cut=1,show.cases=TRUE) mod1 <- QCA::minimize(truth,details=TRUE,show.cases=TRUE) summary(baQCA(mod1,sim=1))
qca.data <- rallies[,8:13] rownames(qca.data)<-rownames(rallies) truth<-QCA::truthTable(qca.data,outcome="P",sort.by="incl",incl.cut1=0.85,n.cut=1,show.cases=TRUE) mod1 <- QCA::minimize(truth,details=TRUE,show.cases=TRUE) summary(baQCA(mod1,sim=1))
Provides recommendations for consistency score and configurational n thresholds to attain a desired level of confidence in a QCA algorithm application.
brQCA( qca.data, outcome = "OUT", type = "crisp", inclcut = "", ncut = 2, neg.out = FALSE, sim = 10, verbose = TRUE )
brQCA( qca.data, outcome = "OUT", type = "crisp", inclcut = "", ncut = 2, neg.out = FALSE, sim = 10, verbose = TRUE )
qca.data |
the QCA data frame. |
outcome |
the outcome variable in the QCA data frame of causal conditions; |
type |
of QCA application, |
inclcut |
range of consistency scores for inclusion. If not specified, this defaults to |
ncut |
configurational n levels to simulate. Can be altered to give options for the range of minimum to maximum |
neg.out |
[from QCA package] “Logical, use negation of outcome (ignored if data is a truth table object).” Default set to |
sim |
number of simulations to run for each combination of parameters. The final number of simulations is |
verbose |
prints the system time used to run the simulation and the percent complete. Default set to |
Significance levels reached (.10,.05, .01, .001) when specifying a combination of inclcut, ncut, and neg.out in a QCA model.
qca.data <- rallies[,8:13] ## Not run: brQCA(qca.data,outcome="P",ncut=5,sim=1) ## End(Not run)
qca.data <- rallies[,8:13] ## Not run: brQCA(qca.data,outcome="P",ncut=5,sim=1) ## End(Not run)
Internal function; calculates via logistic regression the output of the Bootstrapped Robustness Recommendation
conf.table(data, ncut = ncut)
conf.table(data, ncut = ncut)
data |
name of the model object; the table of solutions for an application of QCA. Default set to |
ncut |
configurational n levels for inclusion. Default set to |
The output of the Bootstrapped Recommendation #' @export
This data set is an abbreviated version of the data set used by McVeigh et al. (2014). These data cover all 67 counties in Florida, and come from the American Community Survey (2005-2009).
rallies
rallies
A data frame with 67 observations and 13 variables.
tprallies | number of Tea Party rallies in county, 2009-2010 |
reppct2008 | percent of county vote for the Republican Presidential candidate (John McCain) in 2008 |
dempct2008 | percent of county vote for the Democratic Presidential candidate (Barack Obama) in 2008 |
pctBA25 | percent of county, aged 25 or older, with a bachelor's degree |
pctunemp | percent of county that is unemployed |
pctevang | percent of county that belongs to an Evangelical denomination |
pctblack | percent of county that identifies as Black |
P | binary. 0 if county had no Tea Party rallies, 1 if county had at least on Tea Party rally |
R | binary. 0 if the majority of votes in the county were for the Democratic Presidential candidate (Barack Obama) in 2008, 1 if the majority of votes in the county were for the Republican Presidential candidate (John McCain) in 2008 |
C | binary. 0 if percent of county with a bachelor's degree was below-average for Florida, 1 if percent of county with a bachelor's degree was at or above-average for Florida |
U | binary. 0 if percent unemployed in county was below-average for Florida, 1 if percent unemployed in county was at or above-average for Florida |
E | binary. 0 if percent Evangelical in county was below-average for Florida, 1 if percent Evangelical in county was at or above-average for Florida |
B | binary. 0 if percent Black in county was below-average for Florida, 1 if percent Black in county was at or above-average for Florida |
Internal function to calculate the Bootstrapped Recommendation.
sim.brQCA( qca.data, outcome = "OUT", conditions = c(""), sim = 10, ncut = 2, type = "crisp", inclcut = "", neg.out = FALSE, verbose = TRUE )
sim.brQCA( qca.data, outcome = "OUT", conditions = c(""), sim = 10, ncut = 2, type = "crisp", inclcut = "", neg.out = FALSE, verbose = TRUE )
qca.data |
the data frame of causal conditions. |
outcome |
the outcome variable (object name) in the QCA data frame of causal conditions; |
conditions |
a set of causal conditions. Default set to |
sim |
number of simulations to run. Default set to |
ncut |
configurational n levels for inclusion. Default set to |
type |
type of QCA application, |
inclcut |
minimum sufficiency score for inclusion. Default set to |
neg.out |
[from QCA package] “Logical, use negation of outcome (ignored if data is a truth table object).” Default set to |
verbose |
prints the system time used to run the simulation and the percent complete. Default set to |
Simulation information later passed on to conf.table.
Displays results of baQCA.
## S3 method for class 'baQCAtest' summary(object, ...)
## S3 method for class 'baQCAtest' summary(object, ...)
object |
Object returned by |
... |
Additional parameters to pass on. |
Matrix of values for percent of simulations returning result from random data, along with confidence interval.
qca.data <- rallies[,8:13] rownames(qca.data)<-rownames(rallies) truth<-QCA::truthTable(qca.data,outcome="P",sort.by="incl",incl.cut1=0.85,n.cut=1,show.cases=TRUE) mod1 <- QCA::minimize(truth,details=TRUE,show.cases=TRUE) test <- baQCA(mod1,sim=1) summary(test)
qca.data <- rallies[,8:13] rownames(qca.data)<-rownames(rallies) truth<-QCA::truthTable(qca.data,outcome="P",sort.by="incl",incl.cut1=0.85,n.cut=1,show.cases=TRUE) mod1 <- QCA::minimize(truth,details=TRUE,show.cases=TRUE) test <- baQCA(mod1,sim=1) summary(test)