R version 2.8.0 (2008-10-20) 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(128.7,136.9,156.9,109.1,122.3,123.9,90.9,77.9,120.3,118.9,125.5,98.9,102.9,105.9,117.6,113.6,115.9,118.9,77.6,81.2,123.1,136.6,112.1,95.1,96.3,105.7,115.8,105.7,105.7,111.1,82.4,60,107.3,99.3,113.5,108.9,100.2,103.9,138.7,120.2,100.2,143.2,70.9,85.2,133,136.6,117.9,106.3,122.3,125.5,148.4,126.3,99.6,140.4,80.3,92.6,138.5,110.9,119.6,105) > 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] 60 > (np <- floor(n / par1)) [1] 5 > 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] 5 5 5 5 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 128.7 102.9 96.3 100.2 122.3 NA [2,] 136.9 105.9 105.7 103.9 125.5 NA [3,] 156.9 117.6 115.8 138.7 148.4 NA [4,] 109.1 113.6 105.7 120.2 126.3 NA [5,] 122.3 115.9 105.7 100.2 99.6 NA [6,] 123.9 118.9 111.1 143.2 140.4 NA [7,] 90.9 77.6 82.4 70.9 80.3 NA [8,] 77.9 81.2 60.0 85.2 92.6 NA [9,] 120.3 123.1 107.3 133.0 138.5 NA [10,] 118.9 136.6 99.3 136.6 110.9 NA [11,] 125.5 112.1 113.5 117.9 119.6 NA [12,] 98.9 95.1 108.9 106.3 105.0 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/freestat/rcomp/tmp/1p8ti1257954944.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/freestat/rcomp/tmp/255jb1257954944.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/freestat/rcomp/tmp/3ox6p1257954944.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/freestat/rcomp/tmp/4r29y1257954944.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] [,11] [,12] [1,] 96.3 103.9 115.8 105.7 99.6 111.1 70.9 77.9 107.3 99.3 112.1 95.1 [2,] 100.2 105.7 117.6 109.1 100.2 118.9 77.6 77.9 120.3 110.9 113.5 98.9 [3,] 102.9 105.9 138.7 113.6 105.7 123.9 80.3 81.2 123.1 118.9 117.9 105.0 [4,] 122.3 125.5 148.4 120.2 115.9 140.4 82.4 85.2 133.0 136.6 119.6 106.3 [5,] 128.7 136.9 156.9 126.3 122.3 143.2 82.4 92.6 138.5 136.6 125.5 108.9 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 87.2842 91.90937 116.9368 105.7568 94.60642 108.7082 76.90833 76.04184 [2,] 118.5158 119.89063 160.4632 121.4432 116.79358 139.0918 83.69167 86.35816 [,9] [,10] [,11] [,12] [1,] 114.1262 100.7404 113.5898 99.77118 [2,] 132.0738 137.0596 122.2102 110.22882 $out [1] 90.9 60.0 $group [1] 7 8 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(96.3, 100.2, 102.9, 122.3, 128.7, 103.9, 105.7, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/5hl3t1257954944.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] [1,] 77.9 77.60 82.4 70.9 80.30 NA [2,] 104.0 99.00 97.8 100.2 102.30 NA [3,] 121.3 112.85 105.7 112.1 120.95 NA [4,] 127.1 118.25 110.0 134.8 132.40 NA [5,] 156.9 136.60 115.8 143.2 148.40 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 110.7639 104.0699 100.1355 96.3187 107.2212 NA [2,] 131.8361 121.6301 111.2645 127.8813 134.6788 NA $out [1] 60 $group [1] 3 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(77.9, 104, 121.3, 127.1, 156.9, 77.6, 99, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/6ut661257954944.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,] 5.326537 13.40 4.80 [2,] 7.811284 20.30 7.35 [3,] 12.110905 31.65 14.20 [4,] 14.643569 32.80 21.80 [5,] 18.324219 41.10 30.80 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 8.994654 25.94867 7.609258 [2,] 15.227156 37.35133 20.790742 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(5.32653733676955, 7.811284347012, 12.1109051379706, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > system("convert tmp/1p8ti1257954944.ps tmp/1p8ti1257954944.png") > system("convert tmp/255jb1257954944.ps tmp/255jb1257954944.png") > system("convert tmp/3ox6p1257954944.ps tmp/3ox6p1257954944.png") > system("convert tmp/4r29y1257954944.ps tmp/4r29y1257954944.png") > system("convert tmp/5hl3t1257954944.ps tmp/5hl3t1257954944.png") > system("convert tmp/6ut661257954944.ps tmp/6ut661257954944.png") > > > proc.time() user system elapsed 1.671 1.307 2.214