R version 2.7.0 (2008-04-22) Copyright (C) 2008 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(267.850 + ,255.468 + ,246.717 + ,238.276 + ,229.336 + ,231.047 + ,264.440 + ,261.308 + ,257.844 + ,253.687 + ,248.286 + ,248.641 + ,243.753 + ,233.495 + ,222.356 + ,211.333 + ,202.478 + ,202.746 + ,238.802 + ,235.385 + ,224.820 + ,219.386 + ,213.106 + ,213.166 + ,208.201 + ,197.775 + ,189.191 + ,178.543 + ,171.809 + ,172.365 + ,204.140 + ,205.467 + ,193.079 + ,190.224 + ,185.553 + ,185.184 + ,183.059 + ,175.496 + ,168.120 + ,160.374 + ,155.290 + ,156.152 + ,189.784 + ,192.250 + ,184.896 + ,184.835 + ,180.172 + ,181.875 + ,182.412 + ,180.627 + ,174.303 + ,169.431 + ,163.902 + ,166.114 + ,198.414 + ,205.626 + ,199.333 + ,199.588 + ,196.569 + ,200.880 + ,201.579 + ,195.483 + ,190.617 + ,187.576 + ,183.968 + ,186.998 + ,216.617 + ,224.692 + ,222.476 + ,223.247 + ,225.618 + ,232.758 + ,235.868 + ,232.863 + ,227.564 + ,226.822 + ,223.864 + ,227.155 + ,260.300 + ,273.944 + ,270.779 + ,268.104 + ,268.703 + ,273.413 + ,275.597 + ,270.111 + ,262.272 + ,255.823 + ,250.753 + ,250.512 + ,277.888 + ,289.694 + ,281.310 + ,275.425 + ,271.287 + ,274.059 + ,274.113 + ,267.546 + ,257.622 + ,250.612 + ,243.829 + ,243.180 + ,275.362 + ,287.027 + ,279.175 + ,282.416 + ,275.424 + ,277.862 + ,284.998 + ,272.182 + ,258.613 + ,253.046 + ,243.315 + ,234.312 + ,265.912 + ,279.384 + ,262.547 + ,256.102 + ,251.133 + ,249.598 + ,251.592 + ,244.976 + ,237.527 + ,232.790 + ,224.726 + ,223.918 + ,252.637 + ,263.736 + ,251.143 + ,239.530 + ,232.401 + ,233.749 + ,232.055 + ,224.473 + ,215.866 + ,207.808 + ,199.440 + ,193.330 + ,222.787 + ,241.434 + ,221.263 + ,207.448 + ,200.241 + ,205.009 + ,206.230 + ,198.253 + ,194.660 + ,185.847 + ,180.314 + ,176.282 + ,203.541 + ,222.042 + ,197.519 + ,185.142 + ,176.355 + ,180.448 + ,180.143 + ,173.666 + ,165.687 + ,162.719 + ,157.079 + ,153.730 + ,182.698 + ,200.765 + ,176.512 + ,166.618 + ,158.644 + ,159.585 + ,163.095 + ,159.044 + ,155.511 + ,153.745 + ,150.569 + ,150.605 + ,179.612 + ,194.690 + ,189.917 + ,184.128 + ,175.335 + ,179.566 + ,181.140 + ,177.876 + ,175.041 + ,169.292 + ,166.070 + ,166.972 + ,206.348 + ,215.706 + ,202.108 + ,195.411 + ,193.111 + ,195.198 + ,198.770 + ,194.163 + ,190.420 + ,189.733 + ,186.029 + ,191.531 + ,232.571 + ,243.477 + ,227.247 + ,217.859 + ,208.679 + ,213.188 + ,216.234 + ,213.587 + ,209.465 + ,204.045 + ,200.237 + ,203.666 + ,241.476 + ,260.307 + ,243.324 + ,244.460 + ,233.575 + ,237.217 + ,235.243 + ,230.354 + ,227.184 + ,221.678 + ,217.142 + ,219.452 + ,256.446 + ,265.845 + ,248.624 + ,241.114 + ,229.245 + ,231.805 + ,219.277 + ,219.313 + ,212.610 + ,214.771 + ,211.142 + ,211.457 + ,240.048 + ,240.636 + ,230.580 + ,208.795 + ,197.922 + ,194.596 + ,194.581 + ,185.686 + ,178.106 + ,172.608 + ,167.302 + ,168.053 + ,202.300 + ,202.388 + ,182.516 + ,173.476 + ,166.444 + ,171.297) > 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] 252 > (np <- floor(n / par1)) [1] 21 > 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,] 267.850 243.753 208.201 183.059 182.412 201.579 235.868 275.597 274.113 [2,] 255.468 233.495 197.775 175.496 180.627 195.483 232.863 270.111 267.546 [3,] 246.717 222.356 189.191 168.120 174.303 190.617 227.564 262.272 257.622 [4,] 238.276 211.333 178.543 160.374 169.431 187.576 226.822 255.823 250.612 [5,] 229.336 202.478 171.809 155.290 163.902 183.968 223.864 250.753 243.829 [6,] 231.047 202.746 172.365 156.152 166.114 186.998 227.155 250.512 243.180 [7,] 264.440 238.802 204.140 189.784 198.414 216.617 260.300 277.888 275.362 [8,] 261.308 235.385 205.467 192.250 205.626 224.692 273.944 289.694 287.027 [9,] 257.844 224.820 193.079 184.896 199.333 222.476 270.779 281.310 279.175 [10,] 253.687 219.386 190.224 184.835 199.588 223.247 268.104 275.425 282.416 [11,] 248.286 213.106 185.553 180.172 196.569 225.618 268.703 271.287 275.424 [12,] 248.641 213.166 185.184 181.875 200.880 232.758 273.413 274.059 277.862 [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [1,] 284.998 251.592 232.055 206.230 180.143 163.095 181.140 198.770 216.234 [2,] 272.182 244.976 224.473 198.253 173.666 159.044 177.876 194.163 213.587 [3,] 258.613 237.527 215.866 194.660 165.687 155.511 175.041 190.420 209.465 [4,] 253.046 232.790 207.808 185.847 162.719 153.745 169.292 189.733 204.045 [5,] 243.315 224.726 199.440 180.314 157.079 150.569 166.070 186.029 200.237 [6,] 234.312 223.918 193.330 176.282 153.730 150.605 166.972 191.531 203.666 [7,] 265.912 252.637 222.787 203.541 182.698 179.612 206.348 232.571 241.476 [8,] 279.384 263.736 241.434 222.042 200.765 194.690 215.706 243.477 260.307 [9,] 262.547 251.143 221.263 197.519 176.512 189.917 202.108 227.247 243.324 [10,] 256.102 239.530 207.448 185.142 166.618 184.128 195.411 217.859 244.460 [11,] 251.133 232.401 200.241 176.355 158.644 175.335 193.111 208.679 233.575 [12,] 249.598 233.749 205.009 180.448 159.585 179.566 195.198 213.188 237.217 [,19] [,20] [,21] [1,] 235.243 219.277 194.581 [2,] 230.354 219.313 185.686 [3,] 227.184 212.610 178.106 [4,] 221.678 214.771 172.608 [5,] 217.142 211.142 167.302 [6,] 219.452 211.457 168.053 [7,] 256.446 240.048 202.300 [8,] 265.845 240.636 202.388 [9,] 248.624 230.580 182.516 [10,] 241.114 208.795 173.476 [11,] 229.245 197.922 166.444 [12,] 231.805 194.596 171.297 > 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] 250.2417 221.7355 190.1276 176.0252 186.4332 207.6358 249.1149 269.5609 [9] 267.8473 259.2618 240.7271 214.2628 192.2194 169.8205 169.6514 187.0228 [17] 207.8056 225.6327 235.3443 216.7622 180.3964 > arr.sd [1] 12.42636 13.82889 12.27348 12.94171 15.28346 18.22210 21.46131 12.30490 [9] 15.22233 14.69231 12.23674 14.49629 14.01620 13.54525 15.98973 16.55647 [17] 19.14127 20.01449 15.06683 14.48089 13.18457 > arr.range [1] 38.514 41.275 36.392 36.960 41.724 48.790 50.080 39.182 43.847 50.686 [11] 39.818 48.104 45.760 47.035 44.121 49.636 57.448 60.070 48.703 46.040 [21] 35.944 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean 14.043403 0.004975 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) 2.37186 0.06163 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean 40.00695 0.02435 > postscript(file="/var/www/html/rcomp/tmp/17uyp1228473617.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/2gfcd1228473617.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/3neab1228473617.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/45jmb1228473618.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/55j8i1228473618.tab") > > system("convert tmp/17uyp1228473617.ps tmp/17uyp1228473617.png") > system("convert tmp/2gfcd1228473617.ps tmp/2gfcd1228473617.png") > > > proc.time() user system elapsed 1.390 0.461 1.494