Home » date » 2008 » Nov » 12 »

Hierarchical Clustering

*The author of this computation has been verified*
R Software Module: rwasp_hierarchicalclustering.wasp (opens new window with default values)
Title produced by software: Hierarchical Clustering
Date of computation: Wed, 12 Nov 2008 09:48:22 -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/12/t122650857501l7ybg1qp1t8rs.htm/, Retrieved Wed, 12 Nov 2008 16:49:37 +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/12/t122650857501l7ybg1qp1t8rs.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:
Hierarchical Clustering
 
Dataseries X:
» Textbox « » Textfile « » CSV «
218413 274452 45511 116222 213261 267700 43098 110924 204094 257841 39854 103753 201484 255124 35976 99983 194600 247377 26397 93302 191325 247823 21701 91496 211261 276919 41749 119321 226293 294271 58697 139261 219734 281758 60363 133739 214591 270434 54329 123913 205348 258848 47714 113438 203496 256674 44712 109416 208155 258882 42668 109406 205010 255060 40584 105645 200290 247698 38196 101328 198088 244779 33212 97686 195186 240901 25199 93093 191395 239933 21912 91382 213768 270247 44524 122257 225780 283893 58464 139183 230579 282348 61266 139887 229261 273570 55810 131822 216228 254756 48585 116805 216713 254354 45712 113706 220206 255843 43651 113012 220115 254490 41666 110452 218444 251995 39072 107005 214912 246339 33354 102841 210705 244019 26485 98173 209673 245953 23779 98181 237041 279806 54200 137277 242081 283111 64020 147579 241878 281097 67197 146571 242621 275964 60769 138920 238545 270694 54871 130340 240337 271901 51814 128140 244752 274412 49092 127059 244576 272433 45870 122860 241572 268361 42103 117702 240541 268586 35243 113537 236089 264768 27643 108366 236997 269974 26054 111078 264579 304744 58032 150739 270349 309365 66083 159129 269645 308347 69153 157928 267037 298427 61765 147768 258113 289231 55568 137507 262813 291975 54078 136919 267413 294912 52913 136151 267366 293488 51175 133001 264777 290555 45343 125554 258863 284736 37817 119647 254844 281818 30744 114158 254868 287854 28893 116193 277267 316263 60190 152803 285351 325412 69447 161761 286602 326011 71660 160942 283042 328282 64496 149470 276687 317480 58078 139208 277915 317539 53511 134588 277128 313737 50883 130322 277103 312276 48614 126611 275037 309391 45844 122401 270150 302950 41303 117352 267140 300316 31060 112135 264993 304035 27860 112879 287259 333476 57794 148729 291186 337698 66642 157230 292300 335932 70639 157221 288186 323931 64864 146681 281477 313927 58397 136524 282656 314485 54424 132111 280190 313218 44148 125326 280408 309664 42065 122716 276836 302963 38546 116615 275216 298989 35324 113719 274352 298423 26599 110737 271311 301631 24935 112093 289802 329765 51349 143565 290726 335083 58672 149946 292300 327616 61271 149147 278506 309119 53145 134339 269826 295916 46211 122683 265861 291413 40744 115614 269034 291542 41248 116566 264176 284678 39032 111272 255198 276475 35907 104609 253353 272566 33335 101802 246057 264981 23988 94542 235372 263290 23099 93051 258556 296806 46390 124129 260993 303598 51588 130374 254663 286994 51579 123946 250643 276427 45390 114971 243422 266424 39215 105531 247105 267153 38433 104919 248541 268381 37676 104782 245039 262522 36055 101281 237080 255542 32986 94545 237085 253158 30953 93248 225554 243803 23558 84031 226839 250741 22487 87486 247934 280445 43528 115867 248333 285257 47913 120327
 
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 time1 seconds
R Server'George Udny Yule' @ 72.249.76.132


Summary of Dendrogram
LabelHeight
12040.0730379082
22737.13938264020
33353.34012590432
43390.98496015538
53482.51058864148
63511.79654877671
73521.25559992455
83561.68232721561
93869.51276002548
103899.58946557198
114105.42458218392
124272.55883517126
134342.04583117221
144509.52791320777
154588.57581391002
164881.53961368747
174913.91666596006
185268.09880317368
195388.93264014313
205406.85731270948
215546.13207560008
225653.34431995788
235673.21601915527
245736.60395536759
255760.09887067922
265810.70099041415
276019.84991507263
286079.53147865853
296097.96490642575
306148.72059862863
316611.60752011188
326633.34742042055
336696.07508223436
347035.27014406696
357174.52332911393
367596.28157594977
377929.13204581687
387951.65309857013
398094.4679256885
408105.6316172101
418155.17322716971
428192.76229363455
438289.05199645894
448344.0269654406
458611.89158847037
468702.55574213547
479076.65821787021
489105.640439648
499148.86319252172
509578.5475934507
519992.40626676077
5210319.4150820456
5310684.8231763917
5410866.8975333349
5510956.3729399834
5612153.7560683856
5712302.8099895460
5812309.2000671544
5913031.3070888643
6013101.0956324425
6113151.5166309498
6213371.8349467577
6313436.5020999616
6413671.837445842
6514579.7099628461
6614807.0733248819
6716141.8417454025
6816179.5721638043
6917575.5777596794
7017824.0528494242
7118752.2205992266
7219192.0541297939
7320172.4254497739
7421675.7981141257
7521814.937479131
7623309.4593544805
7723454.2419272419
7824688.671306668
7926560.3487531581
8027247.2227288113
8127642.1500602986
8228761.0087476715
8331891.4484715602
8438788.6749427849
8541129.7592017329
8641374.1274867442
8743262.4372891776
8845256.1885169818
8947392.5158515471
9049591.4428462478
9154961.9804853927
9270526.2765159506
9379147.0212139397
94109277.653414856
95110844.613429732
96128687.106062930
97147392.282069404
98199749.255474574
99204196.659008121
100360153.132290764
101393127.82036405
102768496.473033851
1031899868.63011881
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/12/t122650857501l7ybg1qp1t8rs/19ey21226508500.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/12/t122650857501l7ybg1qp1t8rs/19ey21226508500.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/12/t122650857501l7ybg1qp1t8rs/2sejh1226508500.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/12/t122650857501l7ybg1qp1t8rs/2sejh1226508500.ps (open in new window)


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





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