R version 2.7.2 (2008-08-25) Copyright (C) 2008 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. > x <- c(110.089,99.966,94.195,119.588,125.946,118.906,108.717,118.357,115.422,130.937,111.802,120.357,121.12,108.752,98.973,116.721,123.857,114.056,98.309,110.251,108.538,122.526,118.394,116.691,116.014,111.784,95.164,121.028,129.89,116.102,102.055,113.562,113.071,126.486,119.472,117.141,121.925,112.688,90.974,126.398,130.401,116.873,111.917,113.919,117.931,139.332,127.781,118.103,136.984,119.566,107.238,139.389,139.798,138.074,129.739,125.098,129.341,149.083,137.721,130.126,140.499,118.165,115.932,144.662,136.159,147.339,138.807,135.275,135.84,161.702,132.606,147.419,154.865,131.545,126.212,150.316,154.524,154.28,131.059,147.168,141.8,162.022,143.924,151.406,159.601,143.513,132.302,152.021,171.573,161.591,134.057,172.247,173.384,173.706,188.178,165.932,179.795) > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: Wessa P., (2007), Tukey lambda PPCC Plot (v1.0.1) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_tukeylambda.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description > gp <- function(lambda, p) + { + (p^lambda-(1-p)^lambda)/lambda + } > sortx <- sort(x) > c <- array(NA,dim=c(201)) > for (i in 1:201) + { + if (i != 101) c[i] <- cor(gp(ppoints(x), lambda=(i-101)/100),sortx) + } > postscript(file="/var/www/html/rcomp/tmp/1fwik1224764926.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot((-100:100)/100,c[1:201],xlab='lambda',ylab='correlation',main='PPCC Plot - Tukey lambda') > grid() > dev.off() null device 1 > > #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Tukey Lambda - Key Values',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Distribution (lambda)',1,TRUE) > a<-table.element(a,'Correlation',1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Approx. Cauchy (lambda=-1)',header=TRUE) > a<-table.element(a,c[1]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Exact Logistic (lambda=0)',header=TRUE) > a<-table.element(a,(c[100]+c[102])/2) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Approx. Normal (lambda=0.14)',header=TRUE) > a<-table.element(a,c[115]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'U-shaped (lambda=0.5)',header=TRUE) > a<-table.element(a,c[151]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Exactly Uniform (lambda=1)',header=TRUE) > a<-table.element(a,c[201]) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/29tjh1224764926.tab") > > system("convert tmp/1fwik1224764926.ps tmp/1fwik1224764926.png") > > > proc.time() user system elapsed 0.642 0.180 0.721