fuzzyand(...)fuzzyor(...)
These functions perform logical "and" and "or", either for binary crisp or fuzzy set membership scores.
# ----- # Cebotari & Vink (2013, 2015) data(CVF) # DEMOC*GEOCON*NATPRIDE fuzzyand(CVF$DEMOC, CVF$GEOCON, CVF$NATPRIDE)[1] 0.41 0.06 0.06 0.10 0.10 0.13 0.13 0.13 0.70 0.05 0.54 0.35 0.86 0.75 0.29 0.25 [17] 0.56 0.35 0.49 0.35 0.62 0.38 0.86 0.75 0.88 0.06 0.34 0.12 0.12# same thing with fuzzyand(CVF[, c(1,3,5)])[1] 0.41 0.06 0.06 0.10 0.10 0.13 0.13 0.13 0.70 0.05 0.54 0.35 0.86 0.75 0.29 0.25 [17] 0.56 0.35 0.49 0.35 0.62 0.38 0.86 0.75 0.88 0.06 0.34 0.12 0.12# DEMOC*geocon*NATPRIDE fa <- fuzzyand(CVF$DEMOC, 1 - CVF$GEOCON, CVF$NATPRIDE) fa[1] 0.05 0.06 0.06 0.10 0.10 0.13 0.13 0.13 0.22 0.83 0.22 0.35 0.05 0.05 0.29 0.05 [17] 0.22 0.56 0.05 0.49 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05attr(fa, "name")[1] "DEMOC*geocon*NATPRIDE"# ETHFRACT + POLDIS fuzzyor(CVF$ETHFRACT, CVF$POLDIS)[1] 0.88 0.14 0.24 0.37 0.32 0.86 0.86 0.86 0.23 0.95 0.80 0.49 0.06 0.06 0.92 0.59 [17] 0.59 0.69 0.65 0.54 0.83 0.51 0.51 0.58 0.26 0.39 0.39 0.95 0.95# same thing with fuzzyor(CVF[, c(2,4)])[1] 0.88 0.14 0.24 0.37 0.32 0.86 0.86 0.86 0.23 0.95 0.80 0.49 0.06 0.06 0.92 0.59 [17] 0.59 0.69 0.65 0.54 0.83 0.51 0.51 0.58 0.26 0.39 0.39 0.95 0.95# ETHFRACT + poldis fo <- fuzzyor(CVF$ETHFRACT, 1 - CVF$POLDIS) fo[1] 0.12 0.95 0.76 0.63 0.95 0.95 0.95 0.95 0.95 0.23 0.54 0.89 0.95 0.95 0.72 0.59 [17] 0.95 0.59 0.54 0.95 0.23 0.95 0.95 0.42 0.95 0.95 0.95 0.95 0.95attr(fo, "name")[1] "ETHFRACT+poldis"