calibrate: Calibrate Raw Data into Configurational Data In QCApro: Advanced Functionality for Performing and Evaluating Qualitative Comparative Analysis

Description

This function generates configurational data from raw data (base variables) and some specified threshold(s). The calibration of bivalent fuzzy-set factors is possible for positive and negative end-point and mid-point concepts, using the method of transformational assignment.

Usage

 ```1 2``` ```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) (`type = "crisp"` only). `logistic` Calibrate to fuzzy-set variable using the logistic function. `idm` The set inclusion degree of membership for the logistic function. `ecdf` Calibrate to fuzzy-set variable 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.

Details

Calibration is the process by which configurational data is produced, that is, 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 a factor with two levels: 0 and 1. More thresholds produce factors with multiple levels. For example, two thresholds produce three levels: 0, 1 and 2.

For `type = "fuzzy"`, this function can generate bivalent fuzzy-set variables by linear, s-shaped, inverted s-shaped and logistic transformation for end-point concepts. It can generate bivalent fuzzy-set variables by trapezoidal, triangular and bell-shaped transformation for mid-point concepts (Bojadziev and Bojadziev 2007; Clark et al. 2008; Thiem 2014; Thiem and Dusa 2013).

For calibrating bivalent fuzzy-set variables based on end-point concepts, `thresholds` should be specified as a numeric vector `c(thEX, thCR, thIN)`, where `thEX` is the threshold for full exclusion, `thCR` the threshold for the crossover, and `thIN` the threshold for full 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 bivalent fuzzy-set variables 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 exclusion, `thCR1` the first (left) threshold for the crossover, `thIN1` the first (left) threshold for full inclusion, `thIN2` the second (right) threshold for full inclusion, `thCR2` the second (right) threshold for crossover, and `thEX2` the second (right) threshold for full exclusion.

If `thEX1` < `thCR1` < `thIN1` `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` `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.

If `ecdf = TRUE`, calibration is based on the empirical cumulative distribution function of `x`.

Value

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

Contributors

 Dusa, Adrian : programming Thiem, Alrik : development, documentation, programming, testing

Author(s)

Alrik Thiem (Personal Website; ResearchGate Website)

References

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. Link.

Thiem, Alrik. 2014. “Membership Function Sensitivity of Descriptive Statistics in Fuzzy-Set Relations.” International Journal of Social Research Methodology 17 (6):625-42. DOI: 10.1080/13645579.2013.806118.

Thiem, Alrik, and Adrian Dusa. 2013. Qualitative Comparative Analysis with R: A User's Guide. New York: Springer. Link.

Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59``` ```# base variable; random draw from standard normal distribution set.seed(30) x <- rnorm(30) # calibration thresholds th <- quantile(x, seq(from = 0.05, to = 0.95, length = 6)) # calibration of bivalent crisp-set factor calibrate(x, thresholds = th[3]) # calibration of trivalent crisp-set factor calibrate(x, thresholds = c(th[2], th[4])) # fuzzy-set calibration # 1. positive end-point concept, linear # 2. positive and corresponding negative end-point concept, logistic # 3. positive end-point concept, ECDF # 4. negative end-point concept, s-shaped (quadratic) # 5. negative end-point concept, inverted s-shaped (root) # 6. positive mid-point concept, triangular # 7. positive mid-point concept, trapezoidal # 8. negative mid-point concept, bell-shaped yl <- "Set Membership" xl <- "Base Variable Value" par(mfrow = c(2,4), cex.main = 1) plot(x, calibrate(x, type = "fuzzy", thresholds = c(th[1], (th[3]+th[4])/2, th[6])), xlab = xl, ylab = yl, main = "1. positive end-point concept,\nlinear") plot(x, calibrate(x, type = "fuzzy", thresholds = c(th[1], (th[3]+th[4])/2, th[6]), logistic = TRUE, idm = 0.99), xlab = xl, ylab = yl, main = "2. positive and corresponding negative\nend-point concept, logistic") points(x, calibrate(x, type = "fuzzy", thresholds = c(th[6], (th[3]+th[4])/2, th[1]), logistic = TRUE, idm = 0.99)) plot(x, calibrate(x, type = "fuzzy", thresholds = c(th[1], (th[3]+th[4])/2, th[6]), ecdf = TRUE), xlab = xl, ylab = yl, main = "3. positive end-point concept,\nECDF") plot(x, calibrate(x, type = "fuzzy", thresholds = c(th[6], (th[3]+th[4])/2, th[1]), p = 2, q = 2), xlab = xl, ylab = yl, main = "4. negative end-point concept,\ns-shaped (quadratic)") plot(x, calibrate(x, type = "fuzzy", thresholds = c(th[6], (th[3]+th[4])/2, th[1]), p = 0.5, q = 0.5), xlab = xl, ylab = yl, main = "5. negative end-point concept,\ninverted s-shaped (root)") plot(x, calibrate(x, type = "fuzzy", thresholds = th[c(1,2,3,3,4,5)]), xlab = xl, ylab = yl, main = "6. positive mid-point concept,\ntriangular") plot(x, calibrate(x, type = "fuzzy", thresholds = th[c(1,2,3,4,5,6)]), xlab = xl, ylab = yl, main = "7. positive mid-point concept,\ntrapezoidal") plot(x, calibrate(x, type = "fuzzy", thresholds = th[c(3,2,1,5,4,3)], p = 3, q = 3), xlab = xl, ylab = yl, main = "8. negative mid-point concept,\nbell-shaped") ```

Example output

```Please cite the 'QCApro' package as follows:

Thiem, Alrik. 2016. Professional Functionality for Performing and
Evaluating Qualitative Comparative Analysis. R Package Version 1.1-1.
URL: http://www.alrik-thiem.net/software/.

A BibTeX entry can be generated by:

citation(package = "QCApro")

All improvements and bug fixes on the predecessor package QCA 1.1-4
as well as all internal package changes can be browsed by:

news(package = "QCApro")

NOTE: As some function and object names currently overlap with the QCAGUI
package, you should work with only either QCApro or QCAGUI within one R session.

[1] 0 1 1 1 1 0 1 0 0 1 0 0 1 1 1 1 1 1 0 0 1 1 0 1 1 0 1 0 0 1
[1] 0 1 1 2 2 0 2 1 1 2 1 0 1 2 2 2 2 1 0 0 1 2 1 2 2 1 1 0 0 2
```

QCApro documentation built on May 1, 2019, 10:09 p.m.