dist.GDM | R Documentation |
Calculates Generalized Distance Measure for variables measured on metric scale (ratio & interval) or ordinal scale
dist.GDM(x, method="GDM1", weightsType="equal", weights=NULL)
GDM(x, method="GDM1", weightsType="equal", weights=NULL)
GDM1(x, weightsType="equal", weights=NULL)
GDM2(x, weightsType="equal", weights=NULL)
x |
matrix or data set |
method |
GDM1 or GDM2 |
"GDM1" - metric scale (ratio & interval)
"GDM2" - ordinal scale
weightsType |
equal or different1 or different2 |
"equal" - equal weights
"different1" - vector of different weights should satisfy conditions: each weight takes value from interval [0; 1] and sum of weights equals one
"different2" - vector of different weights should satisfy conditions: each weight takes value from interval [0; m] and sum of weights equals m (m - the number of variables)
weights |
vector of weights |
See file $R_HOME\library\clusterSim\pdf\distGDM_details.pdf for further details
object with calculated distance
Marek Walesiak marek.walesiak@ue.wroc.pl, Andrzej Dudek andrzej.dudek@ue.wroc.pl
Department of Econometrics and Computer Science, University of Economics, Wroclaw, Poland
Jajuga, K., Walesiak, M., Bak, A. (2003), On the general distance measure, In: M. Schwaiger, O. Opitz (Eds.), Exploratory data analysis in empirical research, Springer-Verlag, Berlin, Heidelberg, 104-109. Available at: \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/978-3-642-55721-7_12")}.
Walesiak, M. (1999), Distance Measure for Ordinal Data, "Argumenta Oeconomica", No. 2 (8), 167-173.
Walesiak, M. (2006), Uogolniona miara odleglosci w statystycznej analizie wielowymiarowej [The Generalized Distance Measure in multivariate statistical analysis], Wydawnictwo AE, Wroclaw.
dist.BC
, dist.SM
, dist
#Example 1
library(clusterSim)
data(data_ratio)
d1 <- GDM(data_ratio, method="GDM1")
data(data_ordinal)
d2 <- GDM(data_ordinal, method="GDM2")
d3 <- GDM1(data_ratio)
d4 <- GDM2(data_ordinal)
#Example 2
library(clusterSim)
data(data_ratio)
d1w <- GDM(data_ratio, method="GDM1", weightsType="different1",
weights=c(0.4,0.1,0.3,0.15,0.05))
data(data_ordinal)
d2w <- GDM(data_ordinal, method="GDM2", weightsType="different2",
weights=c(1,3,0.5,1.5,1.8,0.2,0.4,0.6,0.2,0.4,0.9,1.5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.