Type: | Package |
Title: | Gini-Based Composite Indicators |
Version: | 0.1.0 |
Maintainer: | Viet Duong Nguyen <viet-duong.nguyen@outlook.com> |
Description: | An implementation of Gini-based weighting approaches in constructing composite indicators, providing functionalities for normalization, aggregation, and ranking comparison. |
License: | GPL-3 |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 7.3.2 |
Depends: | R (≥ 3.5.0) |
Imports: | DescTools (≥ 0.99.57), ggplot2 (≥ 3.5.1), ggrepel (≥ 0.9.6), ggpubr (≥ 0.6.0) |
Suggests: | R.rsp |
VignetteBuilder: | R.rsp |
NeedsCompilation: | no |
Packaged: | 2025-02-12 15:48:08 UTC; Duong Nguyen |
Author: | Viet Duong Nguyen |
Repository: | CRAN |
Date/Publication: | 2025-02-13 10:30:10 UTC |
giniCI: Gini-based Composite Indicators
Description
An implementation of Gini-based weighting approaches in constructing composite indicators, providing functionalities for normalization, aggregation, and ranking comparison.
Author(s)
Viet Duong Nguyen (maintainer) <viet-duong.nguyen@outlook.it>
Chiara Gigliarano
Mariateresa Ciommi
References
Ciommi, M., Gigliarano, C., Emili, A., Taralli, S., and Chelli, F. M. (2017). A new class of composite indicators for measuring well-being at the local level: An application to the Equitable and Sustainable Well-being (BES) of the Italian Provinces. Ecological Indicators, 76, 281–296.
OECD Better Life Index Indicators
Description
This dataset includes 11 well-being indicators for 36 countries spanning the years 2014 to 2017. The indicators are derived from the OECD Better Life Index, which measures 11 topics deemed essential by the OECD for assessing material living conditions and quality of life.
Usage
bli
Format
A data frame with 144 rows and 13 variables:
- COUNTRY
Country.
- YEAR
Year.
- HO_HISH
Housing expenditure: percentage of housing costs in households gross adjusted disposable income.
- IW_HADI
Household income: average amount of money that a household earns per year, after taxes.
- JE_EMPL
Employment rate: percentage of people, aged 15 to 64, currently in a paid job.
- SC_SNTWS
Quality of support network: percentage of people who believe they can rely on their friends in case of need.
- ES_EDUA
Educational attainment: percentage of people, aged 25 to 64, having at least an upper-secondary (high school) degree.
- CG_VOTO
Voter turnout: percentage of registered voters who voted during recent elections.
- EQ_AIRP
Air pollution: average concentration of particulate matter (PM2.5) in the air.
- HS_LEB
Life expectancy: average number of years a person can expect to live.
- SW_LIFS
Life satisfaction: average self-evaluation of life satisfaction, on a scale from 0 to 10.
- PS_REPH
Homicide rate: average number of reported homicides per 100,000 people.
- WL_TNOW
Leisure and personal care: average number of hours per day spent on leisure and personal care, including sleeping and eating.
Source
OECD (2024). Better Life Index (Editions 2014, 2015, 2016, and 2017), OECD Social and Welfare Statistics (database). Accessed on December 06, 2024.
Computing Gini-based Composite Indicators
Description
Compute a composite index with weighting schemes based on the Gini coefficient of constituent indicators, with options for aggregation methods and horizontal variability adjustment.
Usage
giniCI(inds, method = c("equal", "gini", "reci"),
agg = c("ari", "geo"), hv = TRUE, ci.pol = c("pos", "neg"),
time = NULL, ref.time = NULL, only.ci = FALSE)
Arguments
inds |
a matrix or data frame of indicators to be aggregated. |
method |
weighting method to be used. See |
agg |
aggregation function to be used, with |
hv |
a logical value indicating whether horizontal variability adjustment should be applied. |
ci.pol |
a character value indicating the polarity of composite index.
Use |
time |
a vector of temporal factors for indicators. The length of |
ref.time |
a value denoting the reference time for weighting. If provided, weights will be derived using only observations at the reference time. |
only.ci |
a logical value indicating whether only the composite index should be returned. |
Details
The defaut method is "equal"
that produces equal weights 1/n
where
n
is the number of indicators. For methods "gini"
(Gini-based
weighting) and "reci"
(reciprocal Gini-based weighting), weights are
defined based on the Gini coefficient of indicators. Let G_i
be the
Gini coefficient of the i
-th indicator, the weights by methods
"gini"
and "reci"
are respectively computed as
w^\mathrm{gini}_i = \frac{G_i}{\sum^n_{i = 1} G_i}
and
w^\mathrm{reci}_i = \frac{1 / G_i}{\sum^n_{i = 1} 1 / G_i}
.
Temporal factors can be applied to methods "gini"
and "reci"
. If either
time
or ref.time
is NULL
, the weighting process is run on all
observations. If both time
and ref.time
are not NULL
, only observations
at the reference time are used for weight computation.
When aggregating the indicators, the aggregate score for the j
-th unit
is computed by applying the chosen aggregation function with the obtained
weights to values in the j
-th row. If hv = TRUE
, horizontal
variability adjustment is executed by introducing a penalty for units with
unbalanced values among dimensions. The penalty for the j
-th unit is
defined as the the index of dispersion (variance-to-mean ratio) of values in
the j
-th row. If ci.pol = "pos"
, the penalties is subtracted from the
aggregate scores to form the composite index. If ci.pol = "neg"
the
penalties is added to the aggregate scores to form the composite index.
Value
A list containing the following components:
ci |
the composite index. |
w |
the weights assigned. |
pen |
the horizontal variability penalties (if |
If only.ci = TRUE
, the function will return only the composite index.
Note
Methods "gini"
and "reci"
require non-negative indicators for the
calculation of Gini coefficients. In addition, option hv = TRUE
cannot be
used if any row contains negative values. Therefore, it may be necessary to
use normalize
to scale the indicators to non-negative ranges before
computing the composite index.
A Gini coefficient of zero occurs when the indicators are constant or do not
change over the reference time. If a zero Gini coefficient is obtained for
for one or more indicators, method "gini"
returns the corresponding weights
as zero while method "reci"
cannot be applied.
Author(s)
Viet Duong Nguyen, Chiara Gigliarano, Mariateresa Ciommi
References
Mazziotta, M. and Pareto, A. (2016). On a Generalized Non-compensatory Composite Index for Measuring Socio-economic Phenomena. Social Indicators Research, 127, 983–1003.
Ciommi, M., Gigliarano, C., Emili, A., Taralli, S., and Chelli, F. M. (2017). A new class of composite indicators for measuring well-being at the local level: An application to the Equitable and Sustainable Well-being (BES) of the Italian Provinces. Ecological Indicators, 76, 281–296.
See Also
Examples
data(bli)
# Indicator polarity
bli.pol = c("neg", "pos", "pos", "pos", "pos", "neg",
"pos", "pos", "pos", "neg", "pos")
# Goalpost normalization without using time factors
bli.norm <- normalize(inds = bli[, 3:13], method = "goalpost",
ind.pol = bli.pol)
# Goalpost normalization using time factors and a reference time
bli.norm.2014 <- normalize(inds = bli[, 3:13], method = "goalpost",
ind.pol = bli.pol, time = bli$YEAR,
ref.time = 2014)
# Adjusted Mazziotta-Pareto index
bli.ampi <- giniCI(bli.norm, ci.pol = "pos")
bli.ampi$ci
# Gini-based weighted arithmetic mean with reference time
bli.gini <- giniCI(bli.norm.2014, method = "gini", ci.pol = "pos",
time = bli$YEAR, ref.time = 2014)
bli.gini$ci
bli.gini$w
# Reciprocal Gini-based weighted geometric mean with reference time
bli.reci <- giniCI(bli.norm.2014, method = "reci", agg = "geo",
ci.pol = "pos", time = bli$YEAR, ref.time = 2014)
bli.reci$ci
bli.reci$w
Indicator Normalization
Description
Perform normalization based on indicators' polarity.
Usage
normalize(inds, method = c("min-max", "goalpost"), ind.pol,
gp.range = c(70, 130), time = NULL, ref.time = NULL,
ref.value = NULL)
Arguments
inds |
a numeric vector, matrix, or data frame which provides indicators to be normalized. |
method |
normalization method to be used. See ‘Details’. |
ind.pol |
a character vector whose elements can be |
gp.range |
a vector of the form |
time |
a vector of temporal factors for input indicators. The length of
|
ref.time |
a value denoting the reference time for normalization. See ‘Details’. |
ref.value |
a vector containing reference values for indicators to
facilitate the interpretation of results, required by method |
Details
By default, each indicator x
is normalized by method "min-max"
with
the formulas
\displaystyle\tilde{x}^{+}_i = \frac{x_i -
\mathrm{inf}_x}{\mathrm{sup}_x - \mathrm{inf}_x},
or
\displaystyle \tilde{x}^{-}_i = 1 - \tilde{x}^{+}_i,
where \mathrm{sup}_x
and \mathrm{inf}_x
are respectively the
superior and inferior values of the indicator. The former formula is applied
to indicators with positive polarity while the latter one is used for those
with negative polarity.
If either time
or ref.time
is NULL
, the superior and inferior values
are respectively the maximum and minimum values of x
. If both time
and ref.time
are not NULL
, the superior and inferior values are
respectively the maximum and minimum values of x
observed at the
reference time. In other words, if time
is not provided or provided without
specifying a value for ref.time
, the input data will be treated as
cross-sectional.
For method "goalpost"
, a vector of reference values for indicators is
required. If not specified by users (ref.value = NULL
), these values are
automatically set #' to the indicator means for cross-sectional data or to
the indicator means at the reference time for longitudinal data.
Method "goalpost"
computes two goalposts for normalization as
\mathrm{gp\_min}_x = \mathrm{ref}_x - \Delta
and
\mathrm{gp\_max}_x = \mathrm{ref}_x + \Delta
, where
\mathrm{ref}_x
is the reference value of x
and
\Delta = (\mathrm{sup}_x - \mathrm{inf}_x)/2
. Indicators with
positive polarity are rescaled using the formula
\displaystyle \tilde{x}^{+}_i =
\frac{x_i - \mathrm{gp\_min}_x}{\mathrm{gp\_max}_x -
\mathrm{gp\_min}_x} (b - a) + a,
while indicators with negative polarity are rescaled using the formula
\displaystyle \tilde{x}^{-}_i = a + b - \tilde{x}^{+}_i.
If an indicator follows a symmetric probability distribution and its
reference value is set to the mean, the normalized values will theoretically
remain in the range [a,b]
. In other cases, the normalized values may
extend beyond gp.range
.
Value
An object of class "data.frame"
containing normalized indicators.
Author(s)
Viet Duong Nguyen, Chiara Gigliarano, Mariateresa Ciommi
References
Mazziotta, M. and Pareto, A. (2016). On a Generalized Non-compensatory Composite Index for Measuring Socio-economic Phenomena. Social Indicators Research, 127, 983–1003.
See Also
Examples
# Generate data samples
set.seed(1)
df1 <- data.frame(X1 = rnorm(100, 0, 5),
X2 = runif(100, 1, 10),
X3 = rpois(100, 10))
set.seed(1)
df2 <- data.frame(X1 = rnorm(300, 0, 5),
X2 = runif(300, 1, 10),
X3 = rpois(300, 10),
time = rep(c(2020:2022), rep(100,3)))
# Min-max normalization
df1.mm <- normalize(inds = df1,
ind.pol = c("pos", "neg", "pos"))
summary(df1.mm)
df2.mm <- normalize(inds = df2[, 1:3],
ind.pol = c("pos", "neg", "pos"),
time = df2[, 4], ref.time = 2020)
summary(df2.mm)
# Goalpost normalization
df1.gp <- normalize(inds = df1, method = "goalpost",
ind.pol = c("pos", "neg", "pos"))
summary(df1.gp)
df2.gp <- normalize(inds = df2[, 1:3], method = "goalpost",
ind.pol = c("pos", "neg", "pos"),
time = df2[, 4], ref.time = 2020)
summary(df2.gp)
Ranking Comparison
Description
Perform a ranking comparison between two indices.
Usage
rankComp(ref, alt, highest.first = TRUE, id = NULL, time = NULL)
Arguments
ref |
a numeric vector of reference index values. |
alt |
a numeric vector of alternative index values. |
highest.first |
a logical value indicating whether the highest value
gets ranking #1. If |
id |
a vector of unit identifiers. |
time |
a vector of temporal factors. |
Value
An object of classes "rankComp"
and "data.frame"
containing the following
columns:
id |
the unit identifiers (if provided). |
time |
the temporal factors (if provided). |
ref.rank |
the ranking based on the reference index. |
alt.rank |
the ranking based on the alternative index. |
shift |
the ranking shifts between two indices. |
Author(s)
Viet Duong Nguyen, Chiara Gigliarano, Mariateresa Ciommi
See Also
summary.rankComp
, rankScatterPlot
, rankShiftPlot
,
rankRankPlot
.
Examples
data(bli)
# Goalpost normalization
bli.pol = c("neg", "pos", "pos", "pos", "pos", "neg",
"pos", "pos", "pos", "neg", "pos")
bli.norm.2014 <- normalize(inds = bli[, 3:13], method = "goalpost",
ind.pol = bli.pol, time = bli$YEAR,
ref.time = 2014)
# Composite indices
ci.gini <- giniCI(bli.norm.2014, method = "gini",
ci.pol = "pos", time = bli$YEAR, ref.time = 2014,
only.ci = TRUE)
ci.reci <- giniCI(bli.norm.2014, method = "reci", agg = "geo",
ci.pol = "pos", time = bli$YEAR, ref.time = 2014,
only.ci = TRUE)
# Ranking comparison
ci.comp <- rankComp(ci.gini, ci.reci, id = bli$COUNTRY, time = bli$YEAR)
print(ci.comp)
summary(ci.comp)
Rank-rank Plot
Description
Generate rank-rank plots for ranking comparison.
Usage
rankRankPlot(object, id.col = FALSE, p.size = 1.5, p.nudge = 0.05,
s.width = 0.5, lab.size = 3.88,
max.overlaps = 10, max.tick = 50,
ref.lab = "Reference ranking", alt.lab = "Alternative ranking",
y.lab = NULL, combine = FALSE, nr = NULL, nc = NULL)
Arguments
object |
an object of class |
id.col |
a logical value indicating whether the rank-rank segment should be colored by unit identifiers. It is not recommended if having more than 20 units. |
p.size |
size of segment endpoints. |
p.nudge |
horizontal adjustment value to nudge the starting position of labels. |
s.width |
line width for rank-rank segments. |
lab.size |
label size value. |
max.overlaps |
a value to exclude the label if it has too many overlaps.
The default value is |
max.tick |
a positive integer to control the maximum number of axis
ticks. The default value is |
ref.lab |
name of the reference index. |
alt.lab |
name of the alternative index. |
y.lab |
label of the y-axis. |
combine |
a logical value indicating whether to generate a grid that
combines plots from different time factors (If |
nr |
(optional) number of rows in the plot grid. |
nc |
(optional) number of columns in the plot grid. |
Value
A plot comparing two rankings connected by segments. In case object$time
is not NULL
, a list of plots for different time factors and the combined
grid (if combine = TRUE
) will be returned. The function does not print the
return if it is assigned to an object. Use print
with the storing object
to generate the plot.
Author(s)
Viet Duong Nguyen, Chiara Gigliarano, Mariateresa Ciommi
See Also
rankComp
, rankScatterPlot
, rankShiftPlot
.
Examples
data(bli)
# Goalpost normalization
bli.pol = c("neg", "pos", "pos", "pos", "pos", "neg",
"pos", "pos", "pos", "neg", "pos")
bli.norm.2014 <- normalize(inds = bli[, 3:13], method = "goalpost",
ind.pol = bli.pol, time = bli$YEAR,
ref.time = 2014)
# Composite indices
ci.gini <- giniCI(bli.norm.2014, method = "gini",
ci.pol = "pos", time = bli$YEAR, ref.time = 2014,
only.ci = TRUE)
ci.reci <- giniCI(bli.norm.2014, method = "reci", agg = "geo",
ci.pol = "pos", time = bli$YEAR, ref.time = 2014,
only.ci = TRUE)
# Ranking comparison plots
ci.comp <- rankComp(ci.gini, ci.reci, id = bli$COUNTRY, time = bli$YEAR)
rankScatterPlot(ci.comp)$'2014'
rankShiftPlot(ci.comp)$'2015'
rankRankPlot(ci.comp)$'2016'
# Storing and printing
p.scatter <- rankScatterPlot(ci.comp, combine = TRUE, max.overlaps = 20)
print(p.scatter$'2017') # or: print(p.scatter[[4]])
print(p.scatter$'comb') # or: print(p.scatter[[5]])
Rank Scatter Plot
Description
Generate rank scatter plots for ranking comparison.
Usage
rankScatterPlot(object, p.col = "black", p.size = 1.5, p.shape = 19,
lab = TRUE, lab.col = "red", lab.size = 3.88,
ref.line = TRUE, max.overlaps = 10, max.tick = 50,
ref.lab = "Reference ranking", alt.lab = "Alternative ranking",
combine = FALSE, nr = NULL, nc = NULL)
Arguments
object |
an object of class |
p.col |
point color code. See ‘Color Specification’
in |
p.size |
point size value. |
p.shape |
point shape value. See ‘pch values’ in |
lab |
a logical value indicating whether identifier labels should be
assigned to scatter points. If |
lab.col |
color code for labels. See ‘Color Specification’ in
|
lab.size |
label size value. |
ref.line |
a logical value indicating whether a 45-degree reference line should be added to the plot. |
max.overlaps |
a value to exclude the label if it has too many overlaps.
The default value is |
max.tick |
a positive integer to control the maximum number of axis
ticks. The default value is |
ref.lab |
name of the reference index. |
alt.lab |
name of the alternative index. |
combine |
a logical value indicating whether to generate a grid that
combines plots from different time factors (If |
nr |
(optional) number of rows in the plot grid. |
nc |
(optional) number of columns in the plot grid. |
Value
A scatter plot displaying unit rankings for two indices. In case object$time
is not NULL
, a list of plots for different time factors and the combined
grid (if combine = TRUE
) will be returned. The function does not print the
return if it is assigned to an object. Use print
with the storing object
to generate the plot.
Author(s)
Viet Duong Nguyen, Chiara Gigliarano, Mariateresa Ciommi
See Also
rankComp
, rankShiftPlot
, rankRankPlot
.
Examples
data(bli)
# Goalpost normalization
bli.pol = c("neg", "pos", "pos", "pos", "pos", "neg",
"pos", "pos", "pos", "neg", "pos")
bli.norm.2014 <- normalize(inds = bli[, 3:13], method = "goalpost",
ind.pol = bli.pol, time = bli$YEAR,
ref.time = 2014)
# Composite indices
ci.gini <- giniCI(bli.norm.2014, method = "gini",
ci.pol = "pos", time = bli$YEAR, ref.time = 2014,
only.ci = TRUE)
ci.reci <- giniCI(bli.norm.2014, method = "reci", agg = "geo",
ci.pol = "pos", time = bli$YEAR, ref.time = 2014,
only.ci = TRUE)
# Ranking comparison plots
ci.comp <- rankComp(ci.gini, ci.reci, id = bli$COUNTRY, time = bli$YEAR)
rankScatterPlot(ci.comp)$'2014'
rankShiftPlot(ci.comp)$'2015'
rankRankPlot(ci.comp)$'2016'
# Storing and printing
p.scatter <- rankScatterPlot(ci.comp, combine = TRUE, max.overlaps = 20)
print(p.scatter$'2017') # or: print(p.scatter[[4]])
print(p.scatter$'comb') # or: print(p.scatter[[5]])
Rank Shift Plot
Description
Generate rank shift plots for ranking comparison.
Usage
rankShiftPlot(object, p.cols = c("black", "red"), p.shapes = c(1, 8),
p.sizes = c(1.5, 1.5), s.col = "black",
s.type = 1, s.width = 0.5, max.tick = 50,
ref.lab = "Reference ranking", alt.lab = "Alternative ranking",
y.lab = "Ranking", combine = FALSE, nr = NULL, nc = NULL)
Arguments
object |
an object of class |
p.cols |
a vector with two elements denoting the color codes for
reference and alternative positions. See ‘Color Specification’ in
|
p.shapes |
a vector with two elements denoting the shapes for reference
and alternative positions. See ‘pch values’ in |
p.sizes |
a vector with two elements denoting the sizes for reference and alternative positions. |
s.col |
color code for rank shift segments. See ‘Color
Specification’ in |
s.type |
line type for rank shift segments. See ‘Line Type
Specification’ in |
s.width |
line width for rank shift segments. |
max.tick |
a positive integer to control the maximum number of axis
ticks. The default value is |
ref.lab |
name of the reference index. |
alt.lab |
name of the alternative index. |
y.lab |
label of the y-axis. |
combine |
a logical value indicating whether to generate a grid that
combines plots from different time factors (If |
nr |
(optional) number of rows in the plot grid. |
nc |
(optional) number of columns in the plot grid. |
Value
A plot displaying shifts in ranking between two indices. In case object$time
is not NULL
, a list of plots for different time factors and the combined
grid (if combine = TRUE
) will be returned. The function does not print the
return value if it is assigned to an object. Use print
with the storing
object to produce the plot.
Author(s)
Viet Duong Nguyen, Chiara Gigliarano, Mariateresa Ciommi
See Also
rankComp
, rankScatterPlot
, rankRankPlot
.
Examples
data(bli)
# Goalpost normalization
bli.pol = c("neg", "pos", "pos", "pos", "pos", "neg",
"pos", "pos", "pos", "neg", "pos")
bli.norm.2014 <- normalize(inds = bli[, 3:13], method = "goalpost",
ind.pol = bli.pol, time = bli$YEAR,
ref.time = 2014)
# Composite indices
ci.gini <- giniCI(bli.norm.2014, method = "gini",
ci.pol = "pos", time = bli$YEAR, ref.time = 2014,
only.ci = TRUE)
ci.reci <- giniCI(bli.norm.2014, method = "reci", agg = "geo",
ci.pol = "pos", time = bli$YEAR, ref.time = 2014,
only.ci = TRUE)
# Ranking comparison plots
ci.comp <- rankComp(ci.gini, ci.reci, id = bli$COUNTRY, time = bli$YEAR)
rankScatterPlot(ci.comp)$'2014'
rankShiftPlot(ci.comp)$'2015'
rankRankPlot(ci.comp)$'2016'
# Storing and printing
p.scatter <- rankScatterPlot(ci.comp, combine = TRUE, max.overlaps = 20)
print(p.scatter$'2017') # or: print(p.scatter[[4]])
print(p.scatter$'comb') # or: print(p.scatter[[5]])
Summarizing Ranking Comparison
Description
Summary method for class "rankComp"
and print method for class
"summary.rankComp"
.
Usage
## S3 method for class 'rankComp'
summary(object, n.pick = 10L, n.q = 10L, ...)
## S3 method for class 'summary.rankComp'
print(x, digits = max(3L, getOption("digits") - 3L), ...)
Arguments
object |
an object of class |
n.pick |
a positive integer specifying the number of units considered to
form the top/bottom based on the alternative index. The default value is |
n.q |
a positive integer specifying the n-quantiles considered
to compute quantile rankings. The default value is |
... |
further arguments passed to or from other methods. |
x |
an object of class |
digits |
number of significant digits to use when printing. |
Details
summary.rankComp
provides details on the ranking comparison between the
reference and the alternative indices stored in the object of class
"rankComp"
. print.summary.rankComp
prints summary information using a
smart digit format for the components.
Value
An object of class "summary.rankComp"
which is a list of components:
par |
a vector storing the values of |
n.unit |
the number of ranked units (by temporal factors if available). |
shift.stats |
a data frame with rows presenting the summary statistics of ranking shifts: minimum, first quartile, median, mean, third quartile, and maximum. |
asr |
a data frame giving the average shift in ranking (ASR)
where |
per |
a data frame giving the percentage of equal rankings (PER)
where |
asq |
the average shift in quantile ranking (by temporal factors if available). This value is similar to the ASR for all units, but using the quantile ranking of two indices. |
For shift.stats
, asr
, and per
, multiple columns will be generated
according to temporal factors if object$time
is not NULL
.
Author(s)
Viet Duong Nguyen, Chiara Gigliarano, Mariateresa Ciommi
References
Mariani, F., Ciommi, M., and Recchioni, M. C. (2024). Two in One: A New Tool to Combine Two Rankings Based on the Voronoi Diagram. Social Indicators Research, 175, 989–1005.
See Also
Examples
data(bli)
# Goalpost normalization
bli.pol = c("neg", "pos", "pos", "pos", "pos", "neg",
"pos", "pos", "pos", "neg", "pos")
bli.norm.2014 <- normalize(inds = bli[, 3:13], method = "goalpost",
ind.pol = bli.pol, time = bli$YEAR,
ref.time = 2014)
# Composite indices
ci.gini <- giniCI(bli.norm.2014, method = "gini",
ci.pol = "pos", time = bli$YEAR, ref.time = 2014,
only.ci = TRUE)
ci.reci <- giniCI(bli.norm.2014, method = "reci", agg = "geo",
ci.pol = "pos", time = bli$YEAR, ref.time = 2014,
only.ci = TRUE)
# Ranking comparison
ci.comp <- rankComp(ci.gini, ci.reci, id = bli$COUNTRY, time = bli$YEAR)
print(ci.comp)
summary(ci.comp)