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(8715.1 + ,8919.9 + ,10085.8 + ,9511.7 + ,8991.3 + ,10311.2 + ,8895.4 + ,7449.8 + ,10084.0 + ,9859.4 + ,9100.1 + ,8920.8 + ,8502.7 + ,8599.6 + ,10394.4 + ,9290.4 + ,8742.2 + ,10217.3 + ,8639.0 + ,8139.6 + ,10779.1 + ,10427.7 + ,10349.1 + ,10036.4 + ,9492.1 + ,10638.8 + ,12054.5 + ,10324.7 + ,11817.3 + ,11008.9 + ,9996.6 + ,9419.5 + ,11958.8 + ,12594.6 + ,11890.6 + ,10871.7 + ,11835.7 + ,11542.2 + ,13093.7 + ,11180.2 + ,12035.7 + ,12112.0 + ,10875.2 + ,9897.3 + ,11672.1 + ,12385.7 + ,11405.6 + ,9830.9 + ,11025.1 + ,10853.8 + ,12252.6 + ,11839.4 + ,11669.1 + ,11601.4 + ,11178.4 + ,9516.4 + ,12102.8 + ,12989.0 + ,11610.2 + ,10205.5 + ,11356.2 + ,11307.1 + ,12648.6 + ,11947.2 + ,11714.1 + ,12192.5 + ,11268.8 + ,9097.4 + ,12639.8 + ,13040.1 + ,11687.3 + ,11191.7 + ,11391.9 + ,11793.1 + ,13933.2 + ,12778.1 + ,11810.3 + ,13698.4 + ,11956.6 + ,10723.8 + ,13938.9 + ,13979.8 + ,13807.4 + ,12973.9 + ,12509.8 + ,12934.1 + ,14908.3 + ,13772.1 + ,13012.6 + ,14049.9 + ,11816.5 + ,11593.2 + ,14466.2 + ,13615.9 + ,14733.9 + ,13880.7 + ,13527.5 + ,13584.0 + ,16170.2 + ,13260.6 + ,14741.9 + ,15486.5 + ,13154.5 + ,12621.2 + ,15031.6 + ,15452.4 + ,15428.0 + ,13105.9 + ,14716.8 + ,14180.0 + ,16202.2 + ,14392.4 + ,15140.6 + ,15960.1 + ,14351.3 + ,13230.2 + ,15202.1 + ,17056.0 + ,16077.7 + ,13348.2 + ,16402.4 + ,16559.1 + ,16579.0 + ,17561.2 + ,16129.6 + ,18484.3 + ,16402.6 + ,14032.3 + ,17109.1 + ,17157.2 + ,13879.8 + ,12362.4) > 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] 132 > (np <- floor(n / par1)) [1] 11 > 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,] 8715.1 8502.7 9492.1 11835.7 11025.1 11356.2 11391.9 12509.8 13527.5 [2,] 8919.9 8599.6 10638.8 11542.2 10853.8 11307.1 11793.1 12934.1 13584.0 [3,] 10085.8 10394.4 12054.5 13093.7 12252.6 12648.6 13933.2 14908.3 16170.2 [4,] 9511.7 9290.4 10324.7 11180.2 11839.4 11947.2 12778.1 13772.1 13260.6 [5,] 8991.3 8742.2 11817.3 12035.7 11669.1 11714.1 11810.3 13012.6 14741.9 [6,] 10311.2 10217.3 11008.9 12112.0 11601.4 12192.5 13698.4 14049.9 15486.5 [7,] 8895.4 8639.0 9996.6 10875.2 11178.4 11268.8 11956.6 11816.5 13154.5 [8,] 7449.8 8139.6 9419.5 9897.3 9516.4 9097.4 10723.8 11593.2 12621.2 [9,] 10084.0 10779.1 11958.8 11672.1 12102.8 12639.8 13938.9 14466.2 15031.6 [10,] 9859.4 10427.7 12594.6 12385.7 12989.0 13040.1 13979.8 13615.9 15452.4 [11,] 9100.1 10349.1 11890.6 11405.6 11610.2 11687.3 13807.4 14733.9 15428.0 [12,] 8920.8 10036.4 10871.7 9830.9 10205.5 11191.7 12973.9 13880.7 13105.9 [,10] [,11] [1,] 14716.8 16402.4 [2,] 14180.0 16559.1 [3,] 16202.2 16579.0 [4,] 14392.4 17561.2 [5,] 15140.6 16129.6 [6,] 15960.1 18484.3 [7,] 14351.3 16402.6 [8,] 13230.2 14032.3 [9,] 15202.1 17109.1 [10,] 17056.0 17157.2 [11,] 16077.7 13879.8 [12,] 13348.2 12362.4 > 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] 9237.042 9509.792 11005.675 11488.858 11403.642 11674.233 12732.117 [8] 13441.100 14297.025 14988.133 16054.917 > arr.sd [1] 793.0045 945.5287 1062.4315 952.7266 932.1832 1016.4729 1158.7059 [8] 1084.6399 1205.3829 1176.1957 1751.1031 > arr.range [1] 2861.4 2639.5 3175.1 3262.8 3472.6 3942.7 3256.0 3315.1 3549.0 3825.8 [11] 6121.9 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean -101.40851 0.09713 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) -2.3556 0.9925 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean -363.5341 0.3197 > postscript(file="/var/www/html/rcomp/tmp/1ji7u1260970056.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/2d9121260970056.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/3lurv1260970056.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/412ok1260970056.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/5w59l1260970056.tab") > > try(system("convert tmp/1ji7u1260970056.ps tmp/1ji7u1260970056.png",intern=TRUE)) character(0) > try(system("convert tmp/2d9121260970056.ps tmp/2d9121260970056.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.487 0.289 0.629