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(897262 + ,1133132 + ,1384548 + ,2324057 + ,2502808 + ,2516762 + ,5579822 + ,4945991 + ,2019915 + ,1830905 + ,1251016 + ,949902 + ,923000 + ,1215747 + ,1479112 + ,2371781 + ,2521576 + ,2350559 + ,5673323 + ,4414295 + ,2016902 + ,1958302 + ,1284086 + ,1186305 + ,957833 + ,1255719 + ,1482709 + ,2361136 + ,2508100 + ,2254488 + ,5669953 + ,4227480 + ,2067790 + ,1958419 + ,1318158 + ,1287921 + ,1076982 + ,1293669 + ,1582053 + ,2393005 + ,2310531 + ,2597899 + ,5507587 + ,4194133 + ,2185092 + ,2122018 + ,1413348 + ,1338342 + ,1052655 + ,1370046 + ,1887027 + ,2448017 + ,2550796 + ,2655837 + ,5269499 + ,4247405 + ,2109722 + ,2143145 + ,1582013 + ,1413221 + ,1118520 + ,1478655 + ,2000108 + ,2085234 + ,2651805 + ,2522176 + ,5170142 + ,4150129 + ,2104254 + ,2211398 + ,1505900 + ,1524305 + ,1093144 + ,1449647 + ,1771197 + ,2445932 + ,2678945 + ,2400737 + ,4796880 + ,4118001 + ,2125714 + ,2125515 + ,1508760 + ,1508765 + ,1091075 + ,1514814 + ,1748997 + ,2424406 + ,2747942 + ,2377332 + ,5210706 + ,3882821 + ,2197469 + ,2271155 + ,1618917 + ,1391579 + ,1143249 + ,1445785 + ,1870242 + ,2597788 + ,2436231 + ,2684184 + ,4705109 + ,4331347 + ,2369192 + ,2283947 + ,1749607 + ,1598601 + ,1221234 + ,1497778 + ,1823567 + ,2489908 + ,2532837 + ,2456065 + ,4627018 + ,4276894 + ,2314950 + ,2238987 + ,1652753 + ,1561968 + ,1115878 + ,1596714 + ,1910242 + ,2286450 + ,2772441 + ,2394538 + ,4715128 + ,4402420 + ,2325392 + ,2306683 + ,1725282 + ,1541370 + ,1168142 + ,1457835 + ,1816380 + ,2446552 + ,2575774 + ,2537852 + ,4728097 + ,4372685 + ,2302672 + ,2346402 + ,1689915 + ,1576183) > par20 = '' > par19 = '' > par18 = '' > par17 = '' > par16 = '' > par15 = '' > par14 = '' > par13 = '' > par12 = '' > par11 = '' > par10 = '' > par9 = '' > par8 = '' > par7 = '' > par6 = '' > par5 = '' > par4 = '' > par3 = '' > par2 = '' > par1 = '12' > ylab = '' > xlab = '' > main = '' > #'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] 144 > (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] [1,] 897262 923000 957833 1076982 1052655 1118520 1093144 1091075 1143249 [2,] 1133132 1215747 1255719 1293669 1370046 1478655 1449647 1514814 1445785 [3,] 1384548 1479112 1482709 1582053 1887027 2000108 1771197 1748997 1870242 [4,] 2324057 2371781 2361136 2393005 2448017 2085234 2445932 2424406 2597788 [5,] 2502808 2521576 2508100 2310531 2550796 2651805 2678945 2747942 2436231 [6,] 2516762 2350559 2254488 2597899 2655837 2522176 2400737 2377332 2684184 [7,] 5579822 5673323 5669953 5507587 5269499 5170142 4796880 5210706 4705109 [8,] 4945991 4414295 4227480 4194133 4247405 4150129 4118001 3882821 4331347 [9,] 2019915 2016902 2067790 2185092 2109722 2104254 2125714 2197469 2369192 [10,] 1830905 1958302 1958419 2122018 2143145 2211398 2125515 2271155 2283947 [11,] 1251016 1284086 1318158 1413348 1582013 1505900 1508760 1618917 1749607 [12,] 949902 1186305 1287921 1338342 1413221 1524305 1508765 1391579 1598601 [,10] [,11] [,12] [1,] 1221234 1115878 1168142 [2,] 1497778 1596714 1457835 [3,] 1823567 1910242 1816380 [4,] 2489908 2286450 2446552 [5,] 2532837 2772441 2575774 [6,] 2456065 2394538 2537852 [7,] 4627018 4715128 4728097 [8,] 4276894 4402420 4372685 [9,] 2314950 2325392 2302672 [10,] 2238987 2306683 2346402 [11,] 1652753 1725282 1689915 [12,] 1561968 1541370 1576183 > 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] 2278010 2282916 2279142 2334555 2394115 2376886 2335270 2373101 2434607 [10] 2391163 2424378 2418207 > arr.sd [1] 1514486 1417993 1376242 1305209 1231015 1177359 1106667 1160626 1087144 [10] 1059154 1097720 1099612 > arr.range [1] 4682560 4750323 4712120 4430605 4216844 4051622 3703736 4119631 3561860 [10] 3405784 3599250 3559955 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean 6.594e+06 -2.277e+00 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) 76.311 -4.246 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean 2.156e+07 -7.412e+00 > postscript(file="/var/www/html/rcomp/tmp/1ixjm1261215175.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/2f0ly1261215175.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/320va1261215176.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/48zt31261215176.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/5s29u1261215176.tab") > try(system("convert tmp/1ixjm1261215175.ps tmp/1ixjm1261215175.png",intern=TRUE)) character(0) > try(system("convert tmp/2f0ly1261215175.ps tmp/2f0ly1261215175.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.518 0.288 0.657