A reference vector must be defined for each partial indicator so as to
compare different spatial entities. This vector is used by
p2distance() (as the base reference) to calculate the distance of each
spatial entity from this reference base. It is common to use the minimum
value as the base reference (see references).
Arguments
- X
A data frame or matrix with
nrows (entities) andmcolumns (variables).- reference_vector_function
Function used to build the reference vector. Common choices are
min,max,mean,median, etc. Seeapply()for details.minis the default.
Value
A vector with the reference value (base reference) for each variable. Its length equals the number of variables.
References
Peña, J. B. (1977). Problemas de la medición del bienestar y conceptos afines (una aplicación al caso Español). Madrid: INE.
Peña, J. B. (2009). La medición del bienestar social: una revisión crítica. Estudios de Economía Aplicada, 27(2), 299-324.
Somarriba, N. (2008). Aproximación a la medición de la calidad de vida en la Unión Europea. Doctoral Thesis. University of Valladolid.
Zarzosa, P. (1992). Aproximación a la medición del bienestar social, estudio de la idoneidad del indicador sintético Distancia P2. Doctoral Thesis. University of Valladolid.
Examples
## Create a data frame of 3 variables (indicators) for 6 entities (rows)
dat <- data.frame(
x1 = c(10, 12, 13, 14, 12, 11),
x2 = c(40, 51, 61, 68, 34, 44),
x3 = c(0.43, 0.41, 0.39, 0.55, 0.60, 0.38)
)
## Calculate the reference vector using the minimum value of each variable
makeReferenceVector(dat, reference_vector_function = min)
#> x1 x2 x3
#> [1,] 10 34 0.38
