Dear All,
Trust you are all doing great! I have an issue with my intermediate solution and I think its related to my sufficiency analysis. My sufficiency analysis shows that all my causal conditions are simultaneous subset relations. I read in the QCA R book that decision should be made whether its the presence or absence of a causal condition that should be declared as sufficient in a situation like this and the declared sufficient conditions are to be used in the truth table. My question is how do I declare this in my truth table? I didn't find any information on how to do this in the instruction book. I tried to use the the function findRows and argument type = 3 in the intermediate solution but I didn't get any solution because all my causal conditions are subset relations so they were all removed. This means its better for me to declare in the truth table whether the presence or absence of a causal condition is sufficient before getting to the intermediate solution.
Below is my MRE (I hope I got it right this time around..):
```
library(admisc)
#> Warning: package 'admisc' was built under R version 4.0.5
library(QCA)
#> Warning: package 'QCA' was built under R version 4.0.5
#>
#> To cite package QCA in publications, please use:
#> Dusa, Adrian (2019) QCA with R. A Comprehensive Resource.
#> Springer International Publishing.
#>
#> To run the graphical user interface, use: runGUI()
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:admisc':
#>
#> compute, recode
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
Fuzzy1 <- data.frame(
FF1Fuzzy = c(0.833333333333333, 0.166666666666667, 0.833333333333333, 0.333333333333333, 0.833333333333333, 1),
FF2Fuzzy = c(1, 1, 0.333333333333333, 0.333333333333333, 1, 1),
FF3Fuzzy = c(0.833333333333333, 0.666666666666667, 0.666666666666667, 0.666666666666667, 1, 0.666666666666667),
EffectFuzzy = c(0.333333333333333, 1, 0.833333333333333, 0.166666666666667, 0.833333333333333, 0.833333333333333)
)
Fuzzy1
#> FF1Fuzzy FF2Fuzzy FF3Fuzzy EffectFuzzy
#> 1 0.8333333 1.0000000 0.8333333 0.3333333
#> 2 0.1666667 1.0000000 0.6666667 1.0000000
#> 3 0.8333333 0.3333333 0.6666667 0.8333333
#> 4 0.3333333 0.3333333 0.6666667 0.1666667
#> 5 0.8333333 1.0000000 1.0000000 0.8333333
#> 6 1.0000000 1.0000000 0.6666667 0.8333333
Fuzzy2 <- apply(Fuzzy1, 2 , as.numeric)
Fuzzy3 <- data.frame(Fuzzy2)
sufficiency <- superSubset(Fuzzy3, outcome = "EffectFuzzy", neg.out = FALSE,
conditions = c("FF1Fuzzy", "FF2Fuzzy", "FF3Fuzzy"),
relation = "sufficiency",
incl.cut = 0.10, cov.cut = 0)
sufficiency
#>
#> inclS PRI covS
#> ---------------------------------
#> 1 ~FF1Fuzzy 0.750 0.625 0.375
#> 2 FF1Fuzzy 0.792 0.722 0.792
#> 3 ~FF2Fuzzy 0.625 0.500 0.208
#> 4 FF2Fuzzy 0.750 0.682 0.875
#> 5 ~FF3Fuzzy 0.889 0.800 0.333
#> 6 FF3Fuzzy 0.741 0.667 0.833
#> ---------------------------------
#Truth table configurations where the cases have membership scores above 0.5
ttrows <- apply(Fuzzy3[,1:3], 2, function(x) as.numeric(x > 0.5))
rownames(ttrows) <- rownames(Fuzzy3)
ttrows
#> FF1Fuzzy FF2Fuzzy FF3Fuzzy
#> 1 1 1 1
#> 2 0 1 1
#> 3 1 0 1
#> 4 0 0 1
#> 5 1 1 1
#> 6 1 1 1
#Truth table is presented below
FinalTruthTable <- truthTable(Fuzzy3, outcome = "EffectFuzzy", incl.cut = c(0.8, 0.6), show.cases = TRUE, dcc = TRUE, use.letters = TRUE)
FinalTruthTable
#>
#> A: FF1Fuzzy
#> B: FF2Fuzzy
#> C: FF3Fuzzy
#> OUT: output value
#> n: number of cases in configuration
#> incl: sufficiency inclusion score
#> PRI: proportional reduction in inconsistency
#> DCC: deviant cases consistency
#>
#> A B C OUT n incl PRI DCC
#> 2 0 0 1 0 1 0.400 0.000 4
#> 4 0 1 1 1 1 0.889 0.800
#> 6 1 0 1 1 1 0.833 0.750
#> 8 1 1 1 C 3 0.789 0.692 1
#Complex solutions
library(QCA)
FsqcaComplexSolution <- minimize(FinalTruthTable, details = TRUE)
FsqcaComplexSolution
#>
#> M1: A*~B*C + ~A*B*C -> EffectFuzzy
#>
#> inclS PRI covS covU cases
#> --------------------------------------------
#> 1 A*~B*C 0.833 0.750 0.208 0.125 3
#> 2 ~A*B*C 0.889 0.800 0.333 0.250 2
#> --------------------------------------------
#> M1 0.917 0.875 0.458
#Parsimonious solutions
FsqcaParsimoniousSolution <- minimize(FinalTruthTable, include = "?", details = TRUE, use.letters = TRUE)
FsqcaParsimoniousSolution
#>
#> M1: A*~B + ~A*B -> EffectFuzzy
#>
#> inclS PRI covS covU cases
#> ------------------------------------------
#> 1 A*~B 0.833 0.750 0.208 0.125 3
#> 2 ~A*B 0.900 0.833 0.375 0.292 2
#> ------------------------------------------
#> M1 0.923 0.889 0.500
#Intermediate solution
#Remove simultaneous subset relations (SSR)
SSR <- findRows(obj = FinalTruthTable, type = 3)
FsqcaIntermediateSolution <- minimize(FinalTruthTable, exclude = SSR, use.letters = TRUE)
FsqcaIntermediateSolution
#>
#> M1: A*~B*C + ~A*B*C -> EffectFuzzy
```