Home » date » 2007 » Nov » 01 » attachments

WS4 - Hierarchical Clustering

R Software Module: rwasp_hierarchicalclustering.wasp (opens new window with default values)
Title produced by software: Hierarchical Clustering
Date of computation: Thu, 01 Nov 2007 06:53:41 -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/01/7vq4nawtqqr785h1193925171.htm/, Retrieved Thu, 01 Nov 2007 14:52:51 +0100
 
User-defined keywords:
WS4HC
 
Dataseries X:
» Textbox « » Textfile « » CSV «
97.3 93.5 105.5 96.5 101 94.7 106.4 97.3 113.2 112.9 117.9 122.0 101 99.2 89.7 91.0 105.7 105.6 88.5 107.9 113.9 113.0 106.4 114.6 86.4 83.1 61.4 98.0 96.5 81.1 92.3 95.5 103.3 96.9 95.5 98.7 114.9 104.3 92.5 115.9 105.8 97.7 89.6 110.4 94.2 102.6 84.3 109.5 98.4 89.9 76.3 92.3 99.4 96.0 80.7 102.1 108.8 112.7 96.3 112.8 112.6 107.1 81 110.2 104.4 106.2 82.9 98.9 112.2 121.0 90.3 119.0 81.1 101.2 74.8 104.3 97.1 83.2 70.1 98.8 112.6 105.1 86.7 109.4 113.8 113.3 86.4 170.3 107.8 99.1 89.9 118.0 103.2 100.3 88.1 116.9 103.3 93.5 78.8 111.7 101.2 98.8 81.1 116.8 107.7 106.2 85.4 116.1 110.4 98.3 82.6 114.8 101.9 102.1 80.3 110.8 115.9 117.1 81.2 122.8 89.9 101.5 68 104.7 88.6 80.5 67.4 86.0 117.2 105.9 91.3 127.2 123.9 109.5 94.9 126.1 100 97.2 82.8 114.6 103.6 114.5 88.6 127.8 94.1 93.5 73.1 105.2 98.7 100.9 76.7 113.1 119.5 121.1 93.2 161.0 112.7 116.5 84.9 126.9 104.4 109.3 83.8 117.7 124.7 118.1 93.5 144.9 89.1 108.3 91.9 119.4 97 105.4 69.6 107.1 121.6 116.2 87 142.8 118.8 111.2 90.2 126.2 114 105.8 82.7 126.9 111.5 122.7 91.4 179.2 97.2 99.5 74.6 105.3 102.5 107.9 76.1 114.8 113.4 124.6 87.1 125.4 109.8 115.0 78.4 113.2 104.9 110.3 81.3 134.4 126.1 132.7 99.3 150.0 80 99.7 71 100.9 96.8 96.5 73.2 101.8 117.2 118.7 95.6 137.7 112.3 112.9 84 138.7 117.3 130.5 90.8 135.4 111.1 137.9 93.6 153.8 102.2 115.0 80.9 119.5 104.3 116.8 84.4 123.3 122.9 140.9 97.3 166.4 107.6 120.7 83.5 137.5 121.3 134.2 88.8 142.2 131.5 147.3 100.7 167.0 89 112.4 69.4 112.3 104.4 107.1 74.6 120.6 128.9 128.4 96.6 154.9 135.9 137.7 96.6 153.4 133.3 135.0 93.1 156.2 121.3 151.0 91.8 175.8 120.5 137.4 85.7 131.7 120.4 132.4 79.1 130.1 137.9 161.3 91.3 161.1 126.1 139.8 84.2 128.2 133.2 146.0 85.8 140.3 146.6 154.6 90 168.2 103.4 142.1 76.6 110.2 117.2 120.5 81.3 126.2
 
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
13.42490875790874
24.07185461430047
34.83425278610873
44.98196748283247
55.06162029393751
65.20096144957834
75.42770669804476
85.47083174663597
95.7323642591866
105.8429444631966
115.86003412959344
126.09343909463285
136.33561362458286
146.51996388168818
157.18470597867442
167.31317808087963
177.5914425506619
187.73821684886124
198.09938269252664
208.35942581760254
218.50780406844028
228.59883713068226
238.8495476786472
248.94035793466904
259.1989129792601
2610.0647700592165
2710.1498768338859
2810.1739864360043
2910.2004898382589
3010.2231087223271
3110.4347668272364
3210.7609056860358
3311.2623265802409
3411.2814006222632
3511.4608027642046
3611.9737990389705
3712.8903416743467
3813.0818322731710
3913.1407762327802
4013.1688210771077
4113.2056920815861
4213.8419651783986
4313.9519397759106
4414.0662717164144
4514.3299579684984
4614.7195098958274
4714.7927284330719
4815.2363221047147
4915.7475997770911
5017.2483110420655
5118.6854260533227
5219.0527337526540
5320.7403782816229
5421.2335085226022
5521.5138443692751
5623.9686294558721
5724.0262986291667
5824.200498182342
5925.6907921049861
6028.1760936307079
6128.3562180469680
6232.557869096833
6334.0737556766259
6434.6636483703758
6538.6131748737818
6638.7226258914067
6748.2294077439159
6853.904964478872
6956.2050076936645
7056.8333786129471
7165.4707304100143
7270.7948423759706
7383.415108412949
7483.9137771639779
75115.721435368988
76116.135537296676
77213.422176127059
78330.436876956095
79958.799363482108
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/01/7vq4nawtqqr785h1193925171/1k9eb1193925215.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/01/7vq4nawtqqr785h1193925171/1k9eb1193925215.ps (open in new window)


 
Parameters:
par1 = 50 ; par2 = 50 ; par3 = 0 ; par4 = 0 ; par5 = 0 ; par6 = Y ; par7 = Y ;
 
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