Home » date » 2007 » Nov » 04 » attachments

R Software Module: rwasp_hierarchicalclustering.wasp (opens new window with default values)
Title produced by software: Hierarchical Clustering
Date of computation: Sun, 04 Nov 2007 07:01:13 -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/04/41boazvkvq126tn1194184837.htm/, Retrieved Sun, 04 Nov 2007 15:00:37 +0100
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
106,9 108,8 85,3 112,6 113,2 73,8 101,7 105,5 55,2 92 77,8 54,4 97,4 102,1 80,8 97 97 88 105,4 95,5 74,5 102,7 99,3 55,1 98,1 86,4 47,2 104,5 92,4 54,2 87,4 85,7 70,6 89,9 61,9 78,5 109,8 104,9 77,1 111,7 107,9 56,6 98,6 95,6 39,8 96,9 79,8 44,1 95,1 94,8 66,9 97 93,7 75,3 112,7 108,1 74,9 102,9 96,9 48,8 97,4 88,8 37 111,4 106,7 49,8 87,4 86,8 63,2 96,8 69,8 75,9 114,1 110,9 68,5 110,3 105,4 49,2 103,9 99,2 40,3 101,6 84,4 38,6 94,6 87,2 54,2 95,9 91,9 70,6 104,7 97,9 68 102,8 94,5 43 98,1 85 42,3 113,9 100,3 47,7 80,9 78,7 57,7 95,7 65,8 75,8 113,2 104,8 57,2 105,9 96 43,6 108,8 103,3 40 102,3 82,9 35,9 99 91,4 59,5 100,7 94,5 72,7 115,5 109,3 70,9 100,7 92,1 44,9 109,9 99,3 44,5 114,6 109,6 48 85,4 87,5 60,4 100,5 73,1 71,8 114,8 110,7 63,2 116,5 111,6 32,4 112,9 110,7 33,9 102 84 24,2 106 101,6 64,7 105,3 102,1 73 118,8 113,9 61,7 106,1 99 31,9 109,3 100,4 30,8 114,3 111,1 34,1 91,9 93 47,4 104,4 74,1 53
 
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
11.46969384566990
21.80554700852678
33.16701752442263
43.20624390837629
53.49571165858971
63.49571165858971
73.51140997321589
83.66196668472011
94.06169444984537
104.14969878424928
114.59238500128201
124.76864760702653
134.84664832642104
145.09607692249637
155.12542681149579
165.21919534027996
175.33760245803301
185.72867451801992
196.28092349897688
206.39609255717894
216.6035591267608
226.68364690460908
236.76904720030817
246.98258039308016
257.150131407602
267.45117440407886
277.7032460690283
288.83232698670062
299.19480033803757
309.31167115850094
319.33648756224738
3210.7652985421463
3310.8496924363278
3411.6150764095636
3512.0146996598101
3612.1628560934349
3714.1909225836989
3814.4335409210157
3914.8699992327721
4015.3306325371399
4115.7914425461982
4217.1340456432715
4320.0249229501805
4420.5786156526313
4522.3559430492974
4623.0982733592233
4724.9257482540461
4825.8304253430201
4926.2513135468415
5041.0258515295429
5141.5887996530487
5259.8927614963974
5360.5214276476266
5469.0660013096672
5584.3802701364584
56100.611495174208
57142.803923725819
58258.625290232214
59310.867437604433
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/04/41boazvkvq126tn1194184837/1n8u21194184867.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/04/41boazvkvq126tn1194184837/1n8u21194184867.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