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 p (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 p can be espressed as:
Mp(I1,…,In)=(n1i=1∑nIip)p1
Particular case are: p=−∞: minimum, p=−1: harmonic mean, p=0: geometric mean, p=1: arithmetic mean, p=2: root-mean-square and p=∞: 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 meandata(EU_NUTS1)CI = ci_generalized_mean(EU_NUTS1,c(2:3),p=2)# geometric mean