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(595.130,526.883,562.254,545.427,522.084,483.414,528.797,532.749,511.380,472.941,516.118,502.940,476.118,432.418,475.525,453.638,431.417,390.934,436.414,418.451,399.528,367.749,423.433,420.450,415.906,392.949,453.203,455.926,451.879,434.996,498.811,505.940,517.395,508.456,585.132,587.971,584.027,557.196,613.433,600.049,588.993,559.271,622.580,616.645,603.243,557.949,608.882,582.930,570.492,542.907,598.067,568.717,551.773,514.465,569.055,528.897,515.229,481.141,535.612,498.547,478.587,445.911,503.412,469.797,458.365,436.761,502.205,481.627,473.698,457.200,521.671,513.354,515.369,505.652,575.676,555.865,559.504,540.994,605.635,600.315,588.224,569.861,625.950,601.554,587.760,573.307,621.764,570.214,547.034,511.873,553.870,517.058,505.702,479.060,526.638,508.060,532.394,532.115,587.896,565.710,572.708,544.417,597.160) > 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] 103 > (np <- floor(n / par1)) [1] 25 > 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,] 595.130 522.084 511.380 476.118 431.417 399.528 415.906 451.879 517.395 [2,] 526.883 483.414 472.941 432.418 390.934 367.749 392.949 434.996 508.456 [3,] 562.254 528.797 516.118 475.525 436.414 423.433 453.203 498.811 585.132 [4,] 545.427 532.749 502.940 453.638 418.451 420.450 455.926 505.940 587.971 [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [1,] 584.027 588.993 603.243 570.492 551.773 515.229 478.587 458.365 473.698 [2,] 557.196 559.271 557.949 542.907 514.465 481.141 445.911 436.761 457.200 [3,] 613.433 622.580 608.882 598.067 569.055 535.612 503.412 502.205 521.671 [4,] 600.049 616.645 582.930 568.717 528.897 498.547 469.797 481.627 513.354 [,19] [,20] [,21] [,22] [,23] [,24] [,25] [1,] 515.369 559.504 588.224 587.760 547.034 505.702 532.394 [2,] 505.652 540.994 569.861 573.307 511.873 479.060 532.115 [3,] 575.676 605.635 625.950 621.764 553.870 526.638 587.896 [4,] 555.865 600.315 601.554 570.214 517.058 508.060 565.710 > 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] 557.4235 516.7610 500.8447 459.4248 419.3040 402.7900 429.4960 472.9065 [9] 549.7385 588.6762 596.8723 588.2510 570.0457 541.0475 507.6322 474.4267 [17] 469.7395 491.4808 538.1405 576.6120 596.3972 588.2613 532.4588 504.8650 [25] 554.5287 > arr.sd [1] 28.99283 22.66303 19.38447 20.82253 20.37205 25.66789 30.44634 34.84067 [9] 42.68009 24.18579 29.02750 23.07179 22.53639 24.17795 23.27305 23.74893 [17] 28.35655 30.99079 33.15175 31.44038 23.60036 23.60804 21.07001 19.58631 [25] 27.26852 > arr.range [1] 68.247 49.335 43.177 43.700 45.480 55.684 62.977 70.944 79.515 56.237 [11] 63.309 50.933 55.160 54.590 54.471 57.501 65.444 64.471 70.024 64.641 [21] 56.089 51.550 41.997 47.578 55.781 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean 22.39919 0.00729 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) 2.2920 0.1527 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean 46.17285 0.02107 > postscript(file="/var/www/html/rcomp/tmp/1fdd01292938491.ps",horizontal=F,onefile=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/2fdd01292938491.ps",horizontal=F,onefile=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/30dc61292938491.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/44wsu1292938491.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/57fr01292938491.tab") > > try(system("convert tmp/1fdd01292938491.ps tmp/1fdd01292938491.png",intern=TRUE)) character(0) > try(system("convert tmp/2fdd01292938491.ps tmp/2fdd01292938491.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.524 0.305 1.387