ci_generalized_mean function

Weighting method based on generalized mean

Weighting method based on generalized mean

Generalized means are a family of functions for aggregating sets of numbers (it include as special cases the Pythagorean means, arithmetic, geometric, and harmonic means). The generalized mean is also known as power mean or Holder mean.

ci_generalized_mean(x, indic_col, p, na.rm=TRUE)

Arguments

  • x: A data.frame containing simple indicators.
  • indic_col: Simple indicators column number.
  • p: Exponent pp (real number).
  • na.rm: Remove NA values before processing; default is TRUE.

Returns

An object of class "CI". This is a list containing the following elements: - ci_generalized_mean_est: Composite indicator estimated values.

  • ci_method: Method used; for this function ci_method="generalized_mean".

Note

The generalized mean with the exponent pp can be espressed as:

Mp(I1,,In)=(1ni=1nIip)1p M_p(I_1,\dots,I_n) = \left( \frac{1}{n} \sum_{i=1}^n I_i^p \right)^{\frac{1}{p}}

Particular case are: p=p=-\infty: minimum, p=1p=-1: harmonic mean, p=0p=0: geometric mean, p=1p=1: arithmetic mean, p=2p=2: root-mean-square and p=p=\infty: maximum.

Author(s)

Vidoli F.

See Also

ci_geom_gen, ci_factor

Examples

i1 <- seq(0.3, 0.5, len = 100) - rnorm (100, 0.2, 0.03) i2 <- seq(0.3, 1, len = 100) - rnorm (100, 0.2, 0.03) Indic = data.frame(i1, i2) CI = ci_generalized_mean(Indic, p=-1) # harmonic mean data(EU_NUTS1) CI = ci_generalized_mean(EU_NUTS1,c(2:3),p=2) # geometric mean
  • Maintainer: Francesco Vidoli
  • License: GPL-3
  • Last published: 2025-01-09

Useful links