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(353.4 + ,329.08 + ,331.89 + ,339.94 + ,330.8 + ,361.26 + ,358.02 + ,356.15 + ,322.56 + ,306.1 + ,303.99 + ,322.23 + ,330.2 + ,343.91 + ,367.07 + ,375.22 + ,375.35 + ,389.81 + ,371.18 + ,387.18 + ,395.43 + ,387.86 + ,392.46 + ,375.11 + ,417.03 + ,408.79 + ,412.68 + ,403.67 + ,414.95 + ,415.35 + ,408.2 + ,424.19 + ,414.03 + ,417.8 + ,418.66 + ,431.35 + ,435.7 + ,438.78 + ,443.38 + ,451.67 + ,440.19 + ,450.23 + ,450.54 + ,448.13 + ,463.55 + ,458.93 + ,467.83 + ,461.93 + ,466.51 + ,481.6 + ,467.19 + ,445.66 + ,450.91 + ,456.5 + ,444.27 + ,458.28 + ,475.49 + ,462.69 + ,472.26 + ,453.55 + ,459.21 + ,470.42 + ,487.39 + ,500.7 + ,514.76 + ,533.4 + ,544.75 + ,562.06 + ,561.88 + ,584.41 + ,581.5 + ,605.37 + ,615.93 + ,636.02 + ,640.43 + ,645.5 + ,654.17 + ,669.12 + ,670.63 + ,639.95 + ,651.99 + ,687.31 + ,705.27 + ,757.02 + ,740.74 + ,786.16 + ,790.82 + ,757.12 + ,801.34 + ,848.28 + ,885.14 + ,954.29 + ,899.47 + ,947.28 + ,914.62 + ,955.4 + ,970.43 + ,980.28 + ,1049.34 + ,1101.75 + ,1111.75 + ,1090.82 + ,1133.84 + ,1120.67 + ,957.28 + ,1017.01 + ,1098.67 + ,1163.63 + ,1129.23 + ,1279.64 + ,1238.33 + ,1286.37 + ,1335.18 + ,1301.84 + ,1372.71 + ,1328.72 + ,1320.41 + ,1282.71 + ,1362.93 + ,1388.91 + ,1469.25 + ,1394.46 + ,1366.42 + ,1498.58 + ,1452.43 + ,1420.6 + ,1454.6 + ,1430.83 + ,1517.68 + ,1436.52 + ,1429.4 + ,1314.95 + ,1320.28 + ,1366.01 + ,1239.94 + ,1160.33 + ,1249.46 + ,1255.82 + ,1224.42 + ,1211.23 + ,1133.58 + ,1040.94 + ,1059.78 + ,1139.45 + ,1148.08 + ,1130.2 + ,1106.73 + ,1147.39 + ,1076.92 + ,1067.14 + ,989.82 + ,911.62 + ,916.07 + ,815.28 + ,885.76 + ,936.31 + ,879.82 + ,855.7 + ,841.15 + ,848.18 + ,916.92 + ,963.59 + ,974.5 + ,990.31 + ,1008.01 + ,995.97 + ,1050.71 + ,1058.2 + ,1111.92 + ,1131.13 + ,1144.94 + ,1113.89 + ,1107.3 + ,1120.68 + ,1140.84 + ,1101.72 + ,1104.24 + ,1114.58 + ,1130.2 + ,1173.78 + ,1211.92 + ,1181.27 + ,1203.6 + ,1180.59 + ,1156.85 + ,1191.5 + ,1191.33 + ,1234.18 + ,1220.33 + ,1228.81 + ,1207.01 + ,1249.48 + ,1248.29 + ,1280.08 + ,1280.66 + ,1302.88 + ,1310.61 + ,1270.05 + ,1270.06 + ,1278.53 + ,1303.8 + ,1335.83 + ,1377.76 + ,1400.63 + ,1418.03 + ,1437.9 + ,1406.8 + ,1420.83 + ,1482.37 + ,1530.63 + ,1504.66 + ,1455.18 + ,1473.96 + ,1527.29 + ,1545.79 + ,1479.63 + ,1467.97 + ,1378.6 + ,1330.45 + ,1326.41 + ,1385.97 + ,1399.62 + ,1276.69 + ,1269.42 + ,1287.83 + ,1164.17 + ,968.67 + ,888.61 + ,902.99 + ,823.09 + ,729.57 + ,793.59 + ,872.74 + ,923.26 + ,920.82 + ,990.22 + ,1019.52 + ,1054.91 + ,1036.18 + ,1098.89) > 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] 240 > (np <- floor(n / par1)) [1] 20 > 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] [1,] 353.40 330.20 417.03 435.70 466.51 459.21 615.93 740.74 970.43 1129.23 [2,] 329.08 343.91 408.79 438.78 481.60 470.42 636.02 786.16 980.28 1279.64 [3,] 331.89 367.07 412.68 443.38 467.19 487.39 640.43 790.82 1049.34 1238.33 [4,] 339.94 375.22 403.67 451.67 445.66 500.70 645.50 757.12 1101.75 1286.37 [5,] 330.80 375.35 414.95 440.19 450.91 514.76 654.17 801.34 1111.75 1335.18 [6,] 361.26 389.81 415.35 450.23 456.50 533.40 669.12 848.28 1090.82 1301.84 [7,] 358.02 371.18 408.20 450.54 444.27 544.75 670.63 885.14 1133.84 1372.71 [8,] 356.15 387.18 424.19 448.13 458.28 562.06 639.95 954.29 1120.67 1328.72 [9,] 322.56 395.43 414.03 463.55 475.49 561.88 651.99 899.47 957.28 1320.41 [10,] 306.10 387.86 417.80 458.93 462.69 584.41 687.31 947.28 1017.01 1282.71 [11,] 303.99 392.46 418.66 467.83 472.26 581.50 705.27 914.62 1098.67 1362.93 [12,] 322.23 375.11 431.35 461.93 453.55 605.37 757.02 955.40 1163.63 1388.91 [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [1,] 1469.25 1320.28 1148.08 879.82 1111.92 1211.92 1248.29 1418.03 1467.97 [2,] 1394.46 1366.01 1130.20 855.70 1131.13 1181.27 1280.08 1437.90 1378.60 [3,] 1366.42 1239.94 1106.73 841.15 1144.94 1203.60 1280.66 1406.80 1330.45 [4,] 1498.58 1160.33 1147.39 848.18 1113.89 1180.59 1302.88 1420.83 1326.41 [5,] 1452.43 1249.46 1076.92 916.92 1107.30 1156.85 1310.61 1482.37 1385.97 [6,] 1420.60 1255.82 1067.14 963.59 1120.68 1191.50 1270.05 1530.63 1399.62 [7,] 1454.60 1224.42 989.82 974.50 1140.84 1191.33 1270.06 1504.66 1276.69 [8,] 1430.83 1211.23 911.62 990.31 1101.72 1234.18 1278.53 1455.18 1269.42 [9,] 1517.68 1133.58 916.07 1008.01 1104.24 1220.33 1303.80 1473.96 1287.83 [10,] 1436.52 1040.94 815.28 995.97 1114.58 1228.81 1335.83 1527.29 1164.17 [11,] 1429.40 1059.78 885.76 1050.71 1130.20 1207.01 1377.76 1545.79 968.67 [12,] 1314.95 1139.45 936.31 1058.20 1173.78 1249.48 1400.63 1479.63 888.61 [,20] [1,] 902.99 [2,] 823.09 [3,] 729.57 [4,] 793.59 [5,] 872.74 [6,] 923.26 [7,] 920.82 [8,] 990.22 [9,] 1019.52 [10,] 1054.91 [11,] 1036.18 [12,] 1098.89 > 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] 334.6183 374.2317 415.5583 450.9050 461.2425 533.8208 664.4450 [8] 856.7217 1066.2892 1302.2483 1432.1433 1200.1033 1010.9433 948.5883 [15] 1124.6017 1204.7392 1304.9317 1473.5892 1262.0342 930.4817 > arr.sd [1] 19.551938 19.770292 7.342377 10.404641 11.801779 47.538320 [7] 37.872701 79.359740 69.514767 69.699690 55.316141 97.477106 [13] 115.667939 77.952030 20.886476 26.166322 45.725850 47.071785 [19] 174.546788 113.372113 > arr.range [1] 57.27 65.23 27.68 32.13 37.33 146.16 141.09 214.66 206.35 259.68 [11] 202.73 325.07 332.80 217.05 72.06 92.63 152.34 138.99 579.36 369.32 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean 5.77099 0.05621 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) -4.441 1.217 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean 8.0457 0.1912 > postscript(file="/var/www/html/rcomp/tmp/19zdi1260834303.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/215tn1260834303.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/39g851260834303.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/4ao511260834303.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/5o5xd1260834303.tab") > > try(system("convert tmp/19zdi1260834303.ps tmp/19zdi1260834303.png",intern=TRUE)) character(0) > try(system("convert tmp/215tn1260834303.ps tmp/215tn1260834303.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.517 0.278 0.722