R version 2.9.0 (2009-04-17) Copyright (C) 2009 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(44.58070218 + ,43.3193912 + ,42.07587125 + ,40.8501513 + ,39.64224047 + ,39.64224047 + ,45.85979536 + ,52.5216938 + ,53.90730164 + ,53.90730164 + ,53.90730164 + ,56.73168085 + ,59.62689273 + ,59.62689273 + ,59.62689273 + ,58.17043656 + ,58.17043656 + ,59.62689273 + ,67.17441874 + ,78.48233794 + ,81.87175216 + ,83.59285653 + ,83.59285653 + ,85.33155061 + ,87.08782811 + ,87.08782811 + ,85.33155061 + ,83.59285653 + ,81.87175216 + ,80.16824383 + ,85.33155061 + ,96.13275234 + ,96.13275234 + ,94.2886494 + ,90.65310867 + ,88.86168284 + ,88.86168284 + ,87.08782811 + ,83.59285653 + ,80.16824383 + ,76.81404097 + ,75.16335947 + ,83.59285653 + ,92.46209953 + ,96.13275234 + ,94.2886494 + ,92.46209953 + ,90.65310867 + ,92.46209953 + ,90.65310867 + ,87.08782811 + ,83.59285653 + ,78.48233794 + ,75.16335947 + ,80.16824383 + ,88.86168284 + ,88.86168284 + ,85.33155061 + ,81.87175216 + ,80.16824383 + ,78.48233794 + ,78.48233794 + ,75.16335947 + ,71.91486948 + ,70.31707448 + ,70.31707448 + ,76.81404097 + ,87.08782811 + ,88.86168284 + ,85.33155061 + ,81.87175216 + ,81.87175216 + ,83.59285653 + ,81.87175216 + ,80.16824383 + ,78.48233794 + ,75.16335947 + ,73.53030008 + ,78.48233794 + ,88.86168284 + ,90.65310867 + ,85.33155061 + ,78.48233794 + ,76.81404097 + ,76.81404097 + ,75.16335947 + ,73.53030008 + ,70.31707448 + ,67.17441874 + ,64.10238876 + ,67.17441874 + ,70.31707448 + ,65.62957198 + ,61.10104179 + ,56.73168085 + ,55.31063329 + ,52.5216938 + ,48.4712936 + ,43.3193912 + ,42.07587125 + ,38.45214802 + ,37.27988334 + ,43.3193912 + ,49.80368162 + ,47.15666202 + ,45.85979536 + ,43.3193912 + ,40.8501513 + ,37.27988334 + ,34.98887574 + ,34.98887574 + ,37.27988334 + ,37.27988334 + ,33.8701524 + ,36.12545601 + ,38.45214802 + ,43.3193912 + ,52.5216938 + ,52.5216938 + ,53.90730164 + ,53.90730164 + ,51.15381776 + ,49.80368162 + ,47.15666202 + ,44.58070218 + ,43.3193912 + ,52.5216938 + ,53.90730164 + ,56.73168085 + ,59.62689273 + ,61.10104179 + ,62.59287626 + ,64.10238876 + ,62.59287626 + ,59.62689273 + ,58.17043656 + ,53.90730164 + ,53.90730164 + ,64.10238876 + ,65.62957198 + ,65.62957198 + ,65.62957198 + ,65.62957198 + ,68.73692191 + ,73.53030008 + ,71.91486948 + ,64.10238876 + ,52.5216938 + ,48.4712936 + ,51.15381776 + ,71.91486948 + ,80.16824383 + ,80.16824383 + ,70.31707448 + ,62.59287626 + ,64.10238876 + ,67.17441874 + ,68.73692191 + ,67.17441874 + ,62.59287626 + ,61.10104179 + ,58.17043656 + ,68.73692191 + ,70.31707448 + ,70.31707448 + ,67.17441874 + ,65.62957198 + ,67.17441874 + ,70.31707448 + ,70.31707448 + ,68.73692191 + ,67.17441874 + ,64.10238876 + ,59.62689273 + ,62.59287626 + ,61.10104179 + ,61.10104179 + ,59.62689273 + ,58.17043656 + ,58.17043656) > par1 = '12' > #'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] 180 > (np <- floor(n / par1)) [1] 15 > 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] [1,] 44.58070 59.62689 87.08783 88.86168 92.46210 78.48234 83.59286 76.81404 [2,] 43.31939 59.62689 87.08783 87.08783 90.65311 78.48234 81.87175 75.16336 [3,] 42.07587 59.62689 85.33155 83.59286 87.08783 75.16336 80.16824 73.53030 [4,] 40.85015 58.17044 83.59286 80.16824 83.59286 71.91487 78.48234 70.31707 [5,] 39.64224 58.17044 81.87175 76.81404 78.48234 70.31707 75.16336 67.17442 [6,] 39.64224 59.62689 80.16824 75.16336 75.16336 70.31707 73.53030 64.10239 [7,] 45.85980 67.17442 85.33155 83.59286 80.16824 76.81404 78.48234 67.17442 [8,] 52.52169 78.48234 96.13275 92.46210 88.86168 87.08783 88.86168 70.31707 [9,] 53.90730 81.87175 96.13275 96.13275 88.86168 88.86168 90.65311 65.62957 [10,] 53.90730 83.59286 94.28865 94.28865 85.33155 85.33155 85.33155 61.10104 [11,] 53.90730 83.59286 90.65311 92.46210 81.87175 81.87175 78.48234 56.73168 [12,] 56.73168 85.33155 88.86168 90.65311 80.16824 81.87175 76.81404 55.31063 [,9] [,10] [,11] [,12] [,13] [,14] [,15] [1,] 52.52169 37.27988 53.90730 64.10239 73.53030 67.17442 70.31707 [2,] 48.47129 34.98888 51.15382 62.59288 71.91487 68.73692 70.31707 [3,] 43.31939 34.98888 49.80368 59.62689 64.10239 67.17442 68.73692 [4,] 42.07587 37.27988 47.15666 58.17044 52.52169 62.59288 67.17442 [5,] 38.45215 37.27988 44.58070 53.90730 48.47129 61.10104 64.10239 [6,] 37.27988 33.87015 43.31939 53.90730 51.15382 58.17044 59.62689 [7,] 43.31939 36.12546 52.52169 64.10239 71.91487 68.73692 62.59288 [8,] 49.80368 38.45215 53.90730 65.62957 80.16824 70.31707 61.10104 [9,] 47.15666 43.31939 56.73168 65.62957 80.16824 70.31707 61.10104 [10,] 45.85980 52.52169 59.62689 65.62957 70.31707 67.17442 59.62689 [11,] 43.31939 52.52169 61.10104 65.62957 62.59288 65.62957 58.17044 [12,] 40.85015 53.90730 62.59288 68.73692 64.10239 67.17442 58.17044 > 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] 47.24547 69.57452 88.04505 86.77330 84.39206 78.87631 80.95283 66.94717 [9] 44.36911 41.04460 53.03359 62.30540 65.91317 66.19163 63.41979 > arr.sd [1] 6.457166 11.807434 5.341158 6.916073 5.352967 6.325161 5.294077 [8] 6.840957 4.563043 7.581829 6.250245 4.837678 10.765439 3.746267 [15] 4.605340 > arr.range [1] 17.08944 27.16111 15.96451 20.96939 17.29874 18.54461 17.12281 21.50341 [9] 15.24181 20.03715 19.27349 14.82962 31.69695 12.14664 12.14664 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean 6.636706 -0.002868 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) 1.86580 -0.01206 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean 17.4961 0.0186 > postscript(file="/var/www/html/rcomp/tmp/1iisj1259266462.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/2edbm1259266462.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/3e4ln1259266462.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/4t9k61259266462.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/5r8m11259266462.tab") > system("convert tmp/1iisj1259266462.ps tmp/1iisj1259266462.png") > system("convert tmp/2edbm1259266462.ps tmp/2edbm1259266462.png") > > > proc.time() user system elapsed 0.493 0.278 0.606