countries: Country Dissimilarities

Description Usage Format Details Source Examples

Description

Political science students were asked to give pairwise dissimilarities for 12 countries.

Usage

1

Format

The format is: num [1:12, 1:12] 0 5.58 7 7.08 4.83 2.17 6.42 3.42 2.5 6.08 ... - attr(*, "dimnames")=List of 2 ..$ : chr [1:12] "BEL" "BRA" "CHI" "CUB" ... ..$ : chr [1:12] "BEL" "BRA" "CHI" "CUB" ...

Details

These are average dissimilarities over students.

Source

Kaufman, L. and Rousseeuw, P. (1990) Finding Groups in data: An Introduction to Cluster Analysis, Wiley, New York.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
str(countries)
colnames(countries)
rownames(countries)
if(require(MASS)){
# We use multidimensional scaling:
   if(interactive())par(ask=TRUE)
   countries.cmdscale <- cmdscale(countries, k=2, eig=TRUE)
   eqscplot(countries.cmdscale$points)
   countries.sam <- sammon(countries)
   eqscplot(countries.sam$points)
}

Example output

 num [1:12, 1:12] 0 5.58 7 7.08 4.83 2.17 6.42 3.42 2.5 6.08 ...
 - attr(*, "dimnames")=List of 2
  ..$ : chr [1:12] "BEL" "BRA" "CHI" "CUB" ...
  ..$ : chr [1:12] "BEL" "BRA" "CHI" "CUB" ...
 [1] "BEL" "BRA" "CHI" "CUB" "EGY" "FRA" "IND" "ISR" "USA" "USS" "YUG" "ZAI"
 [1] "BEL" "BRA" "CHI" "CUB" "EGY" "FRA" "IND" "ISR" "USA" "USS" "YUG" "ZAI"
Loading required package: MASS
Initial stress        : 0.11767
stress after  10 iters: 0.05445, magic = 0.461
stress after  20 iters: 0.04929, magic = 0.500
stress after  30 iters: 0.04903, magic = 0.500
stress after  40 iters: 0.04897, magic = 0.500

ElemStatLearn documentation built on Aug. 12, 2019, 9:04 a.m.