R version 2.6.2 (2008-02-08) 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(113000,110000,107000,103000,98000,98000,137000,148000,147000,139000,130000,128000,127000,123000,118000,114000,108000,111000,151000,159000,158000,148000,138000,137000,136000,133000,126000,120000,114000,116000,153000,162000,161000,149000,139000,135000,130000,127000,122000,117000,112000,113000,149000,157000,157000,147000,137000,132000,125000,123000,117000,114000,111000,112000,144000,150000,149000,134000,123000,116000,117000,111000,105000,102000,95000,93000,124000,130000,124000,115000,106000,105000) > 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] 72 > (np <- floor(n / par1)) [1] 6 > 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] 6 6 6 6 6 6 6 6 6 6 6 6 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 113000 127000 136000 130000 125000 117000 NA [2,] 110000 123000 133000 127000 123000 111000 NA [3,] 107000 118000 126000 122000 117000 105000 NA [4,] 103000 114000 120000 117000 114000 102000 NA [5,] 98000 108000 114000 112000 111000 95000 NA [6,] 98000 111000 116000 113000 112000 93000 NA [7,] 137000 151000 153000 149000 144000 124000 NA [8,] 148000 159000 162000 157000 150000 130000 NA [9,] 147000 158000 161000 157000 149000 124000 NA [10,] 139000 148000 149000 147000 134000 115000 NA [11,] 130000 138000 139000 137000 123000 106000 NA [12,] 128000 137000 135000 132000 116000 105000 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/www/html/rcomp/tmp/1gfoe1211307299.ps",horizontal=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/www/html/rcomp/tmp/2i3cc1211307299.ps",horizontal=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/www/html/rcomp/tmp/3bdi71211307299.ps",horizontal=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/www/html/rcomp/tmp/4tbw01211307299.ps",horizontal=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] [,10] [1,] 113000 110000 105000 102000 95000 93000 124000 148000 147000 115000 [2,] 117000 111000 107000 103000 98000 98000 137000 148000 147000 134000 [3,] 126000 123000 117500 114000 109500 111500 146500 153500 153000 143000 [4,] 130000 127000 122000 117000 112000 113000 151000 159000 158000 148000 [5,] 136000 133000 126000 120000 114000 116000 153000 162000 161000 149000 [,11] [,12] [1,] 106000 105000 [2,] 123000 116000 [3,] 133500 130000 [4,] 138000 135000 [5,] 139000 137000 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 117614.6 112679.5 107824.5 104969.5 100469.5 101824.5 137469.5 146404.6 [2,] 134385.4 133320.5 127175.5 123030.5 118530.5 121175.5 155530.5 160595.4 [,9] [,10] [,11] [,12] [1,] 145904.6 133969.5 123824.5 117744.4 [2,] 160095.4 152030.5 143175.5 142255.6 $out [1] 130000 124000 $group [1] 8 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(113000, 117000, 126000, 130000, 136000, 110000, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5j1xd1211307299.ps",horizontal=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] [1,] 98000 108000 114000 112000 111000 93000 NA [2,] 105000 116000 123000 119500 115000 103500 NA [3,] 120500 132000 135500 131000 123000 108500 NA [4,] 138000 149500 151000 148000 139000 120500 NA [5,] 148000 159000 162000 157000 150000 130000 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 105448.5 116720.4 122729 118001.0 112053.4 100746.2 NA [2,] 135551.5 147279.6 148271 143999.0 133946.6 116253.8 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(98000, 105000, 120500, 138000, 148000, 108000, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6d0j81211307299.ps",horizontal=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,] 7447.595 18000 10000 [2,] 8367.148 22000 10375 [3,] 10130.885 26000 11500 [4,] 12618.234 32500 12250 [5,] 13544.987 37000 13000 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 8191.936 21210.88 10644.8 [2,] 12069.834 30789.12 12355.2 $out [1] 15250 $group [1] 3 $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(7447.5946900101, 8367.14758567257, 10130.8852596353, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1gfoe1211307299.ps tmp/1gfoe1211307299.png") > system("convert tmp/2i3cc1211307299.ps tmp/2i3cc1211307299.png") > system("convert tmp/3bdi71211307299.ps tmp/3bdi71211307299.png") > system("convert tmp/4tbw01211307299.ps tmp/4tbw01211307299.png") > system("convert tmp/5j1xd1211307299.ps tmp/5j1xd1211307299.png") > system("convert tmp/6d0j81211307299.ps tmp/6d0j81211307299.png") > > > proc.time() user system elapsed 1.316 0.898 1.954