Home » date » 2007 » Nov » 05 » attachments

Hierarchical Clustering

R Software Module: rwasp_hierarchicalclustering.wasp (opens new window with default values)
Title produced by software: Hierarchical Clustering
Date of computation: Mon, 05 Nov 2007 02:02:27 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2007/Nov/05/7qicwzq1bedj40t1194253306.htm/, Retrieved Mon, 05 Nov 2007 10:01:46 +0100
 
User-defined keywords:
hierarchical clustering, Q2
 
Dataseries X:
» Textbox « » Textfile « » CSV «
90,49 91,25 90,65 91,5 90,95 91,68 91,19 91,81 91,07 91,84 91,15 91,93 91,81 92,08 91,95 92,11 91,62 92,26 91,27 92,28 91,4 92,39 91,76 92,46 91,99 92,82 92,34 93,16 92,3 93,33 92,85 93,51 92,94 93,56 93,26 93,67 94,21 93,76 94,08 93,88 93,98 94,01 94,23 94,21 94,93 94,31 95,09 94,4 95,37 94,9 96,23 95,31 96,2 95,52 95,43 95,68 95,63 95,91 95,96 95,97 96,51 96,15 96,65 96,34 96,21 96,42 95,54 96,54 95,96 96,72 96,41 96,81 96,32 97,19 96,94 97,5 96,97 97,71 97,63 97,86 97,33 98,04 97,66 98,2 98,18 98,25 98,22 98,41 97,91 98,56 97,93 98,62 98,4 98,75 98,78 98,71 98,73 99,05 99,4 99,52 99,04 99,71 99,68 99,8 99,62 100,01 99,8 99,99 100,65 100,12 100,59 100,15 100,46 100,27 100,57 100,42 100,75 100,43 100,7 100,5 101,44 100,95 101,77 101,26 101,79 101,42 101,52 101,68 101,83 101,75 102,23 101,89 103,04 102,07 102,81 102,22 102,48 102,45 102,81 102,62 103,21 102,67 103,21 102,86 102,92 104,78 103,48 104,87 103,18 105,06 103,39 105,14 103,5 105,32 103,73 105,54 104,42 105,68 104,53 105,77 104,09 106,07 104,23 106,03 104,23 106,13 104,54 106,28 104,65 106,61 105,48 106,74 105,61 107,01 105,74 107,1 105,86 107,28 105,81 107,4 106,49 107,59 106,43 107,69 105,73 107,78
 
Text written by user:
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of compuational 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.063245553203373
20.0670820393249962
30.086023252670419
40.0999999999999943
50.102956301409872
60.116619037896895
70.120415945787934
80.126650868187536
90.130000000000003
100.142126704035512
110.143178210632764
120.158113883008409
130.161245154965969
140.164012194668571
150.164924225024701
160.165278439935261
170.170293863659271
180.174642491965733
190.181107702762742
200.183575597506857
210.186010752377387
220.189999999999998
230.210950231097283
240.212132034355958
250.212132034355958
260.235047663892992
270.236008474424117
280.244131112314665
290.274590604354926
300.289745145216333
310.296816441593122
320.304795013082548
330.317804971641415
340.334784843081509
350.341320963317524
360.343656805548795
370.34785054261852
380.354371665037033
390.362256119977821
400.363959365633199
410.371214223865411
420.390512483795329
430.390512483795331
440.40374694231074
450.407062648740951
460.437502082090671
470.443121070663148
480.453106573159609
490.484675971534773
500.509214307897991
510.524776659175604
520.543378596817514
530.559968940601683
540.605316175363119
550.628234391642539
560.664972401614968
570.665951185891483
580.714675097030582
590.721536298848718
600.811517913272425
610.818358155793065
620.866399444368576
630.888568669218987
640.926908385321833
650.979888426356614
661.03552088157909
671.05310076238921
681.10701492515719
691.17018878536878
701.17243257087961
711.31294766347337
721.35241541205089
731.37462788554990
741.43265384249911
751.66350103596556
762.03059970779384
772.12096292350091
783.07053375170148
793.40164602727794
803.65411589680255
814.73121690188116
825.15282899369973
836.5104486475265
846.53426589141328
859.6073475532513
8618.560808345762
8723.5282053499375
8823.7043176091529
8925.0826515420247
9091.358695540833
91185.063141850528
92288.080055578002
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/05/7qicwzq1bedj40t1194253306/1yl5o1194253340.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/05/7qicwzq1bedj40t1194253306/1yl5o1194253340.ps (open in new window)


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





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by