Home » date » 2007 » Nov » 04 » attachments

workshop4.q2

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 03:44:37 -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/3atae8f8xd938cb1194172972.htm/, Retrieved Sun, 04 Nov 2007 11:42:53 +0100
 
User-defined keywords:
w4q2
 
Dataseries X:
» Textbox « » Textfile « » CSV «
48527,00 99,25 102,89 44446,00 99,36 102,16 46380,00 99,34 100,81 48950,00 99,36 101,02 38883,00 100,85 101,08 42928,00 100,86 100,49 37107,00 100,93 100,43 30186,00 101,25 99,42 32602,00 101,72 98,75 39892,00 101,54 98,79 32194,00 101,35 98,72 21629,00 101,42 96,54 59968,00 101,57 96,44 45694,00 101,76 96,25 55756,00 102,05 97,44 48554,00 102,05 101,86 41052,00 101,89 102,36 49822,00 102,06 101,21 39191,00 102 104,61 31994,00 102,14 107,43 35735,00 102,2 108,44 38930,00 102,3 109,45 33658,00 102,7 110,35 23849,00 102,77 115,02 58972,00 103,1 113,11 59249,00 103,13 116,5 63955,00 103,31 121,28 53785,00 103,52 119,05 52760,00 103,34 123,2 44795,00 103,53 128,41 37348,00 103,8 127,57 32370,00 103,9 125,56 32717,00 103,91 133,6 40974,00 104,21 130,8 33591,00 104,58 129,84 21124,00 104,89 123,94 58608,00 105,15 118,63 46865,00 105,24 121,83 51378,00 105,57 119,97 46235,00 105,62 124,98 47206,00 106,17 129,99 45382,00 106,27 126,6 41227,00 106,41 121,71 33795,00 106,94 119,28 31295,00 107,16 122,63 42625,00 107,32 116,74 33625,00 107,32 114,23 21538,00 107,35 113,23 56421,00 107,55 112,75 53152,00 107,87 113,54 53536,00 108,37 115,3 52408,00 108,38 121,05 41454,00 107,92 119,51 38271,00 108,03 116,78 35306,00 108,14 117,17 26414,00 108,3 117,5 31917,00 108,64 119,65 38030,00 108,66 120,97 27534,00 109,04 117,18 18387,00 109,03 116,87
 
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 time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001


Summary of Dendrogram
LabelHeight
127.1643313924713
233.5469640951309
347.7614844827922
460.3609675042601
578.2341255463369
683.0554995168893
792.7077181252996
8120.184518969791
9147.134724997194
10178.053048555760
11227.015682497928
12232.382202515709
13241.037244010132
14242.540339943689
15249.075460453253
16277.020744710572
17303.504191239594
18313.505123722085
19341.098886688303
20350.010644695272
21352.042645286051
22363.457785166856
23429.129929625050
24500.892044055015
25525.646751563829
26536.954672873069
27577.695982577813
28582.364426654918
29595.003703473336
30665.198952269169
311102.51319099662
321109.25859572960
331120.00029017853
341212.41104003337
351233.23843543065
361324.12475205046
371490.65910022794
381503.71551377410
391576.47450182663
401604.47088754512
412583.70752060753
423342.73706325841
433459.28095452653
443793.56634110817
454274.20630687746
464435.68462981944
474547.22920048615
485009.96593490017
497125.66442960371
508506.07891785602
5110493.2767348880
5212274.1859151566
5312783.3710570356
5416074.0455525330
5528395.0431023975
5665544.8540356123
5770574.1291738632
58152240.666069109
59299713.233585373
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/04/3atae8f8xd938cb1194172972/15bqf1194173071.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/04/3atae8f8xd938cb1194172972/15bqf1194173071.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