R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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(181896,181580,181234,180598,187123,186807,181896,178638,178954,178954,179269,179936,181580,179616,181580,179936,185158,187469,177656,175025,177305,176989,175025,175345,179269,178638,179269,179269,183545,184176,172398,172398,176989,174709,170785,172398,176327,174363,174047,169803,176007,177305,164545,164229,170785,167176,160967,163598,166509,167176,165212,161287,169456,169456,155078,154101,158025,150838,143616,145932,150838,146910,144283,138710,146247,146563,132190,131839,134470,126301,117465,121043,125950,120728,120412,115154,123670,125319,109266,105688,107968,99132,89981,92928,98470,91946,92928,89004,97172,98150,78524,77221,80799,71333,62817,65764,72950,64462,63799,57244,64462,66742,46448,46448,49391,41542,32706,37297,45466,36631,40244,35333,43186,45813,24853,23240,26502,18649,12444,15040) > 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] 120 > (np <- floor(n / par1)) [1] 10 > arr <- array(NA,dim=c(par1,np+1)) > ari <- array(0,dim=par1) > j <- 0 > for (i in 1:n) + { + j = j + 1 + ari[j] = ari[j] + 1 + arr[j,ari[j]] <- x[i] + if (j == par1) j = 0 + } > ari [1] 10 10 10 10 10 10 10 10 10 10 10 10 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] 181896 181580 179269 176327 166509 150838 125950 98470 72950 45466 NA [2,] 181580 179616 178638 174363 167176 146910 120728 91946 64462 36631 NA [3,] 181234 181580 179269 174047 165212 144283 120412 92928 63799 40244 NA [4,] 180598 179936 179269 169803 161287 138710 115154 89004 57244 35333 NA [5,] 187123 185158 183545 176007 169456 146247 123670 97172 64462 43186 NA [6,] 186807 187469 184176 177305 169456 146563 125319 98150 66742 45813 NA [7,] 181896 177656 172398 164545 155078 132190 109266 78524 46448 24853 NA [8,] 178638 175025 172398 164229 154101 131839 105688 77221 46448 23240 NA [9,] 178954 177305 176989 170785 158025 134470 107968 80799 49391 26502 NA [10,] 178954 176989 174709 167176 150838 126301 99132 71333 41542 18649 NA [11,] 179269 175025 170785 160967 143616 117465 89981 62817 32706 12444 NA [12,] 179936 175345 172398 163598 145932 121043 92928 65764 37297 15040 NA > arr.sd <- array(NA,dim=par1) > arr.range <- array(NA,dim=par1) > arr.iqr <- array(NA,dim=par1) > for (j in 1:par1) + { + arr.sd[j] <- sqrt(var(arr[j,],na.rm=TRUE)) + arr.range[j] <- max(arr[j,],na.rm=TRUE) - min(arr[j,],na.rm=TRUE) + arr.iqr[j] <- quantile(arr[j,],0.75,na.rm=TRUE) - quantile(arr[j,],0.25,na.rm=TRUE) + } > overall.sd <- sqrt(var(x)) > overall.range <- max(x) - min(x) > overall.iqr <- quantile(x,0.75) - quantile(x,0.25) > postscript(file="/var/wessaorg/rcomp/tmp/1bmaq1313496854.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.sd,type='b',ylab='S.D.',main='Standard Deviation Plot',xlab='Periodic Index') > mtext(paste('# blocks = ',np)) > abline(overall.sd,0) > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/27jk81313496854.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.range,type='b',ylab='range',main='Range Plot',xlab='Periodic Index') > mtext(paste('# blocks = ',np)) > abline(overall.range,0) > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/3olt31313496854.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.iqr,type='b',ylab='IQR',main='Interquartile Range Plot',xlab='Periodic Index') > mtext(paste('# blocks = ',np)) > abline(overall.iqr,0) > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/4nvsl1313496854.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(t(arr)) > names(z) <- c(1:par1) > (boxplot(z,notch=TRUE,col='grey',xlab='Periodic Index',ylab='Value',main='Notched Box Plots - Periodic Subseries')) $stats [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 45466.0 36631 40244.0 35333.0 43186.0 45813.0 24853 23240 26502.0 [2,] 98470.0 91946 92928.0 89004.0 97172.0 98150.0 78524 77221 80799.0 [3,] 158673.5 157043 154747.5 149998.5 157851.5 158009.5 143634 142970 146247.5 [4,] 179269.0 178638 179269.0 179269.0 183545.0 184176.0 172398 172398 176989.0 [5,] 181896.0 181580 181580.0 180598.0 187123.0 187469.0 181896 178638 178954.0 [,10] [,11] [,12] [1,] 18649.0 12444.0 15040.0 [2,] 71333.0 62817.0 65764.0 [3,] 138569.5 130540.5 133487.5 [4,] 174709.0 170785.0 172398.0 [5,] 178954.0 179269.0 179936.0 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 118303.1 113728.2 111608.1 104898.5 114696.1 115027.5 96730.81 95415.78 [2,] 199043.9 200357.8 197886.9 195098.5 201006.9 200991.5 190537.19 190524.22 [,9] [,10] [,11] [,12] [1,] 98187.14 86918.73 76595.38 80208.9 [2,] 194307.86 190220.27 184485.62 186766.1 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(45466, 98470, 158673.5, 179269, 181896, 36631, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5ybdl1313496854.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(arr) > names(z) <- c(1:np) > (boxplot(z,notch=TRUE,col='grey',xlab='Block Index',ylab='Value',main='Notched Box Plots - Sequential Blocks')) $stats [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 178638.0 175025 170785.0 160967 143616.0 117465 89981 62817.0 32706.0 [2,] 179111.5 176167 172398.0 164387 152469.5 129070 102410 74277.0 43995.0 [3,] 180916.0 178636 177813.5 170294 159656.0 136590 112210 84901.5 53317.5 [4,] 181896.0 181580 179269.0 175185 166842.5 146405 122199 95050.0 64462.0 [5,] 181896.0 187469 184176.0 177305 169456.0 150838 125950 98470.0 72950.0 [,10] [,11] [1,] 12444.0 NA [2,] 20944.5 NA [3,] 30917.5 NA [4,] 41715.0 NA [5,] 45813.0 NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 179646 176167.1 174679.6 165369 153100.4 128683.4 103184.1 75426.8 [2,] 182186 181104.9 180947.4 175219 166211.6 144496.6 121235.9 94376.2 [,9] [,10] [,11] [1,] 43982.36 21443.94 NA [2,] 62652.64 40391.06 NA $out [1] 187123 186807 $group [1] 1 1 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(178638, 179111.5, 180916, 181896, 181896, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6evhn1313496854.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(cbind(arr.sd,arr.range,arr.iqr)) > names(z) <- list('S.D.','Range','IQR') > (boxplot(z,notch=TRUE,col='grey',ylab='Overall Variability',main='Notched Box Plots')) $stats [,1] [,2] [,3] [1,] 49975.05 136430.0 73193.50 [2,] 52898.18 142796.5 78014.25 [3,] 55492.32 148858.5 82793.12 [4,] 58456.32 158674.0 91194.88 [5,] 61842.11 166825.0 98722.50 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 52957.21 141616.7 76781.35 [2,] 58027.43 156100.3 88804.90 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(49975.0530926292, 52898.1754044316, 55492.3206370967, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1bmaq1313496854.ps tmp/1bmaq1313496854.png",intern=TRUE)) character(0) > try(system("convert tmp/27jk81313496854.ps tmp/27jk81313496854.png",intern=TRUE)) character(0) > try(system("convert tmp/3olt31313496854.ps tmp/3olt31313496854.png",intern=TRUE)) character(0) > try(system("convert tmp/4nvsl1313496854.ps tmp/4nvsl1313496854.png",intern=TRUE)) character(0) > try(system("convert tmp/5ybdl1313496854.ps tmp/5ybdl1313496854.png",intern=TRUE)) character(0) > try(system("convert tmp/6evhn1313496854.ps tmp/6evhn1313496854.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.448 0.279 1.728