R version 2.6.2 (2008-02-08) 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(0.70291,0.6885,0.67127,0.66502,0.65825,0.65025,0.65779,0.66014,0.64683,0.64587,0.63702,0.62651,0.61834,0.61466,0.61063,0.59802,0.60151,0.62927,0.62304,0.6071,0.60773,0.58933,0.60039,0.61342,0.6348,0.634,0.62915,0.62168,0.61328,0.6089,0.60857,0.62672,0.62291,0.62393,0.61838,0.62012,0.61659,0.6116,0.61573,0.61407,0.62823,0.64405,0.6387,0.63633,0.63059,0.62994,0.63709,0.64217,0.65711,0.66977,0.68255,0.68902,0.71322,0.70224,0.70045,0.69919,0.69693,0.69763,0.69278,0.70196,0.69215,0.6769,0.67124,0.66532,0.67157,0.66428,0.66576,0.66942,0.6813,0.69144,0.69862,0.695,0.69867,0.68968,0.69233,0.68293,0.68399,0.66895,0.68756,0.68527,0.6776,0.68137,0.67933,0.67922,0.68598,0.68297,0.68935,0.69463,0.6833,0.68666,0.68782,0.67669,0.67511,0.67254,0.67397,0.67286,0.66341,0.668,0.68021,0.67934,0.68136,0.67562,0.6744,0.67766,0.68887,0.69614,0.70896,0.72064,0.74725) > par1 = '4' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > par1 <- as.numeric(par1) > (n <- length(x)) [1] 109 > (np <- floor(n / par1)) [1] 27 > arr <- array(NA,dim=c(par1,np)) > j <- 0 > k <- 1 > for (i in 1:(np*par1)) + { + j = j + 1 + arr[j,k] <- x[i] + if (j == par1) { + j = 0 + k=k+1 + } + } > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 0.70291 0.65825 0.64683 0.61834 0.60151 0.60773 0.63480 0.61328 0.62291 [2,] 0.68850 0.65025 0.64587 0.61466 0.62927 0.58933 0.63400 0.60890 0.62393 [3,] 0.67127 0.65779 0.63702 0.61063 0.62304 0.60039 0.62915 0.60857 0.61838 [4,] 0.66502 0.66014 0.62651 0.59802 0.60710 0.61342 0.62168 0.62672 0.62012 [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [1,] 0.61659 0.62823 0.63059 0.65711 0.71322 0.69693 0.69215 0.67157 0.68130 [2,] 0.61160 0.64405 0.62994 0.66977 0.70224 0.69763 0.67690 0.66428 0.69144 [3,] 0.61573 0.63870 0.63709 0.68255 0.70045 0.69278 0.67124 0.66576 0.69862 [4,] 0.61407 0.63633 0.64217 0.68902 0.69919 0.70196 0.66532 0.66942 0.69500 [,19] [,20] [,21] [,22] [,23] [,24] [,25] [,26] [,27] [1,] 0.69867 0.68399 0.67760 0.68598 0.68330 0.67511 0.66341 0.68136 0.68887 [2,] 0.68968 0.66895 0.68137 0.68297 0.68666 0.67254 0.66800 0.67562 0.69614 [3,] 0.69233 0.68756 0.67933 0.68935 0.68782 0.67397 0.68021 0.67440 0.70896 [4,] 0.68293 0.68527 0.67922 0.69463 0.67669 0.67286 0.67934 0.67766 0.72064 > arr.mean <- array(NA,dim=np) > arr.sd <- array(NA,dim=np) > arr.range <- array(NA,dim=np) > for (j in 1:np) + { + arr.mean[j] <- mean(arr[,j],na.rm=TRUE) + arr.sd[j] <- sd(arr[,j],na.rm=TRUE) + arr.range[j] <- max(arr[,j],na.rm=TRUE) - min(arr[,j],na.rm=TRUE) + } > arr.mean [1] 0.6819250 0.6566075 0.6390575 0.6104125 0.6152300 0.6027175 0.6299075 [8] 0.6143675 0.6213350 0.6144975 0.6368275 0.6349475 0.6746125 0.7037750 [15] 0.6973250 0.6764025 0.6677575 0.6915900 0.6909025 0.6814425 0.6793800 [22] 0.6882325 0.6836175 0.6736200 0.6727400 0.6772600 0.7036525 > arr.sd [1] 0.017155261 0.004358611 0.009458912 0.008841340 0.013069723 0.010397293 [7] 0.006026350 0.008510219 0.002544465 0.002196655 0.006578634 0.005797059 [13] 0.014146463 0.006419816 0.003758958 0.011513825 0.003335770 0.007460018 [19] 0.006517338 0.008458248 0.001544517 0.004998149 0.005000296 0.001167133 [25] 0.008344208 0.003046265 0.014044034 > arr.range [1] 0.03789 0.00989 0.02032 0.02032 0.02776 0.02409 0.01312 0.01815 0.00555 [10] 0.00499 0.01582 0.01223 0.03191 0.01403 0.00918 0.02683 0.00729 0.01732 [19] 0.01574 0.01861 0.00377 0.01166 0.01113 0.00257 0.01680 0.00696 0.03177 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean 0.006829 0.000578 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) -5.3193 -0.4665 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean 0.011856 0.006486 > postscript(file="/var/www/html/rcomp/tmp/1bk9k1211218432.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.mean,arr.sd,main='Standard Deviation-Mean Plot',xlab='mean',ylab='standard deviation') > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2lnkw1211218432.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.mean,arr.range,main='Range-Mean Plot',xlab='mean',ylab='range') > 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,'Standard Deviation-Mean Plot',4,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Section',header=TRUE) > a<-table.element(a,'Mean',header=TRUE) > a<-table.element(a,'Standard Deviation',header=TRUE) > a<-table.element(a,'Range',header=TRUE) > a<-table.row.end(a) > for (j in 1:np) { + a<-table.row.start(a) + a<-table.element(a,j,header=TRUE) + a<-table.element(a,arr.mean[j]) + a<-table.element(a,arr.sd[j] ) + a<-table.element(a,arr.range[j] ) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/3x01b1211218432.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Regression: S.E.(k) = alpha + beta * Mean(k)',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'alpha',header=TRUE) > a<-table.element(a,lm1$coefficients[[1]]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'beta',header=TRUE) > a<-table.element(a,lm1$coefficients[[2]]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,summary(lm1)$coefficients[2,2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'T-STAT',header=TRUE) > a<-table.element(a,summary(lm1)$coefficients[2,3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'p-value',header=TRUE) > a<-table.element(a,summary(lm1)$coefficients[2,4]) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/47y6z1211218432.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Regression: ln S.E.(k) = alpha + beta * ln Mean(k)',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'alpha',header=TRUE) > a<-table.element(a,lnlm1$coefficients[[1]]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'beta',header=TRUE) > a<-table.element(a,lnlm1$coefficients[[2]]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,summary(lnlm1)$coefficients[2,2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'T-STAT',header=TRUE) > a<-table.element(a,summary(lnlm1)$coefficients[2,3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'p-value',header=TRUE) > a<-table.element(a,summary(lnlm1)$coefficients[2,4]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Lambda',header=TRUE) > a<-table.element(a,1-lnlm1$coefficients[[2]]) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/5bfym1211218432.tab") > > system("convert tmp/1bk9k1211218432.ps tmp/1bk9k1211218432.png") > system("convert tmp/2lnkw1211218432.ps tmp/2lnkw1211218432.png") > > > proc.time() user system elapsed 0.749 0.287 0.926