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(21,19,25,21,23,23,19,18,19,19,22,23,20,14,14,14,15,11,17,16,20,24,23,20,21,19,23,23,23,23,27,26,17,24,26,24,27,27,26,24,23,23,24,17,21,19,22,22,18,16,14,12,14,16,8,3,0,5,1,1,3) > 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] 61 > (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] 6 5 5 5 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 21 20 21 27 18 3 [2,] 19 14 19 27 16 NA [3,] 25 14 23 26 14 NA [4,] 21 14 23 24 12 NA [5,] 23 15 23 23 14 NA [6,] 23 11 23 23 16 NA [7,] 19 17 27 24 8 NA [8,] 18 16 26 17 3 NA [9,] 19 20 17 21 0 NA [10,] 19 24 24 19 5 NA [11,] 22 23 26 22 1 NA [12,] 23 20 24 22 1 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/1w4ms1257586442.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/2m5sq1257586442.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/3t9fn1257586442.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/4dkzo1257586442.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,] 18.0 14 14 12 14 11 8 16 17 19 22 20 [2,] 18.0 16 14 14 15 16 17 16 17 19 22 20 [3,] 20.5 19 23 21 23 23 19 17 19 19 22 22 [4,] 21.0 19 25 23 23 23 24 18 20 24 23 23 [5,] 21.0 19 26 24 23 23 27 18 21 24 23 24 $n [1] 6 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 18.56490 16.88021 15.22743 14.64062 17.34722 18.05382 14.05382 15.58681 [2,] 22.43510 21.11979 30.77257 27.35938 28.65278 27.94618 23.94618 18.41319 [,9] [,10] [,11] [,12] [1,] 16.88021 15.46701 21.29340 19.88021 [2,] 21.11979 22.53299 22.70660 24.11979 $out [1] 27 3 27 26 3 0 5 26 1 1 $group [1] 1 1 2 8 8 9 10 11 11 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(18, 18, 20.5, 21, 21, 14, 16, 19, 19, 19, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5ncdq1257586442.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,] 18 11.0 19 17.0 0 3 [2,] 19 14.0 22 21.5 2 3 [3,] 21 16.5 23 23.0 10 3 [4,] 23 20.0 25 25.0 15 3 [5,] 25 24.0 27 27.0 18 3 $n [1] 12 12 12 12 12 1 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 19.17557 13.76336 21.63168 21.40363 4.070613 3 [2,] 22.82443 19.23664 24.36832 24.59637 15.929387 3 $out [1] 17 $group [1] 3 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(18, 19, 21, 23, 25, 11, 14, 16.5, 20, 24, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6wb971257586442.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,] 4.669047 9 1.00 [2,] 5.472612 12 2.75 [3,] 7.552695 19 4.00 [4,] 8.505730 23 7.50 [5,] 10.084642 25 11.00 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 6.169269 13.98283 1.833493 [2,] 8.936121 24.01717 6.166507 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(4.6690470119715, 5.47261165149456, 7.55269494573844, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1w4ms1257586442.ps tmp/1w4ms1257586442.png") > system("convert tmp/2m5sq1257586442.ps tmp/2m5sq1257586442.png") > system("convert tmp/3t9fn1257586442.ps tmp/3t9fn1257586442.png") > system("convert tmp/4dkzo1257586442.ps tmp/4dkzo1257586442.png") > system("convert tmp/5ncdq1257586442.ps tmp/5ncdq1257586442.png") > system("convert tmp/6wb971257586442.ps tmp/6wb971257586442.png") > > > proc.time() user system elapsed 1.072 0.839 2.301