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. Natural language support but running in an English locale 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(153.4,159.5,157.4,169.1,172.6,161.7,159.2,157.4,153.9,144.8,142.2,140.1,143.4,153.3,166.9,170.6,182.8,170.3,156.6,155.2,154.7,151.6,152.1,153.2,149.5,149.7,144.3,140,137.8,132.2,128.9,123.1,120.4,122.8,126,124.5,120.6,114.7,111.7,109.1,108,107.7,99.9,103.7,103.4,103.4,104.7,105.8,105.3,103,103.8,103.4,105.8,101.4,97,94.3,96.6,97.1,95.7,96.9,97.4,95.3,93.6,91.5,93.1,91.7,94.3,93.9,90.9,88.3,91.3,91.7,92.4,92,95.6,95.8,96.4,99,107,109.7,116.2,115.9,113.8,112.6,113.7,115.9,110.3,111.3,113.4,108.2,104.8,106,110.9,115,118.4,121.4,128.8,131.7,141.7,142.9,139.4,134.7,125,113.6,111.5,108.5,112.3,116.6,115.5,120.1,132.9,128.1,129.3,132.5,131,124.9,120.8,122,122.1,127.4,135.2,137.3,135,136,138.4,134.7,138.4,133.9,133.6,141.2,151.8,155.4,156.6,161.6,160.7,156,159.5,168.7,169.9,169.9,185.9) > #'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/1fgun1196436143.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 > 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/23v3b1196436143.tab") > > system("convert tmp/1fgun1196436143.ps tmp/1fgun1196436143.png") > > > proc.time() user system elapsed 2.224 0.477 2.278