Skip to contents

PolarizationIndices: variance, Gini mean difference, bias-corrected skewness and excess kurtosis, and the bimodality coefficient. EstebanRayIndex: Esteban and Ray (1994) polarization. EarthMoversDistance: one-dimensional Wasserstein-1 distance. IssueConstraint: mean absolute correlation between issues. PolarizationTrend: OLS trend of a polarization series. Identical to the Python arm morie.fn.polarize.

Usage

PolarizationIndices(positions, weights = NULL)

EstebanRayIndex(positions, shares = NULL, alpha = 1, k = 1)

EarthMoversDistance(a, b)

IssueConstraint(X)

PolarizationTrend(time, values)

Arguments

positions

Positions (ideal points, opinions, group locations).

weights

Optional weights.

shares

Group population shares.

alpha

Esteban-Ray sensitivity.

k

Esteban-Ray scale constant.

a, b

Samples.

X

Respondents x issues matrix.

time, values

Time points and polarization values.

Value

Numeric or list.

References

Esteban, J.-M. and Ray, D. (1994). On the measurement of polarization. Econometrica 62, 819-851.

Pfister, R., Schwarz, K. A., Janczyk, M., Dale, R. and Freeman, J. B. (2013). Good things peak in pairs: a note on the bimodality coefficient. Frontiers in Psychology 4, 700.

Examples

PolarizationIndices(c(-1, -1, 1, 1, 0))$gini_mean_difference
#> [1] 0.96
EstebanRayIndex(c(0, 1), c(0.5, 0.5))
#> [1] 0.25