normalise_ci: Normalisation and polarity functions

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/normalise_ci.R

Description

This function lets to normalise simple indicators according to the polarity of each one.

Usage

1
normalise_ci(x, indic_col, polarity, method=1, z.mean=0, z.std=1, ties.method ="average")

Arguments

x

A data frame containing simple indicators.

indic_col

Simple indicators column number.

method

Normalisation methods:

  • 1 (default) = standardization or z-scores using the following formulation:

    z_{ij}=z.mean \pm \frac{x_{ij}-M_{x_j}}{S_{x_j}}\cdot z.std

    where \pm depends on polarity parameter and z.mean and z.std represent the shifting parameters.

  • 2 = Min-max method using the following formulation:

    if polarity="POS":

    \frac{x-min(x)}{max(x)-min(x)}

    if polarity="NEG":

    \frac{max(x)-x}{max(x)-min(x)}

  • 3 = Ranking method. If polarity="POS" ranking is increasing, while if polarity="NEG" ranking is decreasing.

polarity

Polarity vector: "POS" = positive, "NEG" = negative. The polarity of a individual indicator is the sign of the relationship between the indicator and the phenomenon to be measured (e.g., in a well-being index, "GDP per capita" has 'positive' polarity and "Unemployment rate" has 'negative' polarity).

z.mean

If method=1, Average shifting parameter. Default is 0.

z.std

If method=1, Standard deviation expansion parameter. Default is 1.

ties.method

If method=3, A character string specifying how ties are treated, see rank for details. Default is "average".

Value

ci_norm

A data.frame containing normalised score of the choosen simple indicators.

norm_method

Normalisation method used.

Author(s)

Vidoli F.

References

OECD, "Handbook on constructing composite indicators: methodology and user guide", 2008, pag.30.

See Also

ci_bod, ci_mpi

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(EU_NUTS1)

# Standard z-scores normalisation #
data_norm = normalise_ci(EU_NUTS1,c(2:3),c("NEG","POS"),method=1,z.mean=0, z.std=1)
summary(data_norm$ci_norm)

# Normalisation for MPI index #
data_norm = normalise_ci(EU_NUTS1,c(2:3),c("NEG","POS"),method=1,z.mean=100, z.std=10)
summary(data_norm$ci_norm)

data_norm = normalise_ci(EU_NUTS1,c(2:3),c("NEG","POS"),method=2)
summary(data_norm$ci_norm)

Example output

Loading required package: Benchmarking
Loading required package: lpSolveAPI
Loading required package: ucminf
Loading required package: psych
Loading required package: boot

Attaching package: 'boot'

The following object is masked from 'package:psych':

    logit

Loading required package: lpSolve
     roads             trains        
 Min.   :-2.7432   Min.   :-0.63920  
 1st Qu.:-0.1263   1st Qu.:-0.45429  
 Median : 0.3252   Median :-0.31098  
 Mean   : 0.0000   Mean   : 0.00000  
 3rd Qu.: 0.6281   3rd Qu.:-0.05248  
 Max.   : 1.3356   Max.   : 4.30715  
     roads            trains      
 Min.   : 72.57   Min.   : 93.61  
 1st Qu.: 98.74   1st Qu.: 95.46  
 Median :103.25   Median : 96.89  
 Mean   :100.00   Mean   :100.00  
 3rd Qu.:106.28   3rd Qu.: 99.48  
 Max.   :113.36   Max.   :143.07  
     roads            trains       
 Min.   :0.0000   Min.   :0.00000  
 1st Qu.:0.6416   1st Qu.:0.03738  
 Median :0.7523   Median :0.06636  
 Mean   :0.6725   Mean   :0.12923  
 3rd Qu.:0.8265   3rd Qu.:0.11862  
 Max.   :1.0000   Max.   :1.00000  

Compind documentation built on March 13, 2019, 1:04 a.m.