Learn R Programming

QCA (version 1.1-2)

calibrate: Calibrate Crisp and Fuzzy Set Variables

Description

This function produces crisp and fuzzy sets from base variables and some specified threshold(s). The calibration of fuzzy sets is possible for positive and negative end-point and mid-point concepts, using the method of transformational assignment.

Usage

calibrate(x, type = "crisp", thresholds = NA, include = TRUE, 
          logistic = FALSE, idm = 0.95, ecdf = FALSE, p = 1, q = 1)

Arguments

x
An interval or ratio-scaled base variable.
type
The calibration type, either "crisp" or "fuzzy".
thresholds
A vector of thresholds.
include
Logical, include threshold(s) in the set (type = "crisp" only).
logistic
Calibrate to fuzzy sets using the logistic function.
idm
The set inclusion degree of membership for the logistic function.
ecdf
Calibrate to fuzzy sets using the empirical cumulative distribution function of the base variable.
p
Parameter: if $p > 1$ concentration, if $0 < p < 1$ dilation below crossover.
q
Parameter: if $q > 1$ dilation, if $0 < q < 1$ concentration above crossover.

Value

  • A numeric vector of set membership scores between 0 and 1 for bivalent crisp and fuzzy set variables, or a numeric vector of set values for multivalent set variables (beginning with 0 at increments of 1).

Details

Calibration is the process by which set membership scores are assigned to cases. With interval and ratio-scaled base variables, calibration can be based on transformational assignments using (piecewise-defined) membership functions. For type = "crisp", one threshold produces two crisp sets: 0 and 1. More thresholds produce multiple crisp sets. For example, two thresholds produce three crisp sets: 0, 1 and 2. For type = "fuzzy", this function can generate fuzzy sets by linear, s-shaped, inverted s-shaped and logistic transformation for end-point concepts. It can generate fuzzy sets by trapezoidal, triangular and bell-shaped transformation for mid-point concepts (Bojadziev and Bojadziev 2007; Clark et al. 2008; Thiem and Dusa 2013). For calibrating fuzzy sets based on end-point concepts, thresholds should be specified as a numeric vector c(thEX, thCR, thIN), where thEX is the threshold for full set exclusion, thCR the threshold for set crossover, and thIN the threshold for full set inclusion. If thEX $<$ thCR $<$ thIN, then the membership function is increasing from thEX to thIN. If thIN $<$ thCR $<$ thEX, then the membership function is decreasing from thIN to thEX. For calibrating fuzzy sets based on mid-point concepts, thresholds should be specified as a numeric vector c(thEX1, thCR1, thIN1, thIN2, thCR2, thEX2), where thEX1 is the first (left) threshold for full set exclusion, thCR1 the first (left) threshold for set crossover, thIN1 the first (left) threshold for full set inclusion, thIN2 the second (right) threshold for full set inclusion, thCR2 the second (right) threshold for set crossover, and thEX2 the second (right) threshold for full set exclusion. If thEX1 $<$ thCR1 $<$ thIN1 $\le$ thIN2 $<$ thCR2 $<$ thEX2, then the membership function is first increasing from thEX1 to thIN1, then flat between thIN1 and thIN2, and finally decreasing from thIN2 to thEX2. In contrast, if thIN1 $<$ thCR1 $<$ thEX1 $\le$ thEX2 $<$ thCR2 $<$ thIN2, then the membership function is first decreasing from thIN1 to thEX1, then flat between thEX1 and thEX2, and finally increasing from thEX2 to thIN2. The parameters p and q control the degree of concentration and dilation. They should be left at their default values unless good reasons for changing them exist. If logistic = TRUE, the argument idm specifies the inclusion degree of membership in the set. If ecdf = TRUE, calibration is based on the empirical cumulative distribution function of x.

References

Bojadziev, George, and Maria Bojadziev. 2007. Fuzzy Logic for Business, Finance, and Management. 2nd ed. Hackensack, NJ: World Scientific. Clark, Terry D., Jennifer M. Larson, John N. Mordeson, Joshua D. Potter, and Mark J. Wierman. 2008. Applying Fuzzy Mathematics to Formal Models in Comparative Politics. Berlin: Springer. Thiem, Alrik, and Adrian Dusa. 2013. Qualitative Comparative Analysis with R: A User's Guide. New York: Springer.

Examples

Run this code
# base variable; random draw from standard normal distribution
x <- rnorm(30)

# calibration thresholds
th <- quantile(x, seq(from = 0.1, to = 0.9, length = 5))

# calibration of bivalent crisp set variables
calibrate(x, thresholds = th[3])

# calibration of trivalent crisp set variables
calibrate(x, thresholds = c(th[2], th[4]))

# fuzzy-set calibration (positive end-point concept, linear)
plot(x, calibrate(x, type = "fuzzy", thresholds = c(th[1], th[3], th[5])), 
  ylab = "Fuzzy Set Membership")

# fuzzy-set calibration (positive and corresponding negative
# end-point concept, logistic)
plot(x, calibrate(x, type = "fuzzy", thresholds = c(th[1], th[3], th[5]), 
  logistic = TRUE, idm = 0.99), ylab = "Fuzzy Set Membership")
points(x, calibrate(x, type = "fuzzy", thresholds = c(th[5], th[3], th[1]),
  logistic = TRUE, idm = 0.99))

# fuzzy-set calibration (positive end-point concept, ECDF)
plot(x, calibrate(x, type = "fuzzy", thresholds = c(th[1], th[3], th[5]), 
  ecdf = TRUE), ylab = "Fuzzy Set Membership")

# fuzzy-set calibration (negative end-point concept, s-shaped)
plot(x, calibrate(x, type = "fuzzy", thresholds = c(th[5], th[3], th[1]), 
  p = 2, q = 2), ylab = "Fuzzy Set Membership")

# fuzzy-set calibration (positive mid-point concept, triangular)
plot(x, calibrate(x, type = "fuzzy", thresholds = th[c(1,2,3,3,4,5)]),
  ylab = "Fuzzy Set Membership")

# fuzzy-set calibration (negative mid-point concept, bell-shaped)
plot(x, calibrate(x, type = "fuzzy", thresholds = th[c(3,2,1,5,4,3)],
  p = 3, q = 3), ylab = "Fuzzy Set Membership")

Run the code above in your browser using DataLab