R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch" Copyright (C) 2016 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(218.8,1317.1,292.2,330.3,491.7,270.7,728.3,499.8,972.3,189,249.7,711.3,307.1,670.1,496.5,349.7,360.8,433.4,286.7,754,632.2,998.9,488.8,529.9,288.4,241.6,425.8,573.7,409.2,441.5,715.6,404.7,262,172.8,503.1,443,336.1,588.1,478,858.1,265.7,463.2,388.9,289.3,327.8,877.6,280,487.7,433.4,388.9,532.6) > x <- c(49.00,26.70,34.40,44.00,28.10,32.90,20.80,28.00,6.00,35.00,43.00,35.00,52.00,35.00,44.00,32.00,44.10,38.80,27.70,27.10,25.70,10.90,37.00,39.00,46.00,44.00,51.00,48.30,34.60,30.10,19.70,31.20,23.90,31.40,47.00,42.00,43.60,29.90,36.70,10.90,44.00,46.20,47.00,41.00,59.00,31.00,42.00,37.00,28.90,41.00,66.70) > ylab = 'Welfare per person' > xlab = 'Percent registered Republican' > #'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/1rstk1488906337.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/2580e1488906337.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/3i0kp1488906337.tab") > > try(system("convert tmp/1rstk1488906337.ps tmp/1rstk1488906337.png",intern=TRUE)) character(0) > try(system("convert tmp/2580e1488906337.ps tmp/2580e1488906337.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.008 0.056 1.082