R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-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. > x <- array(list(7 + ,0 + ,2 + ,2 + ,-1 + ,-2 + ,3 + ,2 + ,0 + ,0 + ,2 + ,5 + ,-1 + ,-1 + ,3 + ,2 + ,0 + ,-4 + ,3 + ,6 + ,-5 + ,0 + ,3 + ,3 + ,-1 + ,1 + ,1 + ,1 + ,0 + ,-5 + ,3 + ,1 + ,0 + ,-9 + ,4 + ,2 + ,0 + ,1 + ,0 + ,-3 + ,-5 + ,-5 + ,3 + ,2 + ,0 + ,-1 + ,1 + ,2 + ,2 + ,-4 + ,1 + ,3 + ,-2 + ,1 + ,6 + ,3 + ,-2 + ,2 + ,4 + ,3 + ,0 + ,3 + ,1 + ,0 + ,0 + ,-1 + ,3 + ,1 + ,5 + ,0 + ,-1 + ,3 + ,2 + ,2 + ,1 + ,3 + ,1 + ,-2 + ,4 + ,-1 + ,4 + ,0 + ,4 + ,0 + ,-1 + ,-2 + ,2 + ,3 + ,-2 + ,3 + ,1 + ,4 + ,0 + ,-3 + ,4 + ,-1 + ,-1 + ,1 + ,2 + ,-1 + ,1 + ,-5 + ,4 + ,0 + ,3 + ,1 + ,2 + ,4 + ,1 + ,-1 + ,2 + ,3 + ,1 + ,5 + ,3 + ,3 + ,2 + ,-1 + ,3 + ,3 + ,1 + ,-1 + ,4 + ,0 + ,1 + ,0 + ,2 + ,7 + ,1 + ,-5 + ,4 + ,5 + ,-1 + ,-1 + ,5 + ,4 + ,0 + ,4 + ,10 + ,3 + ,-5 + ,0 + ,2 + ,-2 + ,-1 + ,-1 + ,2 +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0 + ,-0.6 + ,1 + ,1.8 + ,1 + ,-0.6 + ,4 + ,1.8 + ,1 + ,-0.6 + ,1 + ,1.8 + ,0 + ,-0.6 + ,4 + ,1.8 + ,1 + ,-0.6 + ,2 + ,1.8 + ,0 + ,-0.6 + ,1 + ,1.8 + ,3 + ,-0.6 + ,3 + ,1.8 + ,4 + ,-0.6 + ,5 + ,1.8 + ,0 + ,-0.6 + ,2 + ,1.8 + ,5 + ,-0.6 + ,4 + ,1.8 + ,4 + ,-0.6 + ,3 + ,1.8 + ,1 + ,-0.6 + ,3 + ,1.8 + ,0 + ,-0.6 + ,-1 + ,1.8 + ,0 + ,-0.6 + ,-2 + ,1.8 + ,1 + ,-0.6 + ,3 + ,1.8) + ,dim=c(4 + ,100) + ,dimnames=list(c('DiffWF' + ,'DiffWM' + ,'DiffHF' + ,'DiffHM') + ,1:100)) > y <- array(NA,dim=c(4,100),dimnames=list(c('DiffWF','DiffWM','DiffHF','DiffHM'),1:100)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = '2' > par2 = '1' > par1 = 'two.sided' > par3 <- '2' > par2 <- '1' > par1 <- 'two.sided' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: aston2 > #To cite this work: Ian E. Holliday, 2012, Kolmogorov-Smirnov Test (v1.0.3) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_Reddy-Moores%20K-S%20Test.wasp/ > #Source of accompanying publication: > # > par2 <- as.numeric(par2) > par3 <- as.numeric(par3) > x <- t(y) > > #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,'Kolmogorov_Smirnov Test',3,TRUE) > a <- table.row.end(a) > a <- table.row.start(a) > a <- table.element(a,'',1,TRUE) > a <- table.element(a,'Statistic',1,TRUE) > a <- table.element(a,'P-value',1,TRUE) > a <- table.row.end(a) > D <- ks.test(x[,par2],x[,par3],alternative=par1) Warning message: In ks.test(x[, par2], x[, par3], alternative = par1) : cannot compute correct p-values with ties > a<-table.row.start(a) > a<-table.element(a,'K-S Test',1,TRUE) > a<-table.element(a,signif(D$statistic[[1]], digits=5) ) > a<-table.element(a,signif(D$p.value, digits =5) ) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/1vul51338379362.tab") > a<-table.start() > a <- table.row.start(a) > a <- table.element(a,'Means of Data Distributions ',3,TRUE) > a <- table.row.end(a) > a <- table.row.start(a) > a <- table.element(a,'Mean 1',1,TRUE) > a <- table.element(a,'Mean 2',1,TRUE) > a <- table.element(a,'Difference',1,TRUE) > a <- table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,signif(mean(x[,par2]), digits=5),1) > a<-table.element(a,signif(mean(x[,par3]), digits=5),1) > a<-table.element(a,signif( (mean(x[,par2])- mean(x[,par3])), digits=5),1) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/249v11338379362.tab") > > > > proc.time() user system elapsed 0.265 0.073 0.327