Home » date » 2007 » Nov » 05 » attachments

Hierarchical Clustering 2-3-4

R Software Module: rwasp_hierarchicalclustering.wasp (opens new window with default values)
Title produced by software: Hierarchical Clustering
Date of computation: Mon, 05 Nov 2007 11:50:42 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2007/Nov/05/58h8jvh66klfv1z1194288577.htm/, Retrieved Mon, 05 Nov 2007 19:49:37 +0100
 
User-defined keywords:
Taak4.2G19
 
Dataseries X:
» Textbox « » Textfile « » CSV «
106,22 103,7 107,97 106,31 103,75 108,13 107,38 103,85 108,54 109,31 104,02 109,86 110,82 104,13 109,75 111,22 104,17 109,99 110,66 104,18 112,01 110,76 104,2 111,96 110,69 104,5 111,41 111,08 104,78 112,11 110,97 104,88 111,67 110,24 104,89 111,95 112,51 104,9 112,31 111,52 104,95 113,26 112,13 105,24 113,5 112,23 105,35 114,43 112,92 105,44 115,02 111,89 105,46 115,1 111,99 105,47 117,11 111,51 105,48 117,52 112,33 105,75 116,1 112,04 106,1 116,39 112,09 106,19 116,01 111,41 106,23 116,74 112,61 106,24 116,68 113,14 106,25 117,45 113,65 106,35 117,8 114,26 106,48 119,37 114,4 106,52 118,9 114,93 106,55 119,05 114,86 106,55 120,46 114,95 106,56 120,99 116,17 106,89 119,86 114,6 107,09 120,18 114,62 107,24 119,81 113,82 107,28 120,15 115,02 107,3 119,8 115,18 107,31 120,27 115,59 107,47 120,71 116,6 107,35 121,87 117,07 107,31 121,87 116,96 107,32 121,92 116,66 107,32 123,72 116,07 107,34 124,38 116,04 107,53 123,21 115,81 107,72 123,17 116,22 107,75 122,95 115,85 107,79 123,46 116,43 107,81 123,24 117,39 107,9 123,86 119,17 107,8 124,28 119,24 107,86 124,78 120,03 107,8 125,19 119,34 107,74 125,46 118,49 107,75 127,6 118,59 107,83 127,8 117,5 107,8 126,63 117,56 107,81 127,06 118,25 107,86 126,77 118,01 107,83 127,05
 
Text written by user:
 
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 compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001


Summary of Dendrogram
LabelHeight
10.113578166916017
20.121243556529819
30.190262975904402
40.237486841740764
50.300998338865841
60.363042697213426
70.369999999999998
80.372117007763818
90.393700393700587
100.399749921826135
110.434281015012176
120.464435140789321
130.468187996428788
140.4920365840057
150.496588360717408
160.508428952755446
170.517179285942752
180.537680202350804
190.567687272051333
200.626578007912822
210.631347764706574
220.700935878845686
230.716798437498292
240.733613420050094
250.743370701601829
260.759341820262776
270.770328591422721
280.798895748926185
290.885494212290515
300.911540072305766
310.915276492748528
320.916414357507572
331.04395304116301
341.18122817440154
351.19743498929958
361.21652832783331
371.35021460344662
381.38973514447811
391.39187857104455
401.53948868551752
411.57082614490305
421.902420550976
432.13612302239588
442.25982880903068
452.28316981868216
462.43846239797042
472.51823609763752
483.71718033650766
493.92449085428042
505.76489248090338
516.07779028539958
527.58240655780845
539.72772979470928
5411.6747725340286
5518.5817510902330
5628.4375788186346
5743.9701927653905
5862.5409338314192
59212.445235199112
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/05/58h8jvh66klfv1z1194288577/1gbjk1194288636.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/05/58h8jvh66klfv1z1194288577/1gbjk1194288636.ps (open in new window)


 
Parameters:
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:

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