Home » date » 2008 » Nov » 11 »

Hierarchical Clustering

*Unverified author*
R Software Module: rwasp_hierarchicalclustering.wasp (opens new window with default values)
Title produced by software: Hierarchical Clustering
Date of computation: Tue, 11 Nov 2008 04:00:46 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Nov/11/t12264014249i9112xt9pfs4w0.htm/, Retrieved Tue, 11 Nov 2008 11:03:47 +0000
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2008/Nov/11/t12264014249i9112xt9pfs4w0.htm/},
    year = {2008},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2008},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
 
Feedback Forum:

Post a new message
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
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 101 99.2 89.7 91 105.7 105.6 88.5 107.9 113.9 113 106.4 114.6 86.4 83.1 61.4 98 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 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 90.3 119 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 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 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 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 78.4 113.2 104.9 110.3 81.3 134.4 126.1 132.7 99.3 150 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 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 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 93.1 156.2 121.3 151 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 85.8 140.3 151.1 166.5 94.6 174.9 105 143.3 77.1 111.8 119 121 76.5 136.6 140.4 152.6 89.7 166.1 156.6 154.4 103.6 159.4 137.1 154.6 100 168.2 122.7 158 96.6 154.6
 
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 computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'George Udny Yule' @ 72.249.76.132


Summary of Dendrogram
LabelHeight
13.42490875790874
24.07185461430047
34.83425278610873
45.06162029393751
55.20096144957834
65.42770669804476
75.47083174663597
85.7323642591866
95.8429444631966
105.86003412959344
116.09343909463285
126.33561362458286
136.41092816992985
146.51996388168818
157.18470597867442
167.5914425506619
177.73821684886124
188.09938269252664
198.35942581760254
208.50780406844028
218.59883713068226
228.8495476786472
238.94035793466904
249.1989129792601
259.30483745156248
2610.0647700592165
2710.1498768338859
2810.1739864360043
2910.2004898382589
3010.2231087223271
3110.4347668272364
3210.4642247682282
3310.7609056860358
3411.2814006222632
3511.4608027642046
3611.9737990389705
3712.8903416743467
3813.0321193346946
3913.0818322731710
4013.1688210771077
4113.2056920815861
4213.8419651783986
4313.9519397759106
4414.0662717164144
4514.3299579684984
4614.7927284330718
4714.9392101531507
4815.2363221047147
4915.7475997770911
5017.4925758107547
5118.6854260533227
5219.0527337526540
5319.3214701101887
5420.7403782816229
5521.2335085226022
5621.5138443692751
5722.3138970150890
5823.4138847695123
5923.9686294558721
6024.0262986291667
6124.200498182342
6225.4214692758231
6325.6907921049861
6428.1760936307079
6532.557869096833
6633.6692528464547
6734.0737556766259
6834.4511742294636
6934.6586917554746
7044.8792610134792
7150.3539838950428
7254.6776448873855
7356.2050076936645
7456.8333786129471
7570.7948423759706
7672.1517854488152
7783.415108412949
78115.439762089984
79116.135537296676
80122.207831290847
81213.422176127059
82420.210761664436
831134.39907550252


Summary of Cut Dendrogram
LabelHeight
117.8014480315073
223.0066215057009
324.7485795046908
426.0836514352437
530.5408773027900
632.2697581807124
737.848037318212
875.339799576612
9162.075404491801
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/11/t12264014249i9112xt9pfs4w0/1wbb51226401239.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/11/t12264014249i9112xt9pfs4w0/1wbb51226401239.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/11/t12264014249i9112xt9pfs4w0/21m8m1226401239.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/11/t12264014249i9112xt9pfs4w0/21m8m1226401239.ps (open in new window)


 
Parameters (Session):
par1 = ward ; par2 = 10 ; par3 = FALSE ; par4 = FALSE ;
 
Parameters (R input):
par1 = ward ; par2 = 10 ; 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:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

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