Movatterモバイル変換


[0]ホーム

URL:


Type:Package
Title:Income Polarization Index
Version:1.3
Date:2025-11-12
Maintainer:Michail Tsagris <mtsagris@uoc.gr>
Depends:R (≥ 4.0)
Imports:Rfast, Rfast2, Rcpp, RcppParallel, stats
LinkingTo:Rcpp, RcppParallel
Encoding:UTF-8
SystemRequirements:GNU make
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.
License:GPL-2 |GPL-3 [expanded from: GPL (≥ 2)]
RoxygenNote:7.3.3
NeedsCompilation:yes
Packaged:2025-11-12 19:06:14 UTC; mtsag
Author:Michail Tsagris [aut, cre], Christos AdamORCID iD [aut]
Repository:CRAN
Date/Publication:2025-11-12 20:10:16 UTC

Income Polarization Index

Description

Description: The PaF income polarization index as proposed by Duclos,Esteban, and Ray. (2004). The index may be computed for asingle or for a range of values of the\alpha-parameter and bootstrappingis also available. In all cases, we first divide the data by\mu^{1-\alpha}, where\mu is the mean (income), as described inDuclos, Esteban and Ray (2004). If you want to make the index comparable to theGini index you should divide the alienation component (and the paf eventually)by 2.

Details

Package: DER
Type: Package
Version: 1.2
Date: 2025-11-12

Maintainers

Michail Tsagris <mtsagris@uoc.gr>.

Author(s)

Michail Tsagris and Christos Adam.

References

Duclos J. Y., Esteban, J. and Ray D. (2004). Polarization: concepts,measurement, estimation. Econometrica, 72(6): 1737–1772.


Bootstrapping the PaF income polarization index

Description

Bootstrapping the PaF income polarization index

Usage

paf.boot(y, a, R = 1000, ncores = 1)

Arguments

y

A numeric vector with income data.

a

The value of\alpha. This can be a number only, between 0.25 and 1.

R

The number of bootstrap resamples to perform.

ncores

The number of cores to use. If greater than 1, parallel computing will takeplace. It is advisable to use it if you have many observations and or manyvariables, otherwise it will slow down the process. The default is 1, meaningthat code is executed serially.

Details

The function compute the PaF index of Duclos, Esteban and Ray (2004) for aspecific value of\alpha, the alienation and identification components,the 1 + normalized covariance, and also their bootstrap estimates, the estimatedbias, the estimated standard error of each and the percentile bootstrapconfidence interval for the PaF index are returned.

Value

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 ofthe estimates, the bootstrap estimated standard errors of the estimates, and the95% percentile bootstrap confidence intervals for each component.

Author(s)

Michail Tsagris and Christos Adam.

R implementation and documentation: Michail Tsagrismtsagris@uoc.grand Christos Adameconp266@econ.soc.uoc.gr.

References

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.

See Also

paf,paf2.boot

Examples

y <- rgamma(100, 10, 0.01)paf.boot(y, 0.25)

Bootstrapping the decomposed PaF income polarization index

Description

Bootstrapping the decomposed PaF income polarization index

Usage

paf2.boot(y, a, R = 1000, ncores = 1)

Arguments

y

A numeric vector with income data.

a

The value of\alpha. This can be a number only, between 0.25 and 1.

R

The number of bootstrap resamples to perform.

ncores

The number of cores to use. If greater than 1, parallel computing will takeplace. It is advisable to use it if you have many observations and or manyvariables, otherwise it will slow down the process. The default is 1, meaningthat code is executed serially.

Details

The function computes the decomposed PaF index of Duclos, Esteban and Ray (2004)for a specific value of\alpha. The decomposition is with respect to thedeprivation and surplus components as suggested by Araar (2008). The PaF index,the deprivation and surplus components, and also their bootstrap estimates, theestimated bias and the estimated standard error of each, and the confidenceintervals are returned.

Value

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 ofthe estimates, the bootstrap estimated standard errors of the estimates, and the95% percentile bootstrap confidence intervals for each component.

Author(s)

Michail Tsagris and Christos Adam.

R implementation and documentation: Michail Tsagrismtsagris@uoc.grand Christos Adameconp266@econ.soc.uoc.gr.

References

Araar A. (2008). On the Decomposition of Polarization Indices: Illustrationswith 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.

See Also

paf2,paf.boot

Examples

y <- rgamma(100, 10, 0.01)paf2.boot(y, 0.25)

Kernel Density Estimation (KDE)

Description

Kernel density estimation of a univariate sample using a Gaussian kernel.

Usage

kde(y, h, ncores = 1)

Arguments

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 takeplace. It is advisable to use it if you have many observations and or manyvariables, otherwise it will slow down the process. The default is 1, meaningthat code is executed serially.

Details

The kernel density estimate (KDE) provides a smooth estimate of the probabilitydensity function of the sample data. In this implementation, the KDE isevaluated only at the observed sample points themselves.

Value

A numeric vector of density estimates corresponding to each observation in y.

Author(s)

Michail Tsagris and Christos Adam.

R implementation and documentation: Michail Tsagrismtsagris@uoc.grand Christos Adameconp266@econ.soc.uoc.gr.

Examples

set.seed(123)y <- rnorm(200)dens <- kde(y, h = 1)

Many PaF income polarization indices

Description

Many PaF income polarization indices

Usage

colpafs(y, a, ncores = 1)

Arguments

y

A numeric matrix with income data. The PaF index will be computed for eachcolumn seperately.

a

The value of\alpha, a number between 0.25 and 1.

ncores

The number of cores to use. If greater than 1, parallel computing will takeplace. It is advisable to use it if you have many observations and or manyvariables, otherwise it will slow down the process. The default is 1, meaningthat code is executed serially.

Details

The function compute the PaF index of Duclos, Esteban and Ray (2004) for aspecific value of\alpha, for each column of the matrix.

Value

A matrix, where each row contains the PaF index, the alienation (twice the Giniindex) and identification components and 1 + the normalized covariance.

Author(s)

Michail Tsagris and Christos Adam.

R implementation and documentation: Michail Tsagrismtsagris@uoc.grand Christos Adameconp266@econ.soc.uoc.gr.

References

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.

See Also

paf,colpafs2

Examples

y <- matrix( rgamma(100 * 10, 10, 0.01), ncol = 10 )colpafs(y, 0.25)

Many decomposed PaF income polarization indices

Description

Many decomposed PaF income polarization indices

Usage

colpafs2(y, a, ncores = 1)

Arguments

y

A numeric matrix with income data. The PaF index will be computed for eachcolumn seperately.

a

The value of\alpha, a number between 0.25 and 1.

ncores

The number of cores to use. If greater than 1, parallel computing will takeplace. It is advisable to use it if you have many observations and or manyvariables, otherwise it will slow down the process. The default is 1, meaningthat code is executed serially.

Details

The function compute the decomposed PaF index of Duclos, Esteban and Ray (2004)for a specific value of\alpha, for each column of the matrix. Thedecomposition is with respect to the deprivation and surplus components assuggested by Araar (2008).

Value

A matrix, where each row contains the PaF index, the deprivation and the surpluscomponents.

Author(s)

Michail Tsagris and Christos Adam.

R implementation and documentation: Michail Tsagrismtsagris@uoc.grand Christos Adameconp266@econ.soc.uoc.gr.

References

Araar A. (2008). On the Decomposition of Polarization Indices: Illustrationswith 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.

See Also

paf2,colpafs

Examples

y <- matrix( rgamma(100 * 10, 10, 0.01), ncol = 10 )colpafs2(y, 0.25)

The PaF income polarization index

Description

The PaF income polarization index

Usage

paf(y, a, ncores = 1)pafF(y, a, ncores = 1)

Arguments

y

A numeric vector with income data.

a

The value of\alpha. This can either be a number or a vector with manyvalues. In any case, the\alpha may take values between 0.25 and 1.

ncores

The number of cores to use. If greater than 1, parallel computing will takeplace. It is advisable to use it if you have many observations and or manyvariables, otherwise it will slow down the process. The default is 1, meaningthat code is executed serially.

Details

The functions compute the PaF index of Duclos, Esteban and Ray (2004) for eithera specific value, or for a range of values, of\alpha. The pafF()estimates the index using Eq. (8) and (9) in the paper, whereas paf() is fasteras it uses Eq. (3) of the paper.

Value

The paf() function, for a single value of\alpha, returns a vector withthe PaF index, the alienation (twice the Gini index) and identificationcomponents and 1 + the normalized covariance. If a range of values of\alpha are given, it will return a matrix with the same components, whereeach row corresponds to a specific value of\alpha.

The pafF() function returns only the PaF index for either one or more values of\alpha.

Author(s)

Michail Tsagris and Christos Adam.

R implementation and documentation: Michail Tsagrismtsagris@uoc.grand Christos Adameconp266@econ.soc.uoc.gr.

References

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.

See Also

paf.boot

Examples

y <- rgamma(100, 10, 0.01)paf(y, 0.25)paf( y, c(0.25, 0.5, 0.75, 1) )

The decomposed PaF income polarization index

Description

The decomposed PaF income polarization index

Usage

paf2(y, a, ncores = 1)

Arguments

y

A numeric vector with income data.

a

The value of\alpha. This can either be a number or a vector with manyvalues. In any case, the\alpha may take values between 0.25 and 1.

ncores

The number of cores to use. If greater than 1, parallel computing will takeplace. It is advisable to use it if you have many observations and or manyvariables, otherwise it will slow down the process. The default is 1, meaningthat code is executed serially.

Details

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\alpha. Thedecomposition is with respect to the deprivation and surplus components assuggested by Araar (2008).

Value

For a single value of\alpha, the function returns a vector with the PaFindex, the deprivation and the surplus components. If a range of values of\alpha are given, it will return a matrix with the same components, whereeach row corresponds to a specific value of\alpha.

Author(s)

Michail Tsagris and Christos Adam.

R implementation and documentation: Michail Tsagrismtsagris@uoc.grand Christos Adameconp266@econ.soc.uoc.gr.

References

Araar A. (2008). On the Decomposition of Polarization Indices: Illustrationswith 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.

See Also

colpafs2,paf

Examples

y <- rgamma(100, 10, 0.01)paf(y, 0.25)paf2( y, 0.25)

[8]ページ先頭

©2009-2025 Movatter.jp