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(10,15,12,13,12,15,13,13,16,14,12,15,14,19,16,16,11,13,12,11,6,9,6,15,17,13,12,13,10,14,13,10,11,12,7,11,9,13,12,5,13,11,8,8,8,8,0,3,0,-1,-1,-4,1,-1,0,-1,6,0,-3,-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] 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,] 10 14 17 9 0 NA [2,] 15 19 13 13 -1 NA [3,] 12 16 12 12 -1 NA [4,] 13 16 13 5 -4 NA [5,] 12 11 10 13 1 NA [6,] 15 13 14 11 -1 NA [7,] 13 12 13 8 0 NA [8,] 13 11 10 8 -1 NA [9,] 16 6 11 8 6 NA [10,] 14 9 12 8 0 NA [11,] 12 6 7 0 -3 NA [12,] 15 15 11 3 -3 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/14xza1263155318.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/20s0p1263155319.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/3lokl1263155319.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/4iy1m1263155319.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,] 9 13 12 -4 10 11 8 8 6 8 -3 -3 [2,] 9 13 12 5 10 11 8 8 6 8 0 3 [3,] 10 13 12 13 11 13 12 10 8 9 6 11 [4,] 14 15 12 13 12 14 13 11 11 12 7 15 [5,] 17 15 12 16 13 15 13 13 16 14 12 15 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 6.467013 11.58681 12 7.34722 9.586805 10.88021 8.467013 7.880208 [2,] 13.532987 14.41319 12 18.65278 12.413195 15.11979 15.532987 12.119792 [,9] [,10] [,11] [,12] [1,] 4.467013 6.17361 1.053818 2.52083 [2,] 11.532987 11.82639 10.946182 19.47917 $out [1] 0 19 -1 16 -1 1 -1 0 -1 0 $group [1] 1 2 2 3 3 5 6 7 8 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(9, 9, 10, 14, 17, 13, 13, 13, 15, 15, 12, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5p6891263155319.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,] 10 6.0 7.0 0.0 -4 NA [2,] 12 10.0 10.5 6.5 -2 NA [3,] 13 12.5 12.0 8.0 -1 NA [4,] 15 15.5 13.0 11.5 0 NA [5,] 16 19.0 14.0 13.0 1 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 11.63168 9.991413 10.85973 5.719466 -1.91221343 NA [2,] 14.36832 15.008587 13.14027 10.280534 -0.08778657 NA $out [1] 17 6 $group [1] 3 5 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(10, 12, 13, 15, 16, 6, 10, 12.5, 15.5, 19, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6uswp1263155319.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.219005 10.0 0.0 [2,] 5.408167 13.5 2.5 [3,] 6.191715 15.5 4.5 [4,] 7.052620 17.5 6.0 [5,] 8.142481 20.0 8.0 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 5.441669 13.67557 2.903627 [2,] 6.941761 17.32443 6.096373 $out [1] 12 $group [1] 3 $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(4.2190046219458, 5.40816689168749, 6.19171483718387, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/14xza1263155318.ps tmp/14xza1263155318.png",intern=TRUE)) character(0) > try(system("convert tmp/20s0p1263155319.ps tmp/20s0p1263155319.png",intern=TRUE)) character(0) > try(system("convert tmp/3lokl1263155319.ps tmp/3lokl1263155319.png",intern=TRUE)) character(0) > try(system("convert tmp/4iy1m1263155319.ps tmp/4iy1m1263155319.png",intern=TRUE)) character(0) > try(system("convert tmp/5p6891263155319.ps tmp/5p6891263155319.png",intern=TRUE)) character(0) > try(system("convert tmp/6uswp1263155319.ps tmp/6uswp1263155319.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.025 0.781 1.437