R version 2.6.0 (2007-10-03) Copyright (C) 2007 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > y <- c(87,75,74,91,101,103,106,102,105,105,100,95,96,98,99,92,84,81,72,89,96,91,88,90,98,87,100,100,104,107,105,102,98,106,97,101,100,93,94,96,96,98,102,95,85,84,82,87,77,90,90,94,97,96,93,93,93,97,100,95,97,103,102,93,99,100,97,104,102,103,100,90,90) > x <- c(96,86,82,92,99,101,102,100,101,100,99,97,97,97,96,92,91,87,82,89,91,90,87,89,95,85,94,94,97,99,97,96,94,100,96,98,98,94,93,94,94,97,98,95,89,89,89,90,86,92,91,95,99,98,95,96,94,98,98,98,98,102,101,92,99,101,99,102,102,101,99,98,98) > ylab = 'Alg economische situatie' > xlab = 'Consumentenvertrouwen' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: Wessa, (2007), Kendall tau Rank Correlation (v1.0.9) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_kendall.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: uses the Kendall library. The dataset is about O-rings of the Challenger space shuttle - sourcecomes from http://exploringdata.cqu.edu.au/ws_scatr.htm : x = temperature y = damage index. > library('Kendall') > k <- Kendall(x,y) > postscript(file="/var/www/html/rcomp/tmp/1b21d1194894241.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > > plot(x,y,main='Scatterplot',xlab=xlab,ylab=ylab) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2k4hb1194894241.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > > plot(rank(x),rank(y),main='Scatterplot of Ranks',xlab=xlab,ylab=ylab) > grid() > dev.off() null device 1 > load(file='/var/www/html/rcomp/createtable') > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Kendall tau Rank Correlation',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Kendall tau',header=TRUE) > a<-table.element(a,k$tau) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'2-sided p-value',header=TRUE) > a<-table.element(a,k$sl) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Score',header=TRUE) > a<-table.element(a,k$S) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Var(Score)',header=TRUE) > a<-table.element(a,k$varS) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Denominator',header=TRUE) > a<-table.element(a,k$D) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/3tm9x1194894241.tab") > > system("convert tmp/1b21d1194894241.ps tmp/1b21d1194894241.png") > system("convert tmp/2k4hb1194894241.ps tmp/2k4hb1194894241.png") > > > proc.time() user system elapsed 0.796 0.342 1.028