library('Kendall') k <- Kendall(x,y) bitmap(file='test1.png') par(bg=rgb(0.2,0.4,0.6)) plot(x,y,main='Scatterplot',xlab=xlab,ylab=ylab) grid() dev.off() bitmap(file='test2.png') par(bg=rgb(0.2,0.4,0.6)) plot(rank(x),rank(y),main='Scatterplot of Ranks',xlab=xlab,ylab=ylab) grid() dev.off() load(file='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='mytable.tab')
|