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(100.21 + ,100.36 + ,100.62 + ,100.78 + ,100.93 + ,100.70 + ,100.00 + ,100.20 + ,99.68 + ,99.56 + ,100.06 + ,100.50 + ,99.30 + ,99.37 + ,99.20 + ,98.11 + ,97.60 + ,97.76 + ,98.06 + ,98.25 + ,98.50 + ,97.39 + ,98.09 + ,97.78 + ,98.12 + ,97.50 + ,97.30 + ,97.64 + ,96.88 + ,97.40 + ,98.27 + ,97.94 + ,98.61 + ,98.72 + ,98.62 + ,98.56 + ,98.06 + ,97.40 + ,97.76 + ,97.05 + ,97.85 + ,97.40 + ,97.27 + ,97.93 + ,98.60 + ,98.70 + ,98.88 + ,98.27 + ,97.85 + ,97.70 + ,96.97 + ,97.72 + ,97.66 + ,99.00 + ,98.86 + ,99.56 + ,100.19 + ,100.37 + ,100.01 + ,99.68 + ,99.78 + ,99.36 + ,99.21 + ,99.26 + ,99.26 + ,100.43 + ,101.50 + ,102.27 + ,102.69 + ,103.47 + ,104.02 + ,103.55 + ,103.77 + ,104.19 + ,103.64 + ,103.68 + ,105.39 + ,106.61 + ,108.12 + ,109.22 + ,110.17 + ,110.31 + ,111.06 + ,111.14 + ,111.39 + ,112.51 + ,111.28 + ,112.22 + ,113.19 + ,114.32 + ,115.34 + ,116.61 + ,117.83 + ,117.70 + ,118.51 + ,118.82 + ,119.49 + ,119.57 + ,120.00 + ,121.96 + ,121.45 + ,123.41 + ,124.44 + ,126.25 + ,127.41 + ,127.63 + ,129.19 + ,129.82 + ,130.45 + ,132.02 + ,132.72 + ,132.96 + ,135.06 + ,137.04 + ,137.83 + ,139.17 + ,140.35 + ,141.01 + ,141.89 + ,143.28 + ,142.90 + ,143.37 + ,145.03 + ,146.05 + ,147.39 + ,149.58 + ,151.02 + ,153.57 + ,155.60 + ,157.18 + ,158.77 + ,159.95 + ,161.34 + ,161.95 + ,163.36 + ,165.00 + ,166.65 + ,168.65 + ,170.29 + ,172.70 + ,173.79 + ,176.45 + ,177.58 + ,179.19 + ,181.01 + ,184.08 + ,185.63 + ,188.51 + ,190.18 + ,192.19 + ,193.47 + ,196.73 + ,200.39 + ,203.24 + ,205.53 + ,208.21 + ,208.88 + ,212.85 + ,216.41 + ,216.23 + ,219.27 + ,222.02 + ,224.89 + ,230.37 + ,232.29 + ,235.53 + ,236.92 + ,242.37 + ,242.75 + ,244.19 + ,247.94 + ,248.80 + ,250.18 + ,251.55 + ,254.40 + ,255.72 + ,257.69 + ,258.37 + ,258.22 + ,258.59 + ,257.45 + ,257.45 + ,256.73 + ,258.82 + ,257.99 + ,262.85 + ,262.58 + ,261.55 + ,261.25 + ,259.78 + ,256.26 + ,254.29 + ,248.50 + ,241.88 + ,238.53 + ,232.24 + ,232.46 + ,225.79 + ,221.63 + ,219.62 + ,215.94 + ,211.81 + ,205.57 + ,201.25 + ,194.70 + ,187.94 + ,185.61 + ,181.15 + ,186.50 + ,183.21 + ,182.61 + ,187.09 + ,189.10 + ,191.25 + ,190.74 + ,190.79) > 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] 216 > (np <- floor(n / par1)) [1] 18 > 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] [1,] 100.21 99.30 98.12 98.06 97.85 99.78 103.77 111.39 119.49 130.45 142.90 [2,] 100.36 99.37 97.50 97.40 97.70 99.36 104.19 112.51 119.57 132.02 143.37 [3,] 100.62 99.20 97.30 97.76 96.97 99.21 103.64 111.28 120.00 132.72 145.03 [4,] 100.78 98.11 97.64 97.05 97.72 99.26 103.68 112.22 121.96 132.96 146.05 [5,] 100.93 97.60 96.88 97.85 97.66 99.26 105.39 113.19 121.45 135.06 147.39 [6,] 100.70 97.76 97.40 97.40 99.00 100.43 106.61 114.32 123.41 137.04 149.58 [7,] 100.00 98.06 98.27 97.27 98.86 101.50 108.12 115.34 124.44 137.83 151.02 [8,] 100.20 98.25 97.94 97.93 99.56 102.27 109.22 116.61 126.25 139.17 153.57 [9,] 99.68 98.50 98.61 98.60 100.19 102.69 110.17 117.83 127.41 140.35 155.60 [10,] 99.56 97.39 98.72 98.70 100.37 103.47 110.31 117.70 127.63 141.01 157.18 [11,] 100.06 98.09 98.62 98.88 100.01 104.02 111.06 118.51 129.19 141.89 158.77 [12,] 100.50 97.78 98.56 98.27 99.68 103.55 111.14 118.82 129.82 143.28 159.95 [,12] [,13] [,14] [,15] [,16] [,17] [,18] [1,] 161.34 181.01 208.88 242.75 257.45 248.50 194.70 [2,] 161.95 184.08 212.85 244.19 257.45 241.88 187.94 [3,] 163.36 185.63 216.41 247.94 256.73 238.53 185.61 [4,] 165.00 188.51 216.23 248.80 258.82 232.24 181.15 [5,] 166.65 190.18 219.27 250.18 257.99 232.46 186.50 [6,] 168.65 192.19 222.02 251.55 262.85 225.79 183.21 [7,] 170.29 193.47 224.89 254.40 262.58 221.63 182.61 [8,] 172.70 196.73 230.37 255.72 261.55 219.62 187.09 [9,] 173.79 200.39 232.29 257.69 261.25 215.94 189.10 [10,] 176.45 203.24 235.53 258.37 259.78 211.81 191.25 [11,] 177.58 205.53 236.92 258.22 256.26 205.57 190.74 [12,] 179.19 208.21 242.37 258.59 254.29 201.25 190.79 > 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] 100.30000 98.28417 97.96333 97.93083 98.79750 101.23333 107.27500 [8] 114.97667 124.21833 136.98167 150.86750 169.74583 194.09750 224.83583 [15] 252.36667 258.91667 224.60167 187.55750 > arr.sd [1] 0.4296933 0.6750281 0.6140230 0.5942062 1.1748897 1.8962083 [7] 3.0642914 2.8516354 3.7812308 4.2869248 6.0696055 6.2261231 [13] 8.8106672 10.6012224 5.6395653 2.7040553 14.6628255 4.0149383 > arr.range [1] 1.37 1.98 1.84 1.83 3.40 4.81 7.50 7.54 10.33 12.83 17.05 17.85 [13] 27.20 33.49 15.84 8.56 47.25 13.55 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean -2.63623 0.04581 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) -10.202 2.263 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean -9.4208 0.1473 > postscript(file="/var/www/html/rcomp/tmp/1bsdq1261336408.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/29lpq1261336408.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/3wknj1261336408.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/4y1bm1261336408.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/5kxdd1261336408.tab") > > try(system("convert tmp/1bsdq1261336408.ps tmp/1bsdq1261336408.png",intern=TRUE)) character(0) > try(system("convert tmp/29lpq1261336408.ps tmp/29lpq1261336408.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.529 0.284 0.636