Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_hierarchicalclustering.wasp
Title produced by softwareHierarchical Clustering
Date of computationMon, 10 Nov 2008 03:59:30 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2008/Nov/10/t12263148363ildvrl971y86it.htm/, Retrieved Sun, 19 May 2024 09:38:30 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=22931, Retrieved Sun, 19 May 2024 09:38:30 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact189
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F       [Hierarchical Clustering] [Various EDA Topic...] [2008-11-10 10:59:30] [33f3d2151f6019d17feb8eee7259f239] [Current]
Feedback Forum
2008-11-19 15:13:09 [Sam De Cuyper] [reply
Ook hier weer enkel de berekening zonder interpretatie. Bij hierarchical clustering begint men bovenaan vanuit het knooppunt. Van daaruit ontspringen 2 aparte takken die perioden bevatten die gelijkaardig zijn. Je zou kunnen zeggen dat de gegevens links anders zijn dan de gegevens rechts, die daarop volgen. Bij de clustering worden de gegevens telkens naar beneden toe opgesplitst tot ze helemaal onderaan de periodes allemaal apart weergeeft. We gebruiken deze methode louter als exploratief instrument.
2008-11-20 13:52:04 [Steven Vanhooreweghe] [reply
Met een endogram kan je dus zien waar de clusters zich bevinden. Ik vraag me echter nogn steeds af waar de clusters hier zitten, en hoe je dat kan zien.

Post a new message
Dataseries X:
107,2	80,6	88,6	96,1
107	104,1	105,4	94,9
119	108,2	119,9	99,9
110,4	93,4	107,2	96,3
101,7	71,9	84,1	89,5
102,4	94,1	101,4	104,6
98,8	94,9	105,1	101,5
105,6	96,4	118,7	109,8
104,4	91,1	113,8	112,1
106,3	84,4	113,8	110,1
107,2	86,4	118,9	107,1
108,5	88	98,5	108,1
106,9	75,1	91	99
114,2	109,7	120,7	104
125,9	103	127,9	106,7
110,6	82,1	112,4	101,1
110,5	68	93,1	97,8
106,7	96,4	107,5	113,8
104,7	94,3	107,3	107,1
107,4	90	114,8	117,5
109,8	88	120,8	113,7
103,4	76,1	112,2	106,6
114,8	82,5	123,3	109,8
114,3	81,4	100,6	108,8
109,6	66,5	86,7	102
118,3	97,2	123,6	114,5
127,3	94,1	125,3	116,5
112,3	80,7	111,1	108,6
114,9	70,5	98,4	113,9
108,2	87,8	102,3	109,3
105,4	89,5	105	112,5
122,1	99,6	128,2	123,4
113,5	84,2	124,7	115,2
110	75,1	116,1	110,8
125,3	92	131,2	120,4
114,3	80,8	97,7	117,6
115,6	73,1	88,8	111,2
127,1	99,8	132,8	131,1
123	90	113,9	118,9
122,2	83,1	112,6	115,7
126,4	72,4	104,3	119,6
112,7	78,8	107,5	113,1
105,8	87,3	106	106,4
120,9	91	117,3	115,5
116,3	80,1	123,1	111,8
115,7	73,6	114,3	109,6
127,9	86,4	132	121,5
108,3	74,5	92,3	109,5
121,1	71,2	93,7	109
128,6	92,4	121,3	113,4
123,1	81,5	113,6	112,7
127,7	85,3	116,3	114,4
126,6	69,9	98,3	109,2
118,4	84,2	111,9	116,2
110	90,7	109,3	113,8
129,6	100,3	133,2	123,6
115,8	79,4	118	112,6
125,9	84,8	131,6	117,7
128,4	92,9	134,1	113,3
114	81,6	96,7	110,7
125,6	76	99,8	114,7
128,5	98,7	128,3	116,9
136,6	89,1	134,9	120,6
133,1	88,7	130,7	111,6
124,6	67,1	107,3	111,9
123,5	93,6	121,6	116,1
117,2	97	120,6	111,9
135,5	100,8	140,5	125,1
124,8	80,1	124,8	115,1
127,8	80,7	129,9	116,7
133,1	89,4	159,4	115,8
125,7	81,5	111	117,2
128,4	73,6	110,1	113,6
131,9	90,9	132,7	107,2
146,3	97,3	135	115,2
140,6	84,3	118,6	111,4
129,5	65,6	94	109,4
132,4	87,3	117,9	123,5
125,9	90,5	114,7	123
126,9	82,4	113,6	119,8
135,8	80,4	130,6	115




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=22931&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]1 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=22931&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=22931&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135







Summary of Dendrogram
LabelHeight
13.47131099154196
23.65650105975644
33.97114593033295
44.00124980474851
54.12431812546025
64.35315977193578
74.6
85.10979451641648
95.34228415567723
105.44426303552647
115.81673022743975
125.92835792877741
136.07453701939497
146.08111831820431
156.15873363606514
166.2785348609369
176.31030902571341
186.35373905665003
196.53758365147246
206.54064217030713
216.67158152164838
226.74017803919155
236.75203672975792
246.87994220520335
257.23809367167903
267.41551669909477
277.60657610229464
287.83034960872623
297.85238817176023
307.91896457878175
317.93158243984137
328.05535733216122
338.08893158585323
348.1207534876451
358.21096827420494
369.16678787798649
379.42173191914622
3810.2587700928432
3910.3941721397983
4010.8687625790611
4111.1038137852181
4211.2329871361094
4311.3534212821534
4411.4564392373896
4511.6557745400327
4612.0424592338157
4712.3131033418548
4812.3957590630407
4912.9181281251883
5013.0139217772653
5113.6733830454473
5214.9015839005963
5315.2847136400259
5415.3605845684059
5515.3611041385723
5616.5742254073960
5717.8126857858071
5818.4060420513804
5918.7771316500654
6020.0108814138884
6120.4451644314627
6221.5311787617314
6322.0013899244736
6422.3649155424736
6522.9001809788249
6623.4277332816846
6727.7755363103518
6834.8582217574273
6937.5831180619026
7038.2686171631047
7141.7603043030867
7246.3794159395195
7354.6821208469289
7456.2972865730866
7593.2719880611973
7696.1094504114136
77102.244240970264
78153.918391829125
79251.406122616451
80500.061493998301

\begin{tabular}{lllllllll}
\hline
Summary of Dendrogram \tabularnewline
Label & Height \tabularnewline
1 & 3.47131099154196 \tabularnewline
2 & 3.65650105975644 \tabularnewline
3 & 3.97114593033295 \tabularnewline
4 & 4.00124980474851 \tabularnewline
5 & 4.12431812546025 \tabularnewline
6 & 4.35315977193578 \tabularnewline
7 & 4.6 \tabularnewline
8 & 5.10979451641648 \tabularnewline
9 & 5.34228415567723 \tabularnewline
10 & 5.44426303552647 \tabularnewline
11 & 5.81673022743975 \tabularnewline
12 & 5.92835792877741 \tabularnewline
13 & 6.07453701939497 \tabularnewline
14 & 6.08111831820431 \tabularnewline
15 & 6.15873363606514 \tabularnewline
16 & 6.2785348609369 \tabularnewline
17 & 6.31030902571341 \tabularnewline
18 & 6.35373905665003 \tabularnewline
19 & 6.53758365147246 \tabularnewline
20 & 6.54064217030713 \tabularnewline
21 & 6.67158152164838 \tabularnewline
22 & 6.74017803919155 \tabularnewline
23 & 6.75203672975792 \tabularnewline
24 & 6.87994220520335 \tabularnewline
25 & 7.23809367167903 \tabularnewline
26 & 7.41551669909477 \tabularnewline
27 & 7.60657610229464 \tabularnewline
28 & 7.83034960872623 \tabularnewline
29 & 7.85238817176023 \tabularnewline
30 & 7.91896457878175 \tabularnewline
31 & 7.93158243984137 \tabularnewline
32 & 8.05535733216122 \tabularnewline
33 & 8.08893158585323 \tabularnewline
34 & 8.1207534876451 \tabularnewline
35 & 8.21096827420494 \tabularnewline
36 & 9.16678787798649 \tabularnewline
37 & 9.42173191914622 \tabularnewline
38 & 10.2587700928432 \tabularnewline
39 & 10.3941721397983 \tabularnewline
40 & 10.8687625790611 \tabularnewline
41 & 11.1038137852181 \tabularnewline
42 & 11.2329871361094 \tabularnewline
43 & 11.3534212821534 \tabularnewline
44 & 11.4564392373896 \tabularnewline
45 & 11.6557745400327 \tabularnewline
46 & 12.0424592338157 \tabularnewline
47 & 12.3131033418548 \tabularnewline
48 & 12.3957590630407 \tabularnewline
49 & 12.9181281251883 \tabularnewline
50 & 13.0139217772653 \tabularnewline
51 & 13.6733830454473 \tabularnewline
52 & 14.9015839005963 \tabularnewline
53 & 15.2847136400259 \tabularnewline
54 & 15.3605845684059 \tabularnewline
55 & 15.3611041385723 \tabularnewline
56 & 16.5742254073960 \tabularnewline
57 & 17.8126857858071 \tabularnewline
58 & 18.4060420513804 \tabularnewline
59 & 18.7771316500654 \tabularnewline
60 & 20.0108814138884 \tabularnewline
61 & 20.4451644314627 \tabularnewline
62 & 21.5311787617314 \tabularnewline
63 & 22.0013899244736 \tabularnewline
64 & 22.3649155424736 \tabularnewline
65 & 22.9001809788249 \tabularnewline
66 & 23.4277332816846 \tabularnewline
67 & 27.7755363103518 \tabularnewline
68 & 34.8582217574273 \tabularnewline
69 & 37.5831180619026 \tabularnewline
70 & 38.2686171631047 \tabularnewline
71 & 41.7603043030867 \tabularnewline
72 & 46.3794159395195 \tabularnewline
73 & 54.6821208469289 \tabularnewline
74 & 56.2972865730866 \tabularnewline
75 & 93.2719880611973 \tabularnewline
76 & 96.1094504114136 \tabularnewline
77 & 102.244240970264 \tabularnewline
78 & 153.918391829125 \tabularnewline
79 & 251.406122616451 \tabularnewline
80 & 500.061493998301 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=22931&T=1

[TABLE]
[ROW][C]Summary of Dendrogram[/C][/ROW]
[ROW][C]Label[/C][C]Height[/C][/ROW]
[ROW][C]1[/C][C]3.47131099154196[/C][/ROW]
[ROW][C]2[/C][C]3.65650105975644[/C][/ROW]
[ROW][C]3[/C][C]3.97114593033295[/C][/ROW]
[ROW][C]4[/C][C]4.00124980474851[/C][/ROW]
[ROW][C]5[/C][C]4.12431812546025[/C][/ROW]
[ROW][C]6[/C][C]4.35315977193578[/C][/ROW]
[ROW][C]7[/C][C]4.6[/C][/ROW]
[ROW][C]8[/C][C]5.10979451641648[/C][/ROW]
[ROW][C]9[/C][C]5.34228415567723[/C][/ROW]
[ROW][C]10[/C][C]5.44426303552647[/C][/ROW]
[ROW][C]11[/C][C]5.81673022743975[/C][/ROW]
[ROW][C]12[/C][C]5.92835792877741[/C][/ROW]
[ROW][C]13[/C][C]6.07453701939497[/C][/ROW]
[ROW][C]14[/C][C]6.08111831820431[/C][/ROW]
[ROW][C]15[/C][C]6.15873363606514[/C][/ROW]
[ROW][C]16[/C][C]6.2785348609369[/C][/ROW]
[ROW][C]17[/C][C]6.31030902571341[/C][/ROW]
[ROW][C]18[/C][C]6.35373905665003[/C][/ROW]
[ROW][C]19[/C][C]6.53758365147246[/C][/ROW]
[ROW][C]20[/C][C]6.54064217030713[/C][/ROW]
[ROW][C]21[/C][C]6.67158152164838[/C][/ROW]
[ROW][C]22[/C][C]6.74017803919155[/C][/ROW]
[ROW][C]23[/C][C]6.75203672975792[/C][/ROW]
[ROW][C]24[/C][C]6.87994220520335[/C][/ROW]
[ROW][C]25[/C][C]7.23809367167903[/C][/ROW]
[ROW][C]26[/C][C]7.41551669909477[/C][/ROW]
[ROW][C]27[/C][C]7.60657610229464[/C][/ROW]
[ROW][C]28[/C][C]7.83034960872623[/C][/ROW]
[ROW][C]29[/C][C]7.85238817176023[/C][/ROW]
[ROW][C]30[/C][C]7.91896457878175[/C][/ROW]
[ROW][C]31[/C][C]7.93158243984137[/C][/ROW]
[ROW][C]32[/C][C]8.05535733216122[/C][/ROW]
[ROW][C]33[/C][C]8.08893158585323[/C][/ROW]
[ROW][C]34[/C][C]8.1207534876451[/C][/ROW]
[ROW][C]35[/C][C]8.21096827420494[/C][/ROW]
[ROW][C]36[/C][C]9.16678787798649[/C][/ROW]
[ROW][C]37[/C][C]9.42173191914622[/C][/ROW]
[ROW][C]38[/C][C]10.2587700928432[/C][/ROW]
[ROW][C]39[/C][C]10.3941721397983[/C][/ROW]
[ROW][C]40[/C][C]10.8687625790611[/C][/ROW]
[ROW][C]41[/C][C]11.1038137852181[/C][/ROW]
[ROW][C]42[/C][C]11.2329871361094[/C][/ROW]
[ROW][C]43[/C][C]11.3534212821534[/C][/ROW]
[ROW][C]44[/C][C]11.4564392373896[/C][/ROW]
[ROW][C]45[/C][C]11.6557745400327[/C][/ROW]
[ROW][C]46[/C][C]12.0424592338157[/C][/ROW]
[ROW][C]47[/C][C]12.3131033418548[/C][/ROW]
[ROW][C]48[/C][C]12.3957590630407[/C][/ROW]
[ROW][C]49[/C][C]12.9181281251883[/C][/ROW]
[ROW][C]50[/C][C]13.0139217772653[/C][/ROW]
[ROW][C]51[/C][C]13.6733830454473[/C][/ROW]
[ROW][C]52[/C][C]14.9015839005963[/C][/ROW]
[ROW][C]53[/C][C]15.2847136400259[/C][/ROW]
[ROW][C]54[/C][C]15.3605845684059[/C][/ROW]
[ROW][C]55[/C][C]15.3611041385723[/C][/ROW]
[ROW][C]56[/C][C]16.5742254073960[/C][/ROW]
[ROW][C]57[/C][C]17.8126857858071[/C][/ROW]
[ROW][C]58[/C][C]18.4060420513804[/C][/ROW]
[ROW][C]59[/C][C]18.7771316500654[/C][/ROW]
[ROW][C]60[/C][C]20.0108814138884[/C][/ROW]
[ROW][C]61[/C][C]20.4451644314627[/C][/ROW]
[ROW][C]62[/C][C]21.5311787617314[/C][/ROW]
[ROW][C]63[/C][C]22.0013899244736[/C][/ROW]
[ROW][C]64[/C][C]22.3649155424736[/C][/ROW]
[ROW][C]65[/C][C]22.9001809788249[/C][/ROW]
[ROW][C]66[/C][C]23.4277332816846[/C][/ROW]
[ROW][C]67[/C][C]27.7755363103518[/C][/ROW]
[ROW][C]68[/C][C]34.8582217574273[/C][/ROW]
[ROW][C]69[/C][C]37.5831180619026[/C][/ROW]
[ROW][C]70[/C][C]38.2686171631047[/C][/ROW]
[ROW][C]71[/C][C]41.7603043030867[/C][/ROW]
[ROW][C]72[/C][C]46.3794159395195[/C][/ROW]
[ROW][C]73[/C][C]54.6821208469289[/C][/ROW]
[ROW][C]74[/C][C]56.2972865730866[/C][/ROW]
[ROW][C]75[/C][C]93.2719880611973[/C][/ROW]
[ROW][C]76[/C][C]96.1094504114136[/C][/ROW]
[ROW][C]77[/C][C]102.244240970264[/C][/ROW]
[ROW][C]78[/C][C]153.918391829125[/C][/ROW]
[ROW][C]79[/C][C]251.406122616451[/C][/ROW]
[ROW][C]80[/C][C]500.061493998301[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=22931&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=22931&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of Dendrogram
LabelHeight
13.47131099154196
23.65650105975644
33.97114593033295
44.00124980474851
54.12431812546025
64.35315977193578
74.6
85.10979451641648
95.34228415567723
105.44426303552647
115.81673022743975
125.92835792877741
136.07453701939497
146.08111831820431
156.15873363606514
166.2785348609369
176.31030902571341
186.35373905665003
196.53758365147246
206.54064217030713
216.67158152164838
226.74017803919155
236.75203672975792
246.87994220520335
257.23809367167903
267.41551669909477
277.60657610229464
287.83034960872623
297.85238817176023
307.91896457878175
317.93158243984137
328.05535733216122
338.08893158585323
348.1207534876451
358.21096827420494
369.16678787798649
379.42173191914622
3810.2587700928432
3910.3941721397983
4010.8687625790611
4111.1038137852181
4211.2329871361094
4311.3534212821534
4411.4564392373896
4511.6557745400327
4612.0424592338157
4712.3131033418548
4812.3957590630407
4912.9181281251883
5013.0139217772653
5113.6733830454473
5214.9015839005963
5315.2847136400259
5415.3605845684059
5515.3611041385723
5616.5742254073960
5717.8126857858071
5818.4060420513804
5918.7771316500654
6020.0108814138884
6120.4451644314627
6221.5311787617314
6322.0013899244736
6422.3649155424736
6522.9001809788249
6623.4277332816846
6727.7755363103518
6834.8582217574273
6937.5831180619026
7038.2686171631047
7141.7603043030867
7246.3794159395195
7354.6821208469289
7456.2972865730866
7593.2719880611973
7696.1094504114136
77102.244240970264
78153.918391829125
79251.406122616451
80500.061493998301



Parameters (Session):
par1 = ward ; par2 = ALL ; par3 = FALSE ; par4 = FALSE ;
Parameters (R input):
par1 = ward ; par2 = ALL ; par3 = FALSE ; par4 = FALSE ;
R code (references can be found in the software module):
par3 <- as.logical(par3)
par4 <- as.logical(par4)
if (par3 == 'TRUE'){
dum = xlab
xlab = ylab
ylab = dum
}
x <- t(y)
hc <- hclust(dist(x),method=par1)
d <- as.dendrogram(hc)
str(d)
mysub <- paste('Method: ',par1)
bitmap(file='test1.png')
if (par4 == 'TRUE'){
plot(d,main=main,ylab=ylab,xlab=xlab,horiz=par3, nodePar=list(pch = c(1,NA), cex=0.8, lab.cex = 0.8),type='t',center=T, sub=mysub)
} else {
plot(d,main=main,ylab=ylab,xlab=xlab,horiz=par3, nodePar=list(pch = c(1,NA), cex=0.8, lab.cex = 0.8), sub=mysub)
}
dev.off()
if (par2 != 'ALL'){
if (par3 == 'TRUE'){
ylab = 'cluster'
} else {
xlab = 'cluster'
}
par2 <- as.numeric(par2)
memb <- cutree(hc, k = par2)
cent <- NULL
for(k in 1:par2){
cent <- rbind(cent, colMeans(x[memb == k, , drop = FALSE]))
}
hc1 <- hclust(dist(cent),method=par1, members = table(memb))
de <- as.dendrogram(hc1)
bitmap(file='test2.png')
if (par4 == 'TRUE'){
plot(de,main=main,ylab=ylab,xlab=xlab,horiz=par3, nodePar=list(pch = c(1,NA), cex=0.8, lab.cex = 0.8),type='t',center=T, sub=mysub)
} else {
plot(de,main=main,ylab=ylab,xlab=xlab,horiz=par3, nodePar=list(pch = c(1,NA), cex=0.8, lab.cex = 0.8), sub=mysub)
}
dev.off()
str(de)
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Summary of Dendrogram',2,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Label',header=TRUE)
a<-table.element(a,'Height',header=TRUE)
a<-table.row.end(a)
num <- length(x[,1])-1
for (i in 1:num)
{
a<-table.row.start(a)
a<-table.element(a,hc$labels[i])
a<-table.element(a,hc$height[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')
if (par2 != 'ALL'){
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Summary of Cut Dendrogram',2,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Label',header=TRUE)
a<-table.element(a,'Height',header=TRUE)
a<-table.row.end(a)
num <- par2-1
for (i in 1:num)
{
a<-table.row.start(a)
a<-table.element(a,i)
a<-table.element(a,hc1$height[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
}