Home » date » 2007 » Nov » 01 » attachments

Hierarchical Clustering

R Software Module: rwasp_hierarchicalclustering.wasp (opens new window with default values)
Title produced by software: Hierarchical Clustering
Date of computation: Thu, 01 Nov 2007 15:18:58 -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/01/mvuz0biud7rguyv1193955540.htm/, Retrieved Thu, 01 Nov 2007 23:19:02 +0100
 
User-defined keywords:
W6Q2G7
 
Dataseries X:
» Textbox « » Textfile « » CSV «
-4 -13 23 5 15 -14 -25 43 2 9 -18 -26 60 3 10 -8 -9 36 3 9 -1 1 28 7 14 1 3 23 8 18 2 6 23 7 18 0 2 22 7 12 1 5 22 6 16 0 5 24 6 12 -1 0 32 7 19 -3 -5 27 5 13 -3 -4 27 5 12 -3 -2 27 5 13 -4 -1 29 4 11 -8 -8 38 4 10 -9 -16 40 4 16 -13 -19 45 1 12 -18 -28 50 -1 6 -11 -11 43 3 8 -9 -4 44 4 6 -10 -9 44 3 8 -13 -12 49 2 8 -11 -10 42 1 9 -5 -2 36 4 13 -15 -13 57 3 8 -6 0 42 5 11 -6 0 39 6 8 -3 4 33 6 10 -1 7 32 6 15 -3 5 34 6 12 -4 2 37 6 13 -6 -2 38 5 12 0 6 28 6 15 -4 -3 31 5 13 -2 1 28 6 13 -2 0 30 5 16 -6 -7 39 7 14 -7 -6 38 4 12 -6 -4 39 5 15 -6 -4 38 6 14 -3 -2 37 6 19 -2 2 32 5 16 -5 -5 32 3 16 -11 -15 44 2 11 -11 -16 43 3 13 -11 -18 42 3 12 -10 -13 38 2 11 -14 -23 37 0 6 -8 -10 35 4 9 -9 -10 37 4 6 -5 -6 33 5 15 -1 -3 24 6 17 -2 -4 24 6 13 -5 -7 31 5 12 -4 -7 25 5 13 -6 -7 28 3 10 -2 -3 24 5 14 -2 0 25 5 13 -2 -5 16 5 10 -2 -3 17 3 11 2 3 11 6 12 1 2 12 6 7 -8 -7 39 4 11 -1 -1 19 6 9 1 0 14 5 13 -1 -3 15 4 12 2 4 7 5 5 2 2 12 5 13 1 3 12 4 11 -1 0 14 3 8 -2 -10 9 2 8 -2 -10 8 3 8
 
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 time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Summary of Dendrogram
LabelHeight
11.41421356237310
21.41421356237310
31.73205080756888
41.73205080756888
51.73205080756888
61.73205080756888
71.73205080756888
82
92.44948974278318
102.44948974278318
112.44948974278318
122.64575131106459
132.64575131106459
142.64575131106459
152.75598306414371
162.82842712474619
172.82842712474619
182.86100174808612
193
203.15842082001893
213.43735119666099
223.52932652392028
233.60555127546399
243.67197500229753
253.74165738677394
264.11058437668058
274.12817118222994
284.24264068711928
294.24264068711928
304.32078883896900
314.35889894354067
324.46216004912683
334.69041575982343
344.69735775401603
354.71404520791032
365.20378727073248
375.36973991845185
385.4422477517359
396.34246488731393
406.557438524302
417.28010988928052
427.99503323577394
438.0934356069449
448.1240005248604
458.36660026534076
468.57291944917215
478.59883397085114
488.7112889015209
499.1594813516547
509.7444478418706
519.83473712562506
529.95199926939705
5310.2025910186703
5411.6619037896906
5512.5701608357731
5612.9974590053013
5713.3811992172593
5813.9680611411551
5918.5584895479340
6020.7134820431251
6121.2742848167559
6222.2306587588773
6323.3385990240928
6431.1517969724412
6531.651398086086
6633.4133427299524
6737.2763710262088
6843.1062306335928
6957.3327692222048
70120.843069244248
71162.959848845757
72418.962432710802


Summary of Cut Dendrogram
LabelHeight
14.76823983363999
25.68484828293597
35.79151678463135
46.29704516243752
56.80685928555405
67.14336550730136
79.01322474234479
810.1310852769528
911.1679910234245
1011.6619037896906
1111.8768416952448
1213.5334404471100
1314.2969381082885
1415.2126853988113
1516.8677692043426
1625.3718259608125
1741.6786157471328
1871.023820651262
19118.571611228269
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/01/mvuz0biud7rguyv1193955540/1cc5q1193955535.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/01/mvuz0biud7rguyv1193955540/1cc5q1193955535.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/01/mvuz0biud7rguyv1193955540/2vhf21193955535.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/01/mvuz0biud7rguyv1193955540/2vhf21193955535.ps (open in new window)


 
Parameters:
par1 = ward ; par2 = 20 ; 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