R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) 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(3.75,6.05,5.21,3.28,3.03,2.93,5.59,4.37,4.13,4.3,6.84,5.45,5.54,6.69,5.57,5.64,5.16,4.51,3.79,3.84,3.56,3.49,4.98,5.95,5.6,4.86,5.64,8.48,7.7,7.05,6.07,5.85,7.18,7.62,9.71,9.6,7.51,7.19,7,6.18,5.49,5.26,5.62,6.85,7.49,6.91,6.1,5.59,5.41,4.94,4.5,4.22,3.97,4.74,5.78,5.99,5.54,5.08,4.61,4.62,5.8,9.28,9.61,8.94,8.07,7.37,6.15,5.6) > x <- c(57,39,39,46,46,51,51,47,47,46,46,35,35,40,40,40,40,32,32,43,43,44,44,41,41,44,44,33,33,33,33,36,36,44,44,38,38,42,42,41,41,40,40,38,38,40,40,53,53,52,52,51,51,51,51,53,53,53,53,46,46,41,41,56,56,54,54,57) > ylab = 'Unemployment rate' > xlab = 'House Republicans' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: root > #To cite this work: Wessa, (2012), Kendall tau Rank Correlation (v1.0.11) 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 > # > library('Kendall') > k <- Kendall(x,y) > postscript(file="/var/wessaorg/rcomp/tmp/14v4v1426508622.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=8.3333333333333) > > plot(x,y,main='Scatterplot',xlab=xlab,ylab=ylab) > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/2jae71426508622.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=8.3333333333333) > > plot(rank(x),rank(y),main='Scatterplot of Ranks',xlab=xlab,ylab=ylab) > grid() > dev.off() null device 1 > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/3ijo11426508622.tab") > > try(system("convert tmp/14v4v1426508622.ps tmp/14v4v1426508622.png",intern=TRUE)) character(0) > try(system("convert tmp/2jae71426508622.ps tmp/2jae71426508622.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.962 0.155 1.121