| Title: | Income Polarization Index |
|---|---|
| Description: | Extremely fast and memory efficient computation of the DER (or PaF) income polarization index as proposed by Duclos J. Y., Esteban, J. and Ray D. (2004). "Polarization: concepts, measurement, estimation". Econometrica, 72(6): 1737--1772. <doi:10.1111/j.1468-0262.2004.00552.x>. The index may be computed for a single or for a range of values of the alpha-parameter and bootstrapping is also available. |
| Authors: | Michail Tsagris [aut, cre], Christos Adam [aut] (ORCID: <https://orcid.org/0009-0003-3244-7034>) |
| Maintainer: | Michail Tsagris <[email protected]> |
| License: | GPL (>= 2) |
| Version: | 1.5 |
| Built: | 2026-05-28 06:49:58 UTC |
| Source: | https://github.com/cran/DER |
Description: The PaF income polarization index as proposed by Duclos,
Esteban, and Ray. (2004). The index may be computed for a
single or for a range of values of the -parameter and bootstrapping
is also available. In all cases, we first divide the data by
, where is the mean (income), as described in
Duclos, Esteban and Ray (2004). If you want to make the index comparable to the
Gini index you should divide the alienation component (and the paf eventually)
by 2.
| Package: | DER |
| Type: | Package |
| Version: | 1.5 |
| Date: | 2026-03-28 |
Michail Tsagris <[email protected]>.
Michail Tsagris and Christos Adam.
Duclos J. Y., Esteban, J. and Ray D. (2004). Polarization: concepts, measurement, estimation. Econometrica, 72(6): 1737–1772.
Bootstrapping the decomposed PaF income polarization index
paf2.boot(y, a, R = 1000, ncores = 1)paf2.boot(y, a, R = 1000, ncores = 1)
y |
A numeric vector with income data. |
a |
The value of |
R |
The number of bootstrap resamples to perform. |
ncores |
The number of cores to use. If greater than 1, parallel computing will take place. It is advisable to use it if you have many observations and or many variables, otherwise it will slow down the process. The default is 1, meaning that code is executed serially. |
The function computes the decomposed PaF index of Duclos, Esteban and Ray (2004)
for a specific value of . The decomposition is with respect to the
deprivation and surplus components as suggested by Araar (2008). The PaF index,
the deprivation and surplus components, and also their bootstrap estimates, the
estimated bias and the estimated standard error of each, and the confidence
intervals are returned.
A list including:
boot |
A matrix with the bootstrap estimates. |
index |
The estimates. |
info |
A matrix with: the bootstrap based estimates, the bootstrap estimated bias of the estimates, the bootstrap estimated standard errors of the estimates, and the 95% percentile bootstrap confidence intervals for each component. |
Michail Tsagris and Christos Adam.
R implementation and documentation: Michail Tsagris [email protected] and Christos Adam [email protected].
Araar A. (2008). On the Decomposition of Polarization Indices: Illustrations with Chinese and Nigerian Household Surveys. CIRPEE Working Paper No. 08-06. https://papers.ssrn.com/sol3/papers.cfm?abstract_id=1136142
Duclos J. Y., Esteban, J. and Ray D. (2004). Polarization: concepts, measurement, estimation. Econometrica, 72(6): 1737–1772.
y <- rgamma(100, 10, 0.01) paf2.boot(y, 0.25)y <- rgamma(100, 10, 0.01) paf2.boot(y, 0.25)
Bootstrapping the PaF income polarization index
paf.boot(y, a, R = 1000, ncores = 1)paf.boot(y, a, R = 1000, ncores = 1)
y |
A numeric vector with income data. |
a |
The value of |
R |
The number of bootstrap resamples to perform. |
ncores |
The number of cores to use. If greater than 1, parallel computing will take place. It is advisable to use it if you have many observations and or many variables, otherwise it will slow down the process. The default is 1, meaning that code is executed serially. |
The function compute the PaF index of Duclos, Esteban and Ray (2004) for a
specific value of , the alienation and identification components,
the 1 + normalized covariance, and also their bootstrap estimates, the estimated
bias, the estimated standard error of each and the percentile bootstrap
confidence interval for the PaF index are returned.
A list including:
boot |
A matrix with the bootstrap estimates. |
index |
The estimates. |
info |
A matrix with: the bootstrap based estimates, the bootstrap estimated bias of the estimates, the bootstrap estimated standard errors of the estimates, and the 95% percentile bootstrap confidence intervals for each component. |
Michail Tsagris and Christos Adam.
R implementation and documentation: Michail Tsagris [email protected] and Christos Adam [email protected].
Duclos J. Y., Esteban, J. and Ray D. (2006). Polarization: concepts, measurement, estimation. In The Social Economics of Poverty (pp. 54–102). Routledge.
Duclos J. Y., Esteban, J. and Ray D. (2004). Polarization: concepts, measurement, estimation. Econometrica, 72(6): 1737–1772.
y <- rgamma(100, 10, 0.01) paf.boot(y, 0.25)y <- rgamma(100, 10, 0.01) paf.boot(y, 0.25)
Kernel density estimation of a univariate sample using a Gaussian kernel.
kde(y, h, ncores = 1)kde(y, h, ncores = 1)
y |
A numeric vector containing the sample data. |
h |
A numeric value for boundwidth. |
ncores |
The number of cores to use. If greater than 1, parallel computing will take place. It is advisable to use it if you have many observations and or many variables, otherwise it will slow down the process. The default is 1, meaning that code is executed serially. |
The kernel density estimate (KDE) provides a smooth estimate of the probability density function of the sample data. In this implementation, the KDE is evaluated only at the observed sample points themselves.
A numeric vector of density estimates corresponding to each observation in y.
Michail Tsagris and Christos Adam.
R implementation and documentation: Michail Tsagris [email protected] and Christos Adam [email protected].
set.seed(123) y <- rnorm(200) dens <- kde(y, h = 1)set.seed(123) y <- rnorm(200) dens <- kde(y, h = 1)
Many decomposed PaF income polarization indices
colpafs2(y, a, ncores = 1)colpafs2(y, a, ncores = 1)
y |
A numeric matrix with income data. The PaF index will be computed for each column seperately. |
a |
The value of |
ncores |
The number of cores to use. If greater than 1, parallel computing will take place. It is advisable to use it if you have many observations and or many variables, otherwise it will slow down the process. The default is 1, meaning that code is executed serially. |
The function compute the decomposed PaF index of Duclos, Esteban and Ray (2004)
for a specific value of , for each column of the matrix. The
decomposition is with respect to the deprivation and surplus components as
suggested by Araar (2008).
A matrix, where each row contains the PaF index, the deprivation and the surplus components.
Michail Tsagris and Christos Adam.
R implementation and documentation: Michail Tsagris [email protected] and Christos Adam [email protected].
Araar A. (2008). On the Decomposition of Polarization Indices: Illustrations with Chinese and Nigerian Household Surveys. CIRPEE Working Paper No. 08-06. https://papers.ssrn.com/sol3/papers.cfm?abstract_id=1136142
Duclos J. Y., Esteban, J. and Ray D. (2004). Polarization: concepts, measurement, estimation. Econometrica, 72(6): 1737–1772.
y <- matrix( rgamma(100 * 10, 10, 0.01), ncol = 10 ) colpafs2(y, 0.25)y <- matrix( rgamma(100 * 10, 10, 0.01), ncol = 10 ) colpafs2(y, 0.25)
Many PaF income polarization indices
colpafs(y, a, ncores = 1)colpafs(y, a, ncores = 1)
y |
A numeric matrix with income data. The PaF index will be computed for each column seperately. |
a |
The value of |
ncores |
The number of cores to use. If greater than 1, parallel computing will take place. It is advisable to use it if you have many observations and or many variables, otherwise it will slow down the process. The default is 1, meaning that code is executed serially. |
The function compute the PaF index of Duclos, Esteban and Ray (2004) for a
specific value of , for each column of the matrix.
A matrix, where each row contains the PaF index, the alienation (twice the Gini index) and identification components and 1 + the normalized covariance.
Michail Tsagris and Christos Adam.
R implementation and documentation: Michail Tsagris [email protected] and Christos Adam [email protected].
Duclos J. Y., Esteban, J. and Ray D. (2006). Polarization: concepts, measurement, estimation. In The Social Economics of Poverty (pp. 54–102). Routledge.
Duclos J. Y., Esteban, J. and Ray D. (2004). Polarization: concepts, measurement, estimation. Econometrica, 72(6): 1737–1772.
y <- matrix( rgamma(100 * 10, 10, 0.01), ncol = 10 ) colpafs(y, 0.25)y <- matrix( rgamma(100 * 10, 10, 0.01), ncol = 10 ) colpafs(y, 0.25)
The decomposed PaF income polarization index
paf2(y, a, ncores = 1)paf2(y, a, ncores = 1)
y |
A numeric vector with income data. |
a |
The value of |
ncores |
The number of cores to use. If greater than 1, parallel computing will take place. It is advisable to use it if you have many observations and or many variables, otherwise it will slow down the process. The default is 1, meaning that code is executed serially. |
The function compute the decomposed PaF index of Duclos, Esteban and Ray (2004)
for either a specific value, or for a range of values, of . The
decomposition is with respect to the deprivation and surplus components as
suggested by Araar (2008).
For a single value of , the function returns a vector with the PaF
index, the deprivation and the surplus components. If a range of values of
are given, it will return a matrix with the same components, where
each row corresponds to a specific value of .
Michail Tsagris and Christos Adam.
R implementation and documentation: Michail Tsagris [email protected] and Christos Adam [email protected].
Araar A. (2008). On the Decomposition of Polarization Indices: Illustrations with Chinese and Nigerian Household Surveys. CIRPEE Working Paper No. 08-06. https://papers.ssrn.com/sol3/papers.cfm?abstract_id=1136142
Duclos J. Y., Esteban, J. and Ray D. (2004). Polarization: concepts, measurement, estimation. Econometrica, 72(6): 1737–1772.
y <- rgamma(100, 10, 0.01) paf(y, 0.25) paf2( y, 0.25)y <- rgamma(100, 10, 0.01) paf(y, 0.25) paf2( y, 0.25)
The PaF income polarization index
paf(y, a, ncores = 1) pafF(y, a, ncores = 1)paf(y, a, ncores = 1) pafF(y, a, ncores = 1)
y |
A numeric vector with income data. |
a |
The value of |
ncores |
The number of cores to use. If greater than 1, parallel computing will take place. It is advisable to use it if you have many observations and or many variables, otherwise it will slow down the process. The default is 1, meaning that code is executed serially. |
The functions compute the PaF index of Duclos, Esteban and Ray (2004) for either
a specific value, or for a range of values, of . The pafF()
estimates the index using Eq. (8) and (9) in the paper, whereas paf() is faster
as it uses Eq. (3) of the paper.
The paf() function, for a single value of , returns a vector with
the PaF index, the alienation (twice the Gini index) and identification
components and 1 + the normalized covariance. If a range of values of
are given, it will return a matrix with the same components, where
each row corresponds to a specific value of .
The pafF() function returns only the PaF index for either one or more values of
.
Michail Tsagris and Christos Adam.
R implementation and documentation: Michail Tsagris [email protected] and Christos Adam [email protected].
Duclos J. Y., Esteban, J. and Ray D. (2006). Polarization: concepts, measurement, estimation. In The Social Economics of Poverty (pp. 54–102). Routledge.
Duclos J. Y., Esteban, J. and Ray D. (2004). Polarization: concepts, measurement, estimation. Econometrica, 72(6): 1737–1772.
y <- rgamma(100, 10, 0.01) paf(y, 0.25) paf( y, c(0.25, 0.5, 0.75, 1) )y <- rgamma(100, 10, 0.01) paf(y, 0.25) paf( y, c(0.25, 0.5, 0.75, 1) )