Home » date » 2010 » Dec » 13 »

WS10 - Correlation Matrix

*The author of this computation has been verified*
R Software Module: Patrick.Wessa/rwasp_pairs.wasp (opens new window with default values)
Title produced by software: Kendall tau Correlation Matrix
Date of computation: Mon, 13 Dec 2010 10:08:55 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/13/t1292236320dq6nuaoonjk02zt.htm/, Retrieved Mon, 13 Dec 2010 11:32:02 +0100
 
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/2010/Dec/13/t1292236320dq6nuaoonjk02zt.htm/},
    year = {2010},
}
@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 = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
25.94 23688100 39.18 3940.35 0,0274 144.7 5,45 28.66 13741000 35.78 4696.69 0,0322 140.8 5,73 33.95 14143500 42.54 4572.83 0,0376 137.1 5,85 31.01 16763800 27.92 3860.66 0,0307 137.7 6,02 21.00 16634600 25.05 3400.91 0,0319 144.7 6,27 26.19 13693300 32.03 3966.11 0,0373 139.2 6,53 25.41 10545800 27.95 3766.99 0,0366 143.0 6,54 30.47 9409900 27.95 4206.35 0,0341 140.8 6,5 12.88 39182200 24.15 3672.82 0,0345 142.5 6,52 9.78 37005800 27.57 3369.63 0,0345 135.8 6,51 8.25 15818500 22.97 2597.93 0,0345 132.6 6,51 7.44 16952000 17.37 2470.52 0,0339 128.6 6,4 10.81 24563400 24.45 2772.73 0,0373 115.7 5,98 9.12 14163200 23.62 2151.83 0,0353 109.2 5,49 11.03 18184800 21.90 1840.26 0,0292 116.9 5,31 12.74 20810300 27.12 2116.24 0,0327 109.9 4,8 9.98 12843000 27.70 2110.49 0,0362 116.1 4,21 11.62 13866700 29.23 2160.54 0,0325 118.9 3,97 9.40 15119200 26.50 2027.13 0,0272 116.3 3,77 9.27 8301600 22.84 1805.43 0,0272 114.0 3,65 7.76 14039600 20.49 1498.80 0,0265 97.0 3,07 8.78 1213 etc...
 
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 time4 seconds
R Server'George Udny Yule' @ 72.249.76.132


Correlations for all pairs of data series (method=pearson)
AppleVolumeMicrosoftNASDAQInflationCons_confidenceFed_funds_rate
Apple10.4180.3230.129-0.163-0.59-0.291
Volume0.41810.2150.1710.297-0.130.226
Microsoft0.3230.21510.7680.3220.3350.438
NASDAQ0.1290.1710.76810.360.5350.649
Inflation-0.1630.2970.3220.3610.4360.548
Cons_confidence-0.59-0.130.3350.5350.43610.813
Fed_funds_rate-0.2910.2260.4380.6490.5480.8131


Correlations for all pairs of data series with p-values
pairPearson rSpearman rhoKendall tau
Apple;Volume0.41770.6570.4509
p-value(0)(0)(0)
Apple;Microsoft0.32350.48060.3489
p-value(2e-04)(0)(0)
Apple;NASDAQ0.1290.47730.3665
p-value(0.1436)(0)(0)
Apple;Inflation-0.1630.00990.0283
p-value(0.0638)(0.9113)(0.6334)
Apple;Cons_confidence-0.5898-0.4087-0.2318
p-value(0)(0)(1e-04)
Apple;Fed_funds_rate-0.2913-0.1938-0.1041
p-value(8e-04)(0.0272)(0.0806)
Volume;Microsoft0.2150.32040.22
p-value(0.014)(2e-04)(2e-04)
Volume;NASDAQ0.1710.46160.3269
p-value(0.0517)(0)(0)
Volume;Inflation0.29670.33650.2191
p-value(6e-04)(1e-04)(2e-04)
Volume;Cons_confidence-0.13-0.0633-0.0344
p-value(0.1404)(0.4745)(0.5622)
Volume;Fed_funds_rate0.22560.22680.1344
p-value(0.0099)(0.0095)(0.0241)
Microsoft;NASDAQ0.7680.80160.6273
p-value(0)(0)(0)
Microsoft;Inflation0.32210.34250.2363
p-value(2e-04)(1e-04)(1e-04)
Microsoft;Cons_confidence0.33490.27530.2045
p-value(1e-04)(0.0015)(6e-04)
Microsoft;Fed_funds_rate0.43820.40490.3006
p-value(0)(0)(0)
NASDAQ;Inflation0.36010.4940.3282
p-value(0)(0)(0)
NASDAQ;Cons_confidence0.53490.42050.3008
p-value(0)(0)(0)
NASDAQ;Fed_funds_rate0.64860.60950.4338
p-value(0)(0)(0)
Inflation;Cons_confidence0.43610.36640.2466
p-value(0)(0)(0)
Inflation;Fed_funds_rate0.5480.61080.4216
p-value(0)(0)(0)
Cons_confidence;Fed_funds_rate0.81330.84010.6546
p-value(0)(0)(0)
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292236320dq6nuaoonjk02zt/1sux11292234930.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292236320dq6nuaoonjk02zt/1sux11292234930.ps (open in new window)


 
Parameters (Session):
par1 = pearson ;
 
Parameters (R input):
par1 = pearson ;
 
R code (references can be found in the software module):
panel.tau <- function(x, y, digits=2, prefix='', cex.cor)
{
usr <- par('usr'); on.exit(par(usr))
par(usr = c(0, 1, 0, 1))
rr <- cor.test(x, y, method=par1)
r <- round(rr$p.value,2)
txt <- format(c(r, 0.123456789), digits=digits)[1]
txt <- paste(prefix, txt, sep='')
if(missing(cex.cor)) cex <- 0.5/strwidth(txt)
text(0.5, 0.5, txt, cex = cex)
}
panel.hist <- function(x, ...)
{
usr <- par('usr'); on.exit(par(usr))
par(usr = c(usr[1:2], 0, 1.5) )
h <- hist(x, plot = FALSE)
breaks <- h$breaks; nB <- length(breaks)
y <- h$counts; y <- y/max(y)
rect(breaks[-nB], 0, breaks[-1], y, col='grey', ...)
}
bitmap(file='test1.png')
pairs(t(y),diag.panel=panel.hist, upper.panel=panel.smooth, lower.panel=panel.tau, main=main)
dev.off()
load(file='createtable')
n <- length(y[,1])
n
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,paste('Correlations for all pairs of data series (method=',par1,')',sep=''),n+1,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,' ',header=TRUE)
for (i in 1:n) {
a<-table.element(a,dimnames(t(x))[[2]][i],header=TRUE)
}
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,dimnames(t(x))[[2]][i],header=TRUE)
for (j in 1:n) {
r <- cor.test(y[i,],y[j,],method=par1)
a<-table.element(a,round(r$estimate,3))
}
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Correlations for all pairs of data series with p-values',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'pair',1,TRUE)
a<-table.element(a,'Pearson r',1,TRUE)
a<-table.element(a,'Spearman rho',1,TRUE)
a<-table.element(a,'Kendall tau',1,TRUE)
a<-table.row.end(a)
cor.test(y[1,],y[2,],method=par1)
for (i in 1:(n-1))
{
for (j in (i+1):n)
{
a<-table.row.start(a)
dum <- paste(dimnames(t(x))[[2]][i],';',dimnames(t(x))[[2]][j],sep='')
a<-table.element(a,dum,header=TRUE)
rp <- cor.test(y[i,],y[j,],method='pearson')
a<-table.element(a,round(rp$estimate,4))
rs <- cor.test(y[i,],y[j,],method='spearman')
a<-table.element(a,round(rs$estimate,4))
rk <- cor.test(y[i,],y[j,],method='kendall')
a<-table.element(a,round(rk$estimate,4))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-value',header=T)
a<-table.element(a,paste('(',round(rp$p.value,4),')',sep=''))
a<-table.element(a,paste('(',round(rs$p.value,4),')',sep=''))
a<-table.element(a,paste('(',round(rk$p.value,4),')',sep=''))
a<-table.row.end(a)
}
}
a<-table.end(a)
table.save(a,file='mytable1.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