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(18,16,19,18,23,20,20,15,17,16,15,10,13,10,19,21,17,16,17,14,18,17,14,15,16,11,15,13,17,16,9,17,15,12,12,12,12,4,7,4,3,3,0,5,3,4,3,10,4,1,1,8,5,4,0,2,7,6,9,10) > 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,] 18 13 16 12 4 NA [2,] 16 10 11 4 1 NA [3,] 19 19 15 7 1 NA [4,] 18 21 13 4 8 NA [5,] 23 17 17 3 5 NA [6,] 20 16 16 3 4 NA [7,] 20 17 9 0 0 NA [8,] 15 14 17 5 2 NA [9,] 17 18 15 3 7 NA [10,] 16 17 12 4 6 NA [11,] 15 14 12 3 9 NA [12,] 10 15 12 10 10 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/1qzq61258126052.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/295xk1258126052.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/3k24d1258126052.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/4lj321258126052.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,] 12 1 1 4 3 3 0 2 3 4 3 10 [2,] 12 4 7 8 5 4 0 5 7 6 9 10 [3,] 13 10 15 13 17 16 9 14 15 12 12 10 [4,] 16 11 19 18 17 16 17 15 17 16 14 12 [5,] 18 16 19 21 23 20 20 17 18 17 15 15 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 10.17361 5.053818 6.52083 5.934025 8.52083 7.52083 -3.012157 [2,] 15.82639 14.946182 23.47917 20.065975 25.47917 24.47917 21.012157 [,8] [,9] [,10] [,11] [,12] [1,] 6.934025 7.934025 4.934025 8.467013 8.586805 [2,] 21.065975 22.065975 19.065975 15.532987 11.413195 $out [1] 4 $group [1] 1 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(12, 12, 13, 16, 18, 1, 4, 10, 11, 16, 1, 7, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5liud1258126052.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.0 10.0 9 0 0.0 NA [2,] 15.5 14.0 12 3 1.5 NA [3,] 17.5 16.5 14 4 4.5 NA [4,] 19.5 17.5 16 6 7.5 NA [5,] 23.0 21.0 17 10 10.0 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 15.67557 14.90363 12.17557 2.63168 1.763360 NA [2,] 19.32443 18.09637 15.82443 5.36832 7.236640 NA $out [1] 12 $group [1] 4 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(10, 15.5, 17.5, 19.5, 23, 10, 14, 16.5, 17.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6omah1258126052.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.827007 12.0 2 [2,] 5.598758 13.5 6 [3,] 6.644537 15.0 10 [4,] 7.854354 17.5 12 [5,] 9.311283 20.0 17 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 5.615744 13.17557 7.26336 [2,] 7.673330 16.82443 12.73664 $out [1] 2.190890 5.000000 $group [1] 1 2 $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(4.82700735445887, 5.5987575204224, 6.64453704881415, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1qzq61258126052.ps tmp/1qzq61258126052.png") > system("convert tmp/295xk1258126052.ps tmp/295xk1258126052.png") > system("convert tmp/3k24d1258126052.ps tmp/3k24d1258126052.png") > system("convert tmp/4lj321258126052.ps tmp/4lj321258126052.png") > system("convert tmp/5liud1258126052.ps tmp/5liud1258126052.png") > system("convert tmp/6omah1258126052.ps tmp/6omah1258126052.png") > > > proc.time() user system elapsed 1.068 0.822 1.318