Home » date » 2008 » Nov » 11 »

Hierarchial 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:46:15 -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/t1226404024sgxjfgdhjemj1j4.htm/, Retrieved Tue, 11 Nov 2008 11:47:06 +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/t1226404024sgxjfgdhjemj1j4.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 «
3353 2341 820 3480 2540 829 3098 2371 677 2944 2122 720 3389 2301 846 3497 2512 842 4404 3145 1137 3849 2741 961 3734 2548 1008 3060 1987 872 3507 2281 1094 3287 2016 905 3215 2434 622 3764 2637 1068 2734 1831 760 2837 1851 809 2766 1839 838 3851 2609 1008 3289 2417 838 3848 2394 1057 3348 2372 904 3682 2717 803 4058 2998 810 3655 2538 992 3811 3007 667 3341 2475 803 3032 2175 611 3475 2465 712 3353 2279 785 3186 2323 599 3902 2746 1008 4164 2601 1136 3499 2486 931 4145 2718 1051 3796 2646 956 3711 2551 1006 3949 2712 1077 3740 2606 772 3243 2365 679 4407 3533 787 4814 3509 1011 3908 2912 701 5250 3599 1269 3937 2719 1007 4004 2869 1013 5560 4085 1209 3922 2686 1036 3759 2545 1084 4138 3071 926 4634 3388 1083 3996 2652 912 4308 3190 910 4142 2884 886 4429 3295 948 5219 3818 1134 4929 3226 1226 5754 3953 1515 5592 3810 1491 4163 2877 1086 4962 3515 1274 5208 3708 1164 4755 3450 1205 4491 3360 966 5732 4110 1462 5730 4384 1134 5024 3729 1141 6056 4263 1676 4901 3505 1166 5353 3674 1492 5578 3911 1413 4618 2951 1287 4724 3317 1206 5011 3417 1054 5298 3498 1236 4143 2768 1069 4617 2899 1264 4727 3171 1318 4207 3004 1093 5112 3481 1495 4190 3016 1121 4098 2595 1342 5071 3509 1335 4177 2833 1261 4598 3125 1317 3757 2556 867 5591 3628 1428 4218 2876 1199 3780 2575 961 4336 2903 1195 4870 3438 1225 4422 2926 1282 4727 3068 1629 4459 3015 1187
 
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'Gwilym Jenkins' @ 72.249.127.135


Summary of Dendrogram
LabelHeight
123.2808934536456
234.8855270850248
335.2420203734122
444.2153819388683
553.1789432012333
655.5517776493246
756.8682688324517
859.7662111899357
972.9520390393579
1076.988354008998
1177.6273147803014
1285.3990632267123
1385.8338135114737
1485.871997764114
1588.6654351002264
1691.6133178091483
1792.9719001994933
1893.5147047260483
1993.7763296360014
2094.503968170654
21107.783705628348
22108.692226032960
23114.546933612384
24116.593310271216
25117.968016753831
26124.474897067642
27125.051989188497
28128.057582146383
29128.378347083922
30134.023015459321
31136.568664048529
32136.959848130757
33139.964281157730
34141.044405555545
35149.749791318719
36149.779838429610
37155.046678626832
38158.697826072067
39166.216797758617
40167.158607316524
41175.642769989114
42181.756043410132
43182.867764361090
44188.349569273579
45209.349833666897
46212.799322669716
47216.397781874029
48221.634834807167
49228.109607413265
50229.205491884870
51231.212023908792
52246.908396571442
53248.284132121602
54249.501861474344
55249.882001457286
56250.710988989314
57254.361639239078
58274.448595172597
59312.518824146589
60340.427051342389
61345.351779461579
62352.031248612960
63354.199001997207
64378.879457962028
65446.412249894587
66453.265016963276
67457.334811526605
68460.97151000868
69468.863270036627
70472.241496012986
71500.110984397777
72530.355730381399
73574.234755358809
74594.359847103577
75616.383497276565
76625.841872476899
77688.830582889928
78727.292150693475
79926.397141766468
80980.61940495497
811040.37411816354
821184.53472146746
831513.01882167306
841638.20661276384
851698.51098952335
862385.33771560195
872950.71689950773
883312.60326291917
893506.53851819069
9010607.6112309635
9114067.4124884189
9244632.7946593864


Summary of Cut Dendrogram
LabelHeight
1884.784741633031
22045.25595193922
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/11/t1226404024sgxjfgdhjemj1j4/1ejuw1226403973.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/11/t1226404024sgxjfgdhjemj1j4/1ejuw1226403973.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/11/t1226404024sgxjfgdhjemj1j4/2hjvc1226403973.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/11/t1226404024sgxjfgdhjemj1j4/2hjvc1226403973.ps (open in new window)


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