Home » date » 2008 » Nov » 11 »

Various EDA topics Q2 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: Tue, 11 Nov 2008 14:40:31 -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/t1226439988fu0gbj0xyez3sjh.htm/, Retrieved Tue, 11 Nov 2008 21:46:31 +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/t1226439988fu0gbj0xyez3sjh.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 «
0,9554 24,67 692,4 935,9 0,9922 25,59 877,3 937,1 0,9778 26,09 536,8 885,1 0,9808 28,37 705,9 892,4 0,9811 27,34 951 987,3 1,0014 24,46 755,7 946,3 1,0183 27,46 695,5 799,6 1,0622 30,23 744,8 875,4 1,0773 32,33 672,1 846,2 1,0807 29,87 666,6 880,6 1,0848 24,87 760,8 885,7 1,1582 25,48 756 868,9 1,1663 27,28 604,4 882,5 1,1372 28,24 883,9 789,6 1,1139 29,58 527,9 773,3 1,1222 26,95 756,2 804,3 1,1692 29,08 812,9 817,8 1,1702 28,76 655,6 836,7 1,2286 29,59 707,6 721,8 1,2613 30,7 612,6 760,8 1,2646 30,52 659,2 841,4 1,2262 32,67 833,4 1045,6 1,1985 33,19 727,8 949,2 1,2007 37,13 797,2 850,1 1,2138 35,54 753 957,4 1,2266 37,75 762 851,8 1,2176 41,84 613,7 913,9 1,2218 42,94 759,2 888 1,249 49,14 816,4 973,8 1,2991 44,61 736,8 927,6 1,3408 40,22 680,1 833 1,3119 44,23 736,5 879,5 1,3014 45,85 637,2 797,3 1,3201 53,38 801,9 834,5 1,2938 53,26 772,3 735,1 1,2694 51,8 897,3 835 1,2165 55,3 792,1 892,8 1,2037 57,81 826,8 697,2 1,2292 63,96 666,8 821,1 1,2256 63,77 906,6 732,7 1,2015 59,15 871,4 797,6 1,1786 56,12 891 866,3 1,1856 57,42 739,2 826,3 1,2103 63,52 833,6 778,6 1,1938 61,71 715,6 779,2 1,202 63,01 871,6 951 1,2271 68,18 751,6 692,3 1,277 72,03 1005,5 841,4 1,265 69,75 681,2 857,3 1,2684 74,41 837,3 760,7 1,2811 74,33 674,7 841,2 1,2727 64,24 806,3 810,3 1,2611 60,03 860,2 1007,4 1,2881 59,44 689,8 931,3 1,3213 62,5 691,6 931,2 1,2999 55,04 682,6 855,8 1,3074 58,34 800,1 858,4 1,3242 61,92 1023,7 925,9 1,3516 67,65 733,5 930,7 1,3511 67,68 875,3 1035,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 time6 seconds
R Server'George Udny Yule' @ 72.249.76.132


Summary of Dendrogram
LabelHeight
13.55171820954313
26.17709570591225
313.7935389222636
414.8524515824829
515.9157630593070
617.3367105371810
718.2864340154115
821.2766415491261
922.9603023693069
1023.4807230776652
1123.9574538215146
1224.0045540826685
1325.9627080484148
1430.0276753325311
1530.7832487194193
1632.0165090265730
1732.2187933454994
1832.890433259536
1934.2882229707228
2035.8391717494978
2136.5519672828974
2239.458846675999
2340.3236954660656
2441.0608083214395
2541.5701628558574
2644.6459774251836
2746.550339504777
2847.0502774624601
2947.6839422844619
3049.8291164771161
3157.1560355122889
3259.1914385034771
3362.1049710606072
3467.585094195181
3573.8606206536125
3677.3688948868007
3785.100152938341
3887.0270321672525
3988.9028936480832
4091.3446041737952
4191.6832849378526
4291.8087119513412
43101.294456752149
44116.953571840468
45117.380751476042
46130.837304667685
47153.776557144992
48178.934442089598
49197.193712755989
50222.386740868386
51248.853392374073
52250.403232666647
53337.357806169321
54405.499956474029
55415.674685492056
56672.162794595362
571033.24025008977
581295.31024441925
591982.58651477763
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/11/t1226439988fu0gbj0xyez3sjh/1n72l1226439624.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/11/t1226439988fu0gbj0xyez3sjh/1n72l1226439624.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/11/t1226439988fu0gbj0xyez3sjh/2ny0k1226439624.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/11/t1226439988fu0gbj0xyez3sjh/2ny0k1226439624.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