Home » date » 2007 » Nov » 03 » attachments

Hierarchical Clustering

R Software Module: rwasp_hierarchicalclustering.wasp (opens new window with default values)
Title produced by software: Hierarchical Clustering
Date of computation: Sat, 03 Nov 2007 05:27:59 -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/03/r5smlq7hdegnclk1194092814.htm/, Retrieved Sat, 03 Nov 2007 13:26:54 +0100
 
User-defined keywords:
G29 WS6 Q2
 
Dataseries X:
» Textbox « » Textfile « » CSV «
174,1 145,3 145,9 180,4 143,6 158,5 182,6 142,8 152,2 207,1 155,9 153,7 213,7 156,2 157,9 186,5 149,8 154,4 179,1 152,7 150,7 168,3 155,5 151,2 156,5 159,3 147,3 144,3 143 146,6 138,9 141,4 145,2 137,8 142,8 139,3 136,3 146,4 145,7 140,3 152,3 163,3 149,1 164,3 181,8 149,2 168 188,1 140,4 171,3 222,9 129 162,7 206,3 124,7 150,2 184,9 130,8 142,5 183,6 130,1 138,2 186,6 133,2 138 176,5 130,1 145,1 173,9 126,6 138,4 184,9 124,8 131,8 182,5 125,3 130,8 183,6 126,9 126,3 172,4 120,1 123 168,9 118,7 124 163,3 117,7 120,8 152,4 113,4 122,1 145,8 107,5 106,5 148,6 107,6 104,3 143,4 114,3 108,7 141,2 114,9 113,8 144,6 111,2 112,5 144,5 109,9 106,1 140,8 108,6 98,4 133,3 109,2 96 127,3 106,4 99,3 119,6 103,7 97,5 120,2 103 95,3 121,9 96,9 88 112,4 104,7 94,7 111 102,2 99,4 107,8 99 98,9 110,5 95,8 96,4 118,3 94,5 95,3 123 102,7 99,5 112,1 103,2 101,6 104,2 105,6 103,9 102,4 103,9 106,6 100,3 107,2 108,3 102,6 100,7 102 101,5 92,1 93,8 103,4 90,3 91,6 99,4 93,4 97,7 97,9 98,5 94,8 98 100,8 98 90,2 102,3 103,8 87,1 104,7 97,8 91,8 101,1 91,2 94,8 101,4 89,3 91,8 99,5 87,5 89,3 98,4 90,4 91,7 96,3 94,2 86,2 100,7 102,2 82,8 101,2 101,3 82,3 100,3 96 79,8 97,8 90,8 79,4 97,4 93,2 85,3 98,6 90,9 87,5 99,7 91,1 88,3 99 90,2 88,6 98,1 94,3 94,9 97 96 94,7 98,5 99 92,6 103,8 103,3 91,8 114,4 113,1 96,4 124,5 112,8 96,4 134,2 112,1 107,1 131,8 107,4 111,9 125,6 111 107,8 119,9 110,5 109,2 114,9 110,8 115,3 115,5 112,4 119,2 112,5 111,5 107,8 111,4 116,2 106,8 115,3 122,5 104,2 110,8 121,3 94,8 103,7 113,9 97,5 111,1 110,7 98,3 113 120,8 100,6 111,2 141,1 94,9 117,6 147,4 93,6 121,7 148 98 127,3 158,1 104,3 129,8 165 103,9 137,1 187 105,3 141,4 190,3 102,6 137,4 182,4 103,3 130,7 168,8 107,9 117,2 151,2 107,8 110,8 120,1 109,8 111,4 112,5 110,6 108,2 106,2 110,8 108,8 107,1 119,3 110,2 108,5 128,1 109,5 106,5 127,6 109,5 108,3 137,9 116 125,6 151,4 111,2 124 143,6 112,1 127,2 143,4 114 136,9 141,9 119,1 135,8 135,2 114,1 124,3 133,1 115,1 115,4 129,6 115,4 113,6 134,1 110,8 114,4 136,8 116 118,4 143,5 119,2 117 162,5 126,5 116,5 163,1 127,8 115,4 157,2 131,3 113,6 158,8 140,3 117,4 155,4 137,3 116,9 148,5 143 116,4 154,2 134,5 111,1 153,3 139,9 110,2 149,4 159,3 118,9 147,9 170,4 131,8 156 175 130,6 163 175,8 138,3 159,1 180,9 148,4 159,5 180,3 148,7 157,3 169,6 144,3 156,4 172,3 152,5 156,6 184,8 162,9 162,4 177,7 167,2 166,8 184,6 166,5 162,6 211,4 185,6 168,1
 
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 time4 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001


Summary of Dendrogram
LabelHeight
11.14455231422596
21.17898261225515
31.43273304803851
41.56843871413581
51.73781471969828
62.03469899493758
72.17715410570773
82.29999999999999
92.86705423736629
103.11929479209644
113.17017349682947
123.19687347262916
133.33016516106934
143.47131099154195
153.61109401705355
163.66196668472012
173.70135110466435
183.81968585095685
193.89615194775563
203.92300904918661
213.96179319205448
223.97764365280496
234.07553677446297
244.24852915724963
254.25793377120876
264.33932824010154
274.50111097397076
284.59782557302907
294.76215199483011
304.8559242168716
314.90713765855412
324.95681349255749
334.95883050728698
344.99899989998
355.02493781056044
365.0653098891198
375.07346035758632
385.18941229813165
395.49577088533329
405.59016994374948
415.64712316139819
425.65773806392625
435.7835974963685
445.85832740635072
455.89067059000925
465.90004417237779
476.01247840984681
486.04400529450464
496.08938875708563
506.23546122291543
516.4899922958352
526.72160695072243
537.13372273080472
547.20840373495952
557.21905820820651
567.25003538977605
577.3068461048526
587.34166193719106
597.35934779718964
607.60750765685159
617.82879301041994
627.94303890716054
638.17190308312573
648.28378282272124
658.3096329642169
668.46167832052247
678.49176071259666
688.56854713472477
698.76811608167752
708.94027231722047
718.95907003691933
729.01435076844947
739.38172911719515
749.60993482256816
759.66912552522145
769.95914668057293
7710.1390334845092
7810.4647687046463
7910.8966634450131
8011.0727053555971
8111.0915988814809
8211.5814930954821
8311.9092326084752
8412.2212286965729
8512.4736454595802
8612.6404521746929
8712.6621043219326
8812.9626341028559
8913.1840651351
9013.9444154947607
9114.4740586190956
9214.7058405992207
9314.7779287550726
9414.9166090336643
9514.9618410211285
9615.0318254547874
9715.8249731895689
9816.4890594429390
9917.024118876666
10017.9121705667380
10117.9835839845693
10218.9031495568518
10319.8604681058242
10420.811925822747
10521.8970317623188
10623.2177616452124
10723.8209991394148
10824.8676523423354
10927.8402089145275
11028.5278851132905
11128.5964907857572
11230.8721712782153
11331.1026270264149
11434.3774955511376
11537.3135189299651
11640.0516505373312
11740.383561551453
11845.7672769399603
11945.8922304375039
12048.9701837471502
12152.5342637634169
12253.934612395509
12354.4323366256357
12454.6189226694044
12561.3221422326661
12666.3874579852863
12777.2738543924884
12886.9961096883478
129109.526485681624
130113.42315509366
131128.123558863818
132136.777663930629
133173.816295962689
134179.665006656928
135310.314633714461
136389.496792834579
137571.56692304167
138713.173595183273
1391081.20638882844
1402628.14586615085
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/03/r5smlq7hdegnclk1194092814/1e7zq1194092872.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/03/r5smlq7hdegnclk1194092814/1e7zq1194092872.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