Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_hierarchicalclustering.wasp
Title produced by softwareHierarchical Clustering
Date of computationWed, 12 Nov 2008 13:09:21 -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/12/t1226520703ynzptm765252olr.htm/, Retrieved Sun, 19 May 2024 05:45:31 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=24425, Retrieved Sun, 19 May 2024 05:45:31 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact173
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-12 20:09:21] [821c4b3d195be8e737cf8c9dc649d3cf] [Current]
Feedback Forum
2008-11-17 14:16:16 [Stefan Temmerman] [reply
De student is hier correct, maar maakt geen interpretatie van de verkregen clusters in het dendrogram. Dit dendrogram maakt een simpele visualisatie van de observaties, en laat zien in welke clusters deze verdeeld zijn. Hier kan men afleiden dat de observaties sterk verspreid zijn over de clusters. Een doorsnee cluster bevat gegevens uit verschillende jaren.
2008-11-19 16:33:57 [Carole Thielens] [reply
Een dendogram is een visuele methode om gelijkenissen/ verwantschap te zoeken tussen verscheidene variabelen. In een dendogram worden clusters gevormd, welke overeenkomsten voorstellen tussen variabelen in deze complexe tijdsseries.Deze groepen/ clusters verschillen significant van elkaar en worden dus samengevoegd in een hiërarchische clusteranalyse. Een dendogram geeft met andere woorden een opeenvolging van het samenvoegen van clusters schematisch weer. Alle clusters onder éénzelfde tak zijn gelijkaardig en elke cluster wordt opnieuw onderverdeeld totdat je één enkele periode uitkomt.
De student besloot uit zijn dendogram dat deze overbodig is, wat natuurlijk niet zo is. Uit een dendogram kan heel wat afgeleid worden, wat niet op een andere manier grafisch voorgesteld kan worden. Verdere uitleg met betrekking tot deze specifieke opdracht gaf de student ook niet.
2008-11-22 14:02:35 [Angelique Van de Vijver] [reply
Het dendrogram verdeelt de gegevens in verschillende clusters. Zo zie je eerst een deling in twee waarna deze clusters verder worden onderverdeeld(hiërarchische clustering). Het dendrogram is louter exploratief en er kan dus niet veel uit worden afgeleid. Men kan wel afleiden dat de observaties sterk verspreid zijn over de verschillende clusters.
Een dendogram laat toe om gelijkenissen te zoeken tussen verschillende variabelen
2008-11-23 10:56:07 [Gert-Jan Geudens] [reply
De berekening van de student is correct maar de conclusie is niet aanwezig. De dedrogram tracht gelijkaardige gegevens in clusters/groepen te verdelen. Als we naar de berekening van de student kijken, zien we dat de maanden 20,14,12,23,21,18,24,3,7,4,1,60,9,8,5,2,19,6 zich in de linker cluster bevinden en dus ongeveer gelijk zijn. De andere maanden bevinden zich in de andere cluster. Opvallend is maand 60. Deze zit voornamelijk tussen de beginmaanden. Dit kan mogelijk extra vragen oproepen.
2008-11-24 23:46:00 [Jessica Alves Pires] [reply
De student heeft gelijk. Het is vrij moeilijk om de dendogram in te interpreteren zonder bijkomende uitleg te hebben gehad in de college. Er is dus geen conclusie maar de berekening is wel juist. Bij hierarchical clustering begint men boven vanuit het knooppunt. Van daaruit ontspringen 2 takken die perioden bevatten die gelijkaardig zijn. Men kan zien dat er veel kleine vertakkingen zijn. De reeksen worden geclusterd.

Post a new message
Dataseries X:
156,4	377,2
143,1	332,2
148,9	364,8
134	352,4
118	341,6
125,3	298,2
138	355,3
114	330,9
109,9	314,5
151,5	418,9
129,1	433,2
121,7	367
126,1	422,9
114,3	352,1
124,7	419,8
111,9	432,7
120	414,2
119,5	387,7
137,8	297,2
105,4	357,4
135,4	384,2
182,5	425,2
129,6	385,3
147,5	355,4
128,9	409,8
119,7	421,2
149,4	421,8
136,6	464,2
118,6	494
121,4	404,2
138,9	411,4
109,5	403,4
131,7	403,3
160,3	520,9
138,1	439,8
136,7	434,8
126,6	476,5
138	454,3
152	522
137	498,4
134,9	439,9
154,4	450,7
145,2	447,1
133,1	451,3
169,6	466,8
159,3	498
124,9	533,6
138,1	451,9
162,5	477,1
136,6	410,4
148,1	469,5
142	485,4
137,9	406,7
152,5	439,7
182,8	412,2
135,3	440,2
141,8	411,1
151,7	477,7
140,6	463,2
128	320,5




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\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 & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=24425&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]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=24425&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=24425&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'Herman Ole Andreas Wold' @ 193.190.124.10:1001







Summary of Dendrogram
LabelHeight
10.500000000000011
22.40208242989290
32.5079872407969
43.40147027033895
53.58050275799366
63.85332616230838
74.12310562561766
84.60559078397479
94.94064773081427
105.52488832348445
115.90338885725819
126.38684205249901
136.74233340772446
147.00124804936657
157.07742891168819
168.3725742755738
178.95544527089523
189.50368349641341
199.87927122818278
209.93545782054747
2110.3585713300628
2210.7737016880688
2311.0786396739012
2411.4232219623012
2512.5099960031968
2612.5399362039845
2712.5850417455966
2813.0034610777285
2913.9283882771841
3015.8068013439561
3119.0685605120051
3219.2418814048939
3320.2493625578471
3421.3646034497367
3522.2775744537021
3622.8149659769336
3723.7911133611244
3824.1300831901709
3924.4943304781846
4027.7437456035776
4132.8624980934524
4233.4158281195903
4335.5864183594392
4439.4501118602237
4541.9341229175168
4643.8179529772403
4745.4721770471529
4863.499068933508
4966.3108274854478
5068.5963228551364
5172.3723729859016
5286.39800572279
5388.087641502434
54124.735684725099
55146.216551079232
56238.486269563410
57282.902277104604
58653.472421209029
591506.67100253463

\begin{tabular}{lllllllll}
\hline
Summary of Dendrogram \tabularnewline
Label & Height \tabularnewline
1 & 0.500000000000011 \tabularnewline
2 & 2.40208242989290 \tabularnewline
3 & 2.5079872407969 \tabularnewline
4 & 3.40147027033895 \tabularnewline
5 & 3.58050275799366 \tabularnewline
6 & 3.85332616230838 \tabularnewline
7 & 4.12310562561766 \tabularnewline
8 & 4.60559078397479 \tabularnewline
9 & 4.94064773081427 \tabularnewline
10 & 5.52488832348445 \tabularnewline
11 & 5.90338885725819 \tabularnewline
12 & 6.38684205249901 \tabularnewline
13 & 6.74233340772446 \tabularnewline
14 & 7.00124804936657 \tabularnewline
15 & 7.07742891168819 \tabularnewline
16 & 8.3725742755738 \tabularnewline
17 & 8.95544527089523 \tabularnewline
18 & 9.50368349641341 \tabularnewline
19 & 9.87927122818278 \tabularnewline
20 & 9.93545782054747 \tabularnewline
21 & 10.3585713300628 \tabularnewline
22 & 10.7737016880688 \tabularnewline
23 & 11.0786396739012 \tabularnewline
24 & 11.4232219623012 \tabularnewline
25 & 12.5099960031968 \tabularnewline
26 & 12.5399362039845 \tabularnewline
27 & 12.5850417455966 \tabularnewline
28 & 13.0034610777285 \tabularnewline
29 & 13.9283882771841 \tabularnewline
30 & 15.8068013439561 \tabularnewline
31 & 19.0685605120051 \tabularnewline
32 & 19.2418814048939 \tabularnewline
33 & 20.2493625578471 \tabularnewline
34 & 21.3646034497367 \tabularnewline
35 & 22.2775744537021 \tabularnewline
36 & 22.8149659769336 \tabularnewline
37 & 23.7911133611244 \tabularnewline
38 & 24.1300831901709 \tabularnewline
39 & 24.4943304781846 \tabularnewline
40 & 27.7437456035776 \tabularnewline
41 & 32.8624980934524 \tabularnewline
42 & 33.4158281195903 \tabularnewline
43 & 35.5864183594392 \tabularnewline
44 & 39.4501118602237 \tabularnewline
45 & 41.9341229175168 \tabularnewline
46 & 43.8179529772403 \tabularnewline
47 & 45.4721770471529 \tabularnewline
48 & 63.499068933508 \tabularnewline
49 & 66.3108274854478 \tabularnewline
50 & 68.5963228551364 \tabularnewline
51 & 72.3723729859016 \tabularnewline
52 & 86.39800572279 \tabularnewline
53 & 88.087641502434 \tabularnewline
54 & 124.735684725099 \tabularnewline
55 & 146.216551079232 \tabularnewline
56 & 238.486269563410 \tabularnewline
57 & 282.902277104604 \tabularnewline
58 & 653.472421209029 \tabularnewline
59 & 1506.67100253463 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=24425&T=1

[TABLE]
[ROW][C]Summary of Dendrogram[/C][/ROW]
[ROW][C]Label[/C][C]Height[/C][/ROW]
[ROW][C]1[/C][C]0.500000000000011[/C][/ROW]
[ROW][C]2[/C][C]2.40208242989290[/C][/ROW]
[ROW][C]3[/C][C]2.5079872407969[/C][/ROW]
[ROW][C]4[/C][C]3.40147027033895[/C][/ROW]
[ROW][C]5[/C][C]3.58050275799366[/C][/ROW]
[ROW][C]6[/C][C]3.85332616230838[/C][/ROW]
[ROW][C]7[/C][C]4.12310562561766[/C][/ROW]
[ROW][C]8[/C][C]4.60559078397479[/C][/ROW]
[ROW][C]9[/C][C]4.94064773081427[/C][/ROW]
[ROW][C]10[/C][C]5.52488832348445[/C][/ROW]
[ROW][C]11[/C][C]5.90338885725819[/C][/ROW]
[ROW][C]12[/C][C]6.38684205249901[/C][/ROW]
[ROW][C]13[/C][C]6.74233340772446[/C][/ROW]
[ROW][C]14[/C][C]7.00124804936657[/C][/ROW]
[ROW][C]15[/C][C]7.07742891168819[/C][/ROW]
[ROW][C]16[/C][C]8.3725742755738[/C][/ROW]
[ROW][C]17[/C][C]8.95544527089523[/C][/ROW]
[ROW][C]18[/C][C]9.50368349641341[/C][/ROW]
[ROW][C]19[/C][C]9.87927122818278[/C][/ROW]
[ROW][C]20[/C][C]9.93545782054747[/C][/ROW]
[ROW][C]21[/C][C]10.3585713300628[/C][/ROW]
[ROW][C]22[/C][C]10.7737016880688[/C][/ROW]
[ROW][C]23[/C][C]11.0786396739012[/C][/ROW]
[ROW][C]24[/C][C]11.4232219623012[/C][/ROW]
[ROW][C]25[/C][C]12.5099960031968[/C][/ROW]
[ROW][C]26[/C][C]12.5399362039845[/C][/ROW]
[ROW][C]27[/C][C]12.5850417455966[/C][/ROW]
[ROW][C]28[/C][C]13.0034610777285[/C][/ROW]
[ROW][C]29[/C][C]13.9283882771841[/C][/ROW]
[ROW][C]30[/C][C]15.8068013439561[/C][/ROW]
[ROW][C]31[/C][C]19.0685605120051[/C][/ROW]
[ROW][C]32[/C][C]19.2418814048939[/C][/ROW]
[ROW][C]33[/C][C]20.2493625578471[/C][/ROW]
[ROW][C]34[/C][C]21.3646034497367[/C][/ROW]
[ROW][C]35[/C][C]22.2775744537021[/C][/ROW]
[ROW][C]36[/C][C]22.8149659769336[/C][/ROW]
[ROW][C]37[/C][C]23.7911133611244[/C][/ROW]
[ROW][C]38[/C][C]24.1300831901709[/C][/ROW]
[ROW][C]39[/C][C]24.4943304781846[/C][/ROW]
[ROW][C]40[/C][C]27.7437456035776[/C][/ROW]
[ROW][C]41[/C][C]32.8624980934524[/C][/ROW]
[ROW][C]42[/C][C]33.4158281195903[/C][/ROW]
[ROW][C]43[/C][C]35.5864183594392[/C][/ROW]
[ROW][C]44[/C][C]39.4501118602237[/C][/ROW]
[ROW][C]45[/C][C]41.9341229175168[/C][/ROW]
[ROW][C]46[/C][C]43.8179529772403[/C][/ROW]
[ROW][C]47[/C][C]45.4721770471529[/C][/ROW]
[ROW][C]48[/C][C]63.499068933508[/C][/ROW]
[ROW][C]49[/C][C]66.3108274854478[/C][/ROW]
[ROW][C]50[/C][C]68.5963228551364[/C][/ROW]
[ROW][C]51[/C][C]72.3723729859016[/C][/ROW]
[ROW][C]52[/C][C]86.39800572279[/C][/ROW]
[ROW][C]53[/C][C]88.087641502434[/C][/ROW]
[ROW][C]54[/C][C]124.735684725099[/C][/ROW]
[ROW][C]55[/C][C]146.216551079232[/C][/ROW]
[ROW][C]56[/C][C]238.486269563410[/C][/ROW]
[ROW][C]57[/C][C]282.902277104604[/C][/ROW]
[ROW][C]58[/C][C]653.472421209029[/C][/ROW]
[ROW][C]59[/C][C]1506.67100253463[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=24425&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=24425&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
10.500000000000011
22.40208242989290
32.5079872407969
43.40147027033895
53.58050275799366
63.85332616230838
74.12310562561766
84.60559078397479
94.94064773081427
105.52488832348445
115.90338885725819
126.38684205249901
136.74233340772446
147.00124804936657
157.07742891168819
168.3725742755738
178.95544527089523
189.50368349641341
199.87927122818278
209.93545782054747
2110.3585713300628
2210.7737016880688
2311.0786396739012
2411.4232219623012
2512.5099960031968
2612.5399362039845
2712.5850417455966
2813.0034610777285
2913.9283882771841
3015.8068013439561
3119.0685605120051
3219.2418814048939
3320.2493625578471
3421.3646034497367
3522.2775744537021
3622.8149659769336
3723.7911133611244
3824.1300831901709
3924.4943304781846
4027.7437456035776
4132.8624980934524
4233.4158281195903
4335.5864183594392
4439.4501118602237
4541.9341229175168
4643.8179529772403
4745.4721770471529
4863.499068933508
4966.3108274854478
5068.5963228551364
5172.3723729859016
5286.39800572279
5388.087641502434
54124.735684725099
55146.216551079232
56238.486269563410
57282.902277104604
58653.472421209029
591506.67100253463



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