R version 2.6.0 (2007-10-03) Copyright (C) 2007 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(138.1,138.6,160.8,151.5,142.7,157.4,138.9,141.0,150.9,149.9,153.0,144.3,128.1,123.3,155.9,144.1,134.1,153.1,131.0,129.8,139.9,135.6,126.8,134.4,113.5,107.5,133.8,119.0,125.9,130.1,114.2,111.6,131.2,124.1,127.1,123.4,100.7,100.3,121.6,110.5,110.3,122.7,102.6,101.8,113.6,107.2,116.8,112.5,89.0,95.2,110.6,102.6,106.4,112.7,103.2,104.2,111.3,115.7,111.6,112.2,92.2,97.1,108.1,107.2,107.2,110.3,97.6,100.6,102.8,105.3,109.5,105.7,93.7,91.7,111.6,109.2,101.2,114.3,100.9,106.0,109.0,110.4,110.7,105.7,89.6,83.1,103.5,104.8,93.5,106.7,93.7,84.7,99.2,91.9,94.9,94.1,80.8,72.6,94.0,80.0,85.4,91.5,76.1,76.1,89.5,85.3,91.0,93.0,73.4,76.6,95.0,84.5,88.7,93.1,83.4,82.2,95.6,83.7,94.3,93.0,71.8,75.3,91.8,80.7,84.8,83.1,78.4,78.7,84.7,80.5,91.8,83.5,66.6,68.6,83.6,79.7,79.9,81.2,74.3,73.0,78.8,81.6,85.0,91.1,68.2,59.8,83.1,76.7,73.2,83.9,73.0,70.9) > 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] 152 > (np <- floor(n / par1)) [1] 12 > 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] [,10] [,11] [,12] [1,] 138.1 128.1 113.5 100.7 89.0 92.2 93.7 89.6 80.8 73.4 71.8 66.6 [2,] 138.6 123.3 107.5 100.3 95.2 97.1 91.7 83.1 72.6 76.6 75.3 68.6 [3,] 160.8 155.9 133.8 121.6 110.6 108.1 111.6 103.5 94.0 95.0 91.8 83.6 [4,] 151.5 144.1 119.0 110.5 102.6 107.2 109.2 104.8 80.0 84.5 80.7 79.7 [5,] 142.7 134.1 125.9 110.3 106.4 107.2 101.2 93.5 85.4 88.7 84.8 79.9 [6,] 157.4 153.1 130.1 122.7 112.7 110.3 114.3 106.7 91.5 93.1 83.1 81.2 [7,] 138.9 131.0 114.2 102.6 103.2 97.6 100.9 93.7 76.1 83.4 78.4 74.3 [8,] 141.0 129.8 111.6 101.8 104.2 100.6 106.0 84.7 76.1 82.2 78.7 73.0 [9,] 150.9 139.9 131.2 113.6 111.3 102.8 109.0 99.2 89.5 95.6 84.7 78.8 [10,] 149.9 135.6 124.1 107.2 115.7 105.3 110.4 91.9 85.3 83.7 80.5 81.6 [11,] 153.0 126.8 127.1 116.8 111.6 109.5 110.7 94.9 91.0 94.3 91.8 85.0 [12,] 144.3 134.4 123.4 112.5 112.2 105.7 105.7 94.1 93.0 93.0 83.5 91.1 > 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] 147.25833 136.34167 121.78333 110.05000 106.22500 103.63333 105.36667 [8] 94.97500 84.60833 86.95833 82.09167 78.61667 > arr.sd [1] 7.715564 10.206723 8.512113 7.816242 7.896274 5.648867 7.141725 [8] 7.471415 7.365331 7.468657 5.933642 6.972391 > arr.range [1] 94.2 87.3 50.2 43.0 35.8 29.1 40.0 33.7 15.2 15.1 6.8 7.6 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean 4.06986 0.03284 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) -0.06999 0.44797 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean -96.378 1.284 > postscript(file="/var/www/html/rcomp/tmp/1xbjy1196265133.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/24wxv1196265133.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 > 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/34cie1196265134.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/4hzix1196265134.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/5ics31196265134.tab") > > system("convert tmp/1xbjy1196265133.ps tmp/1xbjy1196265133.png") > system("convert tmp/24wxv1196265133.ps tmp/24wxv1196265133.png") > > > proc.time() user system elapsed 0.759 0.289 0.856