Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_hierarchicalclustering.wasp
Title produced by softwareHierarchical Clustering
Date of computationThu, 13 Nov 2008 09:02:32 -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/13/t1226592229uyofowck82x7jrh.htm/, Retrieved Sun, 19 May 2024 09:40:17 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=24662, Retrieved Sun, 19 May 2024 09:40:17 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact162
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F       [Hierarchical Clustering] [Eigen tijdreeks h...] [2008-11-13 16:02:32] [c8dc05b1cdf5010d9a4f2d773adefb82] [Current]
Feedback Forum
2008-11-16 11:13:47 [Nicolaj Wuyts] [reply
Er valt niet direct een patroon te ontdekken. De waarden van meting 37 tot en met 46 staan wel dicht bij elkaar geclusterd, maar voor de rest staan alle meting lukraak door elkaar.
2008-11-23 13:34:27 [c97d2ae59c98cf77a04815c1edffab5a] [reply
de student heeft geen conclusie gevormd of uitleg gegeven.
dmv hierarchical clustering gaan we na of er in periodes groepen gemaakt kunnen worden die gelijkaardig zijn? De tijdsreeks wordt allereerst opgesplitst in 2 delen (2 vertakkingen vanuit 1 knooppunt), elke vertakking/cluster geeft periodes weer de gelijkaardig zijn. Vb huwelijken: in eerste vertakking zitten alle maanden tot maand 18 en in de tweede vertakking alle volgende maanden. Hieruit kunnen we vaststellen dat er toch een verandering heeft plaats gevonden tussen de 2 clusters en we een patroon kunnen zoeken voor de periodes die zich in dezelfde vertakking bevinden en dus gelijkaardig zijn. de periodes staan eerder lukraak verdeeld, enkel de periodes 30-37 en 38-46 47-49 staan bij elkaar geclusterd. misschien kunnen we hierdoor toch een patroon ontdekken. verder onderzoek zal hievoor nodig zijn.
2008-11-24 10:24:25 [Julian De Ruyter] [reply
Geen conclusie gegeven, wel een berekening.
Een dendogram geeft gelijkaardige groepen weer per periode. Dit wordt gedaan door middel van clusters (boom-tak verdeling).
38tot42, 43tot46 staan bij elkaar geclusterd. voor de rest zie je niet echt een duidelijk patroon voor de resterende groepjes.
2008-11-24 19:58:19 [Liese Drijkoningen] [reply
De jusite grafiek werd geproduceerd, maar er werd geen informatie gegeven.
Op het dendogram zien we vanboven twee opslitsingen die op zich ook steeds verder worden opgesplitst. We kunnen deze grafiek makkelijk visueel aflezen. Een dendogram moet gebruikt worden als een exploratief instrument. In dit geval wordt het wel op een atypische manier gebruikt. Meestal wordt dit statistisch instrument ingezet in marketing.
We hebben hier te maken met clustering. In de rijen kan je de periodes die op elkaar volgen aflezen. Zoals ik al zei, wordt het bovenste knooppunt steeds verder opgesplitst tot men bij de periode aankomt.
2008-11-24 21:08:52 [Jonas Scheltjens] [reply
Q2: Wanneer de gegevens correct invoert krijgt men hier een dendrogram. De student in kwestie heeft deze ook verkregen, maar heeft er echter verder geen uitleg bij geschreven. Een dendrogram geeft zeer duidelijk weer waar de clusters (of gegevens waarvan men enige samenhang en overeenkomsten kan bespeuren) zich bevinden. Hierbij worden allereerst (bij de eerste opsplitsing) de tijdsreeksen opgesplitst in 2 delen, waarvan de periodes gelijkaardig zijn (bijvoorbeeld: de volgnummers van de perioden zijn laag, de eerste maanden in de eerste cluster,…). Vervolgens worden in het dendrogram de clusters nog verder en verder opgesplitst in kleinere clusters waarvan de elementen nog meer in details overeenkomen, totdat elke tak van de clusters nog slechts 1 element bevat.

Post a new message
Dataseries X:
12301	10165	2136
310	269	41
910	708	202
2072	1362	710
3289	2271	1018
4693	3516	1177
6183	4775	1408
7252	6334	918
6703	6150	553
8217	7794	423
9731	8851	880
10778	9721	1057
11279	9676	1603
514	402	112
1350	1046	304
2537	1743	794
3612	2711	901
5049	3817	1232
5368	4128	1240
6537	5505	1032
6066	4921	1145
7679	6091	1588
9527	7263	2264
10244	8035	2209
10745	7828	2917
539	296	243
1058	500	558
2372	1134	1238
3563	2061	1502
4737	2737	2000
5105	2959	2146
6179	4113	2066
5540	3494	2046
6470	4518	1952
8241	5470	2771
8942	5664	3278
8717	4717	4000
-196	-606	410
492	-615	1107
560	-1062	1622
1003	-983	1986
1696	-340	2036
2867	467	2400
4316	1580	2736
3705	804	2901
4592	1709	2883
6082	2335	3747
6907	2832	4075
7578	2582	4996




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'George Udny Yule' @ 72.249.76.132

\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 & 3 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=24662&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]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=24662&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=24662&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 time3 seconds
R Server'George Udny Yule' @ 72.249.76.132







Summary of Dendrogram
LabelHeight
1170.358445637427
2316.691800567171
3322.759972735158
4338.269123627918
5438.068487796144
6445.585008724486
7453.898667105335
8511.568177274545
9558.227552168468
10578.779750855194
11606.99423391001
12676.233879093075
13684.457449371398
14742.389385699984
15744.458991673162
16773.297575481808
17801.34108636423
18886.614910770172
19891.691650740322
20979.404921368072
21994.363774215577
221017.45663298246
231032.86688396908
241049.54494572012
251274.9516769792
261377.02686009418
271401.48351630439
281524.33409870919
291738.48833323596
301748.21559590431
311866.29994720769
321902.18137936423
331942.32701515737
342364.49089018934
352441.27843862488
362467.54901223178
373364.40464616374
383876.44787528356
394518.61088809413
406236.62652745382
416302.7369407503
426656.76378197765
437889.1308417712
4410258.9053820257
4514405.9520803652
4620262.0730057753
4742684.5818643584
48107711.685591206

\begin{tabular}{lllllllll}
\hline
Summary of Dendrogram \tabularnewline
Label & Height \tabularnewline
1 & 170.358445637427 \tabularnewline
2 & 316.691800567171 \tabularnewline
3 & 322.759972735158 \tabularnewline
4 & 338.269123627918 \tabularnewline
5 & 438.068487796144 \tabularnewline
6 & 445.585008724486 \tabularnewline
7 & 453.898667105335 \tabularnewline
8 & 511.568177274545 \tabularnewline
9 & 558.227552168468 \tabularnewline
10 & 578.779750855194 \tabularnewline
11 & 606.99423391001 \tabularnewline
12 & 676.233879093075 \tabularnewline
13 & 684.457449371398 \tabularnewline
14 & 742.389385699984 \tabularnewline
15 & 744.458991673162 \tabularnewline
16 & 773.297575481808 \tabularnewline
17 & 801.34108636423 \tabularnewline
18 & 886.614910770172 \tabularnewline
19 & 891.691650740322 \tabularnewline
20 & 979.404921368072 \tabularnewline
21 & 994.363774215577 \tabularnewline
22 & 1017.45663298246 \tabularnewline
23 & 1032.86688396908 \tabularnewline
24 & 1049.54494572012 \tabularnewline
25 & 1274.9516769792 \tabularnewline
26 & 1377.02686009418 \tabularnewline
27 & 1401.48351630439 \tabularnewline
28 & 1524.33409870919 \tabularnewline
29 & 1738.48833323596 \tabularnewline
30 & 1748.21559590431 \tabularnewline
31 & 1866.29994720769 \tabularnewline
32 & 1902.18137936423 \tabularnewline
33 & 1942.32701515737 \tabularnewline
34 & 2364.49089018934 \tabularnewline
35 & 2441.27843862488 \tabularnewline
36 & 2467.54901223178 \tabularnewline
37 & 3364.40464616374 \tabularnewline
38 & 3876.44787528356 \tabularnewline
39 & 4518.61088809413 \tabularnewline
40 & 6236.62652745382 \tabularnewline
41 & 6302.7369407503 \tabularnewline
42 & 6656.76378197765 \tabularnewline
43 & 7889.1308417712 \tabularnewline
44 & 10258.9053820257 \tabularnewline
45 & 14405.9520803652 \tabularnewline
46 & 20262.0730057753 \tabularnewline
47 & 42684.5818643584 \tabularnewline
48 & 107711.685591206 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=24662&T=1

[TABLE]
[ROW][C]Summary of Dendrogram[/C][/ROW]
[ROW][C]Label[/C][C]Height[/C][/ROW]
[ROW][C]1[/C][C]170.358445637427[/C][/ROW]
[ROW][C]2[/C][C]316.691800567171[/C][/ROW]
[ROW][C]3[/C][C]322.759972735158[/C][/ROW]
[ROW][C]4[/C][C]338.269123627918[/C][/ROW]
[ROW][C]5[/C][C]438.068487796144[/C][/ROW]
[ROW][C]6[/C][C]445.585008724486[/C][/ROW]
[ROW][C]7[/C][C]453.898667105335[/C][/ROW]
[ROW][C]8[/C][C]511.568177274545[/C][/ROW]
[ROW][C]9[/C][C]558.227552168468[/C][/ROW]
[ROW][C]10[/C][C]578.779750855194[/C][/ROW]
[ROW][C]11[/C][C]606.99423391001[/C][/ROW]
[ROW][C]12[/C][C]676.233879093075[/C][/ROW]
[ROW][C]13[/C][C]684.457449371398[/C][/ROW]
[ROW][C]14[/C][C]742.389385699984[/C][/ROW]
[ROW][C]15[/C][C]744.458991673162[/C][/ROW]
[ROW][C]16[/C][C]773.297575481808[/C][/ROW]
[ROW][C]17[/C][C]801.34108636423[/C][/ROW]
[ROW][C]18[/C][C]886.614910770172[/C][/ROW]
[ROW][C]19[/C][C]891.691650740322[/C][/ROW]
[ROW][C]20[/C][C]979.404921368072[/C][/ROW]
[ROW][C]21[/C][C]994.363774215577[/C][/ROW]
[ROW][C]22[/C][C]1017.45663298246[/C][/ROW]
[ROW][C]23[/C][C]1032.86688396908[/C][/ROW]
[ROW][C]24[/C][C]1049.54494572012[/C][/ROW]
[ROW][C]25[/C][C]1274.9516769792[/C][/ROW]
[ROW][C]26[/C][C]1377.02686009418[/C][/ROW]
[ROW][C]27[/C][C]1401.48351630439[/C][/ROW]
[ROW][C]28[/C][C]1524.33409870919[/C][/ROW]
[ROW][C]29[/C][C]1738.48833323596[/C][/ROW]
[ROW][C]30[/C][C]1748.21559590431[/C][/ROW]
[ROW][C]31[/C][C]1866.29994720769[/C][/ROW]
[ROW][C]32[/C][C]1902.18137936423[/C][/ROW]
[ROW][C]33[/C][C]1942.32701515737[/C][/ROW]
[ROW][C]34[/C][C]2364.49089018934[/C][/ROW]
[ROW][C]35[/C][C]2441.27843862488[/C][/ROW]
[ROW][C]36[/C][C]2467.54901223178[/C][/ROW]
[ROW][C]37[/C][C]3364.40464616374[/C][/ROW]
[ROW][C]38[/C][C]3876.44787528356[/C][/ROW]
[ROW][C]39[/C][C]4518.61088809413[/C][/ROW]
[ROW][C]40[/C][C]6236.62652745382[/C][/ROW]
[ROW][C]41[/C][C]6302.7369407503[/C][/ROW]
[ROW][C]42[/C][C]6656.76378197765[/C][/ROW]
[ROW][C]43[/C][C]7889.1308417712[/C][/ROW]
[ROW][C]44[/C][C]10258.9053820257[/C][/ROW]
[ROW][C]45[/C][C]14405.9520803652[/C][/ROW]
[ROW][C]46[/C][C]20262.0730057753[/C][/ROW]
[ROW][C]47[/C][C]42684.5818643584[/C][/ROW]
[ROW][C]48[/C][C]107711.685591206[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=24662&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=24662&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
1170.358445637427
2316.691800567171
3322.759972735158
4338.269123627918
5438.068487796144
6445.585008724486
7453.898667105335
8511.568177274545
9558.227552168468
10578.779750855194
11606.99423391001
12676.233879093075
13684.457449371398
14742.389385699984
15744.458991673162
16773.297575481808
17801.34108636423
18886.614910770172
19891.691650740322
20979.404921368072
21994.363774215577
221017.45663298246
231032.86688396908
241049.54494572012
251274.9516769792
261377.02686009418
271401.48351630439
281524.33409870919
291738.48833323596
301748.21559590431
311866.29994720769
321902.18137936423
331942.32701515737
342364.49089018934
352441.27843862488
362467.54901223178
373364.40464616374
383876.44787528356
394518.61088809413
406236.62652745382
416302.7369407503
426656.76378197765
437889.1308417712
4410258.9053820257
4514405.9520803652
4620262.0730057753
4742684.5818643584
48107711.685591206



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')
}