Home » date » 2008 » Nov » 11 »

Q2 Hierarchical Cluster centroid

*The author of this computation has been verified*
R Software Module: rwasp_hierarchicalclustering.wasp (opens new window with default values)
Title produced by software: Hierarchical Clustering
Date of computation: Tue, 11 Nov 2008 05:42:24 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Nov/11/t1226407387wnrgkz30iymr90r.htm/, Retrieved Tue, 11 Nov 2008 12:43:10 +0000
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2008/Nov/11/t1226407387wnrgkz30iymr90r.htm/},
    year = {2008},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2008},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
 
Feedback Forum:

Post a new message
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
604.4 882.5 1.1663 883.9 789.6 1.1372 527.9 773.3 1.1139 756.2 804.3 1.1222 812.9 817.8 1.1692 655.6 836.7 1.1702 707.6 721.8 1.2286 612.6 760.8 1.2613 659.2 841.4 1.2646 833.4 1045.6 1.2262 727.8 949.2 1.1985 797.2 850.1 1.2007 753 957.4 1.2138 762 851.8 1.2266 613.7 913.9 1.2176 759.2 888 1.2218 816.4 973.8 1.249 736.8 927.6 1.2991 680.1 833 1.3408 736.5 879.5 1.3119 637.2 797.3 1.3014 801.9 834.5 1.3201 772.3 735.1 1.2938 897.3 835 1.2694 792.1 892.8 1.2165 826.8 697.2 1.2037 666.8 821.1 1.2292 906.6 732.7 1.2256 871.4 797.6 1.2015 891 866.3 1.1786 739.2 826.3 1.1856 833.6 778.6 1.2103 715.6 779.2 1.1938 871.6 951 1.202 751.6 692.3 1.2271 1005.5 841.4 1.277 681.2 857.3 1.265 837.3 760.7 1.2684 674.7 841.2 1.2811 806.3 810.3 1.2727 860.2 1007.4 1.2611 689.8 931.3 1.2881 691.6 931.2 1.3213 682.6 855.8 1.2999 800.1 858.4 1.3074 1023.7 925.9 1.3242 733.5 930.7 1.3516 875.3 1037.6 1.3511 770.2 979.2 1.3419 1005.7 942.6 1.3716 982.3 843.9 1.3622 742.9 854.3 1.3896 974.2 1029.8 1.4227 822.3 944 1.4684 773.2 856.4 1.457 750.9 1059.4 1.4718 708 959.3 1.4748 690 941.5 1.5527 652.8 1026.4 1.575 620.7 921.3 1.5557 461.9 968 1.5553
 
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 computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Summary of Dendrogram
LabelHeight
11.80308131818846
22.05212524227931
34.52799693573216
45.92105660841032
58.79268928656069
69.8185316667005
79.86497499333924
89.9910315908819
910.1918747838658
1012.1100406341185
1114.8409613735095
1216.6720934716398
1313.9455400924276
1417.9322095892379
1518.2784948945475
1620.2336864510857
1720.2475127913014
1821.7906734679589
1923.3344650472215
2024.2393918655151
2122.9664634207166
2224.5538641920167
2325.9066729001500
2427.4524232110926
2527.802949835584
2627.9228376478616
2730.3792385743948
2830.4265848772930
2931.9278600072100
3033.764746408051
3134.8694910059617
3235.1847817083457
3333.2031894736463
3436.2190928412619
3537.3892606225412
3641.4384160488352
3744.01603807716
3847.1007903924404
3947.5429747585277
4047.6277263469206
4156.0589318786881
4251.8247285179261
4356.1081259386758
4457.5487201628266
4558.1639640483043
4663.6302895817845
4769.4294395977429
4869.9357240687218
4973.6797515509036
5078.4136117040874
5173.3409358078691
5283.261006124305
5385.8122119330761
5499.0717186866896
55119.414421371741
56132.596290934069
57136.764597784449
58158.593708820565
59196.275396687675
60250.974835219667


Summary of Cut Dendrogram
LabelHeight
168.8546603422424
269.990417748164
375.403860283591
477.200206676019
577.4372354901938
682.9412628535292
785.5003767144071
893.9318944815338
995.458324162946
1083.3326010356322
1196.249213501712
1296.688738976208
1385.2418915279084
14110.969582648161
15122.498478591284
16139.531976029017
17163.538983954018
18198.632777335735
19253.446789655910
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/11/t1226407387wnrgkz30iymr90r/159mq1226407342.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/11/t1226407387wnrgkz30iymr90r/159mq1226407342.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/11/t1226407387wnrgkz30iymr90r/25a761226407342.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/11/t1226407387wnrgkz30iymr90r/25a761226407342.ps (open in new window)


 
Parameters (Session):
par1 = centroid ; par2 = 20 ; par3 = FALSE ; par4 = FALSE ;
 
Parameters (R input):
par1 = centroid ; 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:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

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