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(90.2 + ,90 + ,88.8 + ,85.8 + ,84.2 + ,80 + ,77.8 + ,76.8 + ,86.4 + ,89.2 + ,86.2 + ,84.6 + ,83.2 + ,83.2 + ,82.6 + ,79.8 + ,77.2 + ,74.8 + ,73 + ,73 + ,83.6 + ,85.6 + ,84.8 + ,84.2 + ,83.4 + ,84.6 + ,84.6 + ,83.8 + ,81.2 + ,79.6 + ,78 + ,78.2 + ,88.8 + ,92 + ,91 + ,91.2 + ,90.4 + ,91.8 + ,92.2 + ,90.2 + ,88.6 + ,87.8 + ,86 + ,87.2 + ,97.6 + ,101.2 + ,100.4 + ,100.2 + ,100.2 + ,103 + ,104.2 + ,104 + ,102.4 + ,101.8 + ,101 + ,102.2 + ,114 + ,118.4 + ,118.8 + ,117.2 + ,117.2 + ,118.4 + ,118.8 + ,117.2 + ,114.4 + ,112.6 + ,111 + ,110.8 + ,120.2 + ,124.4 + ,123.4 + ,121.2 + ,119 + ,119.8 + ,120 + ,118.4 + ,115 + ,113.4 + ,111 + ,111 + ,121.6 + ,126.2 + ,125.8 + ,124.8 + ,122 + ,123.2 + ,124.2 + ,120.8 + ,116.8 + ,114.8 + ,111 + ,109 + ,119.8 + ,124 + ,121.6 + ,118 + ,115.8 + ,116 + ,115.8 + ,114.4 + ,112 + ,110.2 + ,107.4 + ,108.2 + ,117.6 + ,121.4 + ,119.8 + ,115.6 + ,112.6 + ,113.2 + ,112.2 + ,110.8 + ,108 + ,105.2 + ,102.4 + ,101 + ,110.8 + ,116.8 + ,113.8 + ,108 + ,104.4 + ,105.2 + ,105.4 + ,103.2 + ,100.6 + ,97.8 + ,95.8 + ,95 + ,104.8 + ,110.4 + ,106.4 + ,102.2 + ,98.4 + ,98.4 + ,98.6 + ,96.2 + ,92.4 + ,91.4 + ,88.4 + ,87.8 + ,97.6 + ,104.2 + ,100.2 + ,97 + ,92.8 + ,92 + ,93.4 + ,92 + ,89.6 + ,88.6 + ,87.2 + ,86.2 + ,96.8 + ,102 + ,102.6 + ,100.6 + ,94.2 + ,94.2 + ,95.2 + ,95 + ,94 + ,92.2 + ,91 + ,91.2 + ,103.4 + ,105 + ,104.6 + ,103.8 + ,101.8 + ,102.4 + ,103.8 + ,103.4 + ,102 + ,101.8 + ,100.2 + ,101.4 + ,113.8 + ,116 + ,115.6 + ,113 + ,109.4 + ,111 + ,112.4 + ,112.2 + ,111 + ,108.8 + ,107.4 + ,108.6 + ,118.8 + ,122.2 + ,122.6 + ,122.2 + ,118.8 + ,119 + ,118.2 + ,117.8 + ,116.8 + ,114.6 + ,113.4 + ,113.8 + ,124.2 + ,125.8 + ,125.6 + ,122.4 + ,119 + ,119.4 + ,118.6 + ,118 + ,116 + ,114.8 + ,114.6 + ,114.6 + ,124 + ,125.2 + ,124 + ,117.6 + ,113.2 + ,111.4 + ,112.2 + ,109.8 + ,106.4 + ,105.2 + ,102.2 + ,99.8 + ,111 + ,113 + ,108.4 + ,105.4 + ,102 + ,102.8 + ,103.4 + ,101.6 + ,98.6 + ,98 + ,93.8 + ,95.6 + ,105.6 + ,106.8 + ,103.6 + ,101.2 + ,100.4 + ,103.2 + ,105.6 + ,106.6 + ,107.2 + ,107.4 + ,104.8 + ,107.2 + ,117.4 + ,119.4 + ,116.2 + ,112.8 + ,111.6) > 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] 253 > (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] [,10] [,11] [,12] [1,] 90.2 83.2 83.4 90.4 100.2 117.2 119.0 122.0 115.8 112.6 104.4 98.4 [2,] 90.0 83.2 84.6 91.8 103.0 118.4 119.8 123.2 116.0 113.2 105.2 98.4 [3,] 88.8 82.6 84.6 92.2 104.2 118.8 120.0 124.2 115.8 112.2 105.4 98.6 [4,] 85.8 79.8 83.8 90.2 104.0 117.2 118.4 120.8 114.4 110.8 103.2 96.2 [5,] 84.2 77.2 81.2 88.6 102.4 114.4 115.0 116.8 112.0 108.0 100.6 92.4 [6,] 80.0 74.8 79.6 87.8 101.8 112.6 113.4 114.8 110.2 105.2 97.8 91.4 [7,] 77.8 73.0 78.0 86.0 101.0 111.0 111.0 111.0 107.4 102.4 95.8 88.4 [8,] 76.8 73.0 78.2 87.2 102.2 110.8 111.0 109.0 108.2 101.0 95.0 87.8 [9,] 86.4 83.6 88.8 97.6 114.0 120.2 121.6 119.8 117.6 110.8 104.8 97.6 [10,] 89.2 85.6 92.0 101.2 118.4 124.4 126.2 124.0 121.4 116.8 110.4 104.2 [11,] 86.2 84.8 91.0 100.4 118.8 123.4 125.8 121.6 119.8 113.8 106.4 100.2 [12,] 84.6 84.2 91.2 100.2 117.2 121.2 124.8 118.0 115.6 108.0 102.2 97.0 [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 92.8 94.2 101.8 109.4 118.8 119.0 113.2 102.0 100.4 [2,] 92.0 94.2 102.4 111.0 119.0 119.4 111.4 102.8 103.2 [3,] 93.4 95.2 103.8 112.4 118.2 118.6 112.2 103.4 105.6 [4,] 92.0 95.0 103.4 112.2 117.8 118.0 109.8 101.6 106.6 [5,] 89.6 94.0 102.0 111.0 116.8 116.0 106.4 98.6 107.2 [6,] 88.6 92.2 101.8 108.8 114.6 114.8 105.2 98.0 107.4 [7,] 87.2 91.0 100.2 107.4 113.4 114.6 102.2 93.8 104.8 [8,] 86.2 91.2 101.4 108.6 113.8 114.6 99.8 95.6 107.2 [9,] 96.8 103.4 113.8 118.8 124.2 124.0 111.0 105.6 117.4 [10,] 102.0 105.0 116.0 122.2 125.8 125.2 113.0 106.8 119.4 [11,] 102.6 104.6 115.6 122.6 125.6 124.0 108.4 103.6 116.2 [12,] 100.6 103.8 113.0 122.2 122.4 117.6 105.4 101.2 112.8 > 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] 85.00000 80.41667 84.70000 92.80000 107.26667 117.46667 118.83333 [8] 118.76667 114.51667 109.56667 102.60000 95.88333 93.65000 96.98333 [15] 106.26667 113.88333 119.20000 118.81667 108.16667 101.08333 109.01667 > arr.sd [1] 4.602766 4.700838 5.044889 5.561556 7.432769 4.540992 5.355597 5.010413 [9] 4.337958 4.780136 4.567872 4.914882 5.667210 5.506663 6.265248 5.846807 [17] 4.396693 3.774034 4.383302 3.903805 6.004519 > arr.range [1] 13.4 12.6 14.0 15.2 18.6 13.6 15.2 15.2 14.0 15.8 15.4 16.4 16.4 14.0 15.8 [16] 15.2 12.4 10.6 13.4 13.0 19.0 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean 5.561254 -0.004641 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) 2.0809 -0.1011 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean 14.7674764 -0.0004178 > postscript(file="/var/www/html/rcomp/tmp/1mohc1261298275.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/25ahj1261298275.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/3yzaa1261298275.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/484wg1261298275.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/5r8nh1261298275.tab") > > try(system("convert tmp/1mohc1261298275.ps tmp/1mohc1261298275.png",intern=TRUE)) character(0) > try(system("convert tmp/25ahj1261298275.ps tmp/25ahj1261298275.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.530 0.289 8.625