Home » date » 2008 » Nov » 11 »

Various EDA topics 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 09:08:25 -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/t1226419853c2v1uh4cw7xpjea.htm/, Retrieved Tue, 11 Nov 2008 16:10:55 +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/t1226419853c2v1uh4cw7xpjea.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 «
10030 17471 46737 9536 14968 44737 9953 15449 47557 9775 17582 51261 9843 18501 55457 9461 17291 56659 9230 16465 58609 8956 17109 59382 9608 18438 61773 9482 16944 63957 9962 16362 68596 9766 16965 72177 10312 18937 75406 10032 17842 76166 10411 16187 79315 10438 17655 81498 10803 19194 83580 10365 18400 84371 10488 17436 87196 9698 19526 88097 10087 21304 89233 9769 18947 89191 10381 18786 91690 10117 24304 91379 10775 23724 93150 10735 23823 93809 11601 21433 95112 10749 23900 92812 11227 25432 91524 10904 23619 89082 11418 23761 89984 10429 23844 87307 10755 26374 87683 9566 24406 87339 6849 24752 94868 7210 26005 97006 8472 27758 97832 9334 25534 97888 9523 26415 107411 9622 28217 115751 10215 29101 118399 10752 27715 119545 11766 27622 125345 11816 29065 129831 12730 31450 132645 13481 29571 132924 14905 30996 140225 14571 30937 143589 15308 34106 146909 15870 32851 145038 15950 36114 148559 16350 34383 152418 17086 38077 153209 17668 35638 149805 17947 35254 150299 18322 36683 144756 18696 38977 144677 18772 34951 140757 18947 34177 141650 19142 35299 142721 19724 36419 140737
 
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 time2 seconds
R Server'George Udny Yule' @ 72.249.76.132


Summary of Dendrogram
LabelHeight
1381.963349027102
2685.078827581177
3984.45300756894
41030.35770487729
51042.75644327906
61047.83777370354
71194.63383511434
81203.31251136187
91239.80562992753
101361.99302494543
111589.18501125577
121747.80662545946
131876.88065683463
141996.41139417579
152042.66566035658
162183.30323134465
172312.55897222103
182321.96253199745
192325.62959217499
202384.77889459779
212524.06640394062
222602.87131068334
232630.82534578029
242649.10701935577
252925.45518438226
263078.18407034937
273360.71610336212
283381.05501286211
293604.04649999277
303636.69987763632
313740.80859651593
323848.76772486987
333937.27458753022
344218.59312937512
354296.63386953788
364333.37517020345
374389.74735884419
385087.60034505388
395694.05178249901
406250.94947429363
416535.37853754534
427152.84199664938
437241.98876426081
448403.77277062499
458946.14232287838
468959.79275179331
4710295.3641863892
4814611.9006392637
4915135.1250153876
5017028.593739249
5119912.6814372188
5225063.7363629172
5332974.7532542658
5434760.3689674837
5541436.2510944457
5643240.5333768405
57108357.992610779
58175570.598185376
59367277.458317044
601247153.48002657
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/11/t1226419853c2v1uh4cw7xpjea/1ikby1226419703.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/11/t1226419853c2v1uh4cw7xpjea/1ikby1226419703.ps (open in new window)


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