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(18.3,15.3,18.6,18.2,16.1,13.1,16.5,16.5,14.7,12.1,15.7,15.7,14,11.7,15.2,15.6,14.3,12.5,16.6,18.1,18.5,17.6,22.6,23.9,23.2,20.6,24.2,24.5,22.9,20.4,23.9,24.1,22.3,19.5,23.3,23.4,21.8,19.8,23.3,23.2,21.2,19,23.8,24.3,23.1,21.6,22.2,17.4,15.6,14.5,20.3,16.1,14.1,15.3,17.8,19.6,17.8,15.7,18.9,18.4,20.8,19,24.5,22.6,19.6,17.5,25,22.3,20.5,19.9,23.4,22.1,20,18.9,23,20,18.6,19.2,20.3,17.8) > par1 = '4' > #'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] 80 > (np <- floor(n / par1)) [1] 20 > 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] 20 20 20 20 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 18.3 16.1 14.7 14.0 14.3 18.5 23.2 22.9 22.3 21.8 21.2 23.1 15.6 14.1 [2,] 15.3 13.1 12.1 11.7 12.5 17.6 20.6 20.4 19.5 19.8 19.0 21.6 14.5 15.3 [3,] 18.6 16.5 15.7 15.2 16.6 22.6 24.2 23.9 23.3 23.3 23.8 22.2 20.3 17.8 [4,] 18.2 16.5 15.7 15.6 18.1 23.9 24.5 24.1 23.4 23.2 24.3 17.4 16.1 19.6 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 17.8 20.8 19.6 20.5 20.0 18.6 NA [2,] 15.7 19.0 17.5 19.9 18.9 19.2 NA [3,] 18.9 24.5 25.0 23.4 23.0 20.3 NA [4,] 18.4 22.6 22.3 22.1 20.0 17.8 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/1h0ej1210599649.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/2v3yx1210599649.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/3mf3r1210599649.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/4hj391210599649.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] [1,] 14.00 11.70 15.2 15.6 [2,] 15.85 14.90 18.2 17.6 [3,] 19.10 18.25 22.4 19.8 [4,] 21.50 19.65 23.6 23.3 [5,] 23.20 21.60 25.0 24.5 $n [1] 20 20 20 20 $conf [,1] [,2] [,3] [,4] [1,] 17.10386 16.57183 20.49219 17.78620 [2,] 21.09614 19.92817 24.30781 21.81380 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" Warning message: In bxp(list(stats = c(14, 15.85, 19.1, 21.5, 23.2, 11.7, 14.9, 18.25, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/50g721210599649.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] [,8] [,9] [,10] [,11] [,12] [1,] 15.30 13.1 12.1 11.70 12.50 17.60 20.60 20.40 19.50 19.80 19.00 17.40 [2,] 16.75 14.6 13.4 12.85 13.40 18.05 21.90 21.65 20.90 20.80 20.10 19.50 [3,] 18.25 16.3 15.2 14.60 15.45 20.55 23.70 23.40 22.80 22.50 22.50 21.90 [4,] 18.45 16.5 15.7 15.40 17.35 23.25 24.35 24.00 23.35 23.25 24.05 22.65 [5,] 18.60 16.5 15.7 15.60 18.10 23.90 24.50 24.10 23.40 23.30 24.30 23.10 [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 14.50 14.10 15.70 19.00 17.50 19.90 18.90 17.80 NA [2,] 15.05 14.70 16.75 19.90 18.55 20.20 19.45 18.20 NA [3,] 15.85 16.55 18.10 21.70 20.95 21.30 20.00 18.90 NA [4,] 18.20 18.70 18.65 23.55 23.65 22.75 21.50 19.75 NA [5,] 20.30 19.60 18.90 24.50 25.00 23.40 23.00 20.30 NA $n [1] 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 16.907 14.799 13.383 12.5855 12.3295 16.442 21.7645 21.5435 20.8645 [2,] 19.593 17.801 17.017 16.6145 18.5705 24.658 25.6355 25.2565 24.7355 [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [1,] 20.5645 19.3795 19.4115 13.3615 13.39 16.599 18.8165 16.921 19.2855 [2,] 24.4355 25.6205 24.3885 18.3385 19.71 19.601 24.5835 24.979 23.3145 [,19] [,20] [,21] [1,] 18.3805 17.6755 NA [2,] 21.6195 20.1245 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" [16] "16" "17" "18" "19" "20" NA Warning message: In bxp(list(stats = c(15.3, 16.75, 18.25, 18.45, 18.6, 13.1, 14.6, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6runa1210599649.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,] 3.128881 8.90 4.4750 [2,] 3.152397 9.05 4.7875 [3,] 3.188852 9.50 5.2375 [4,] 3.230271 9.85 5.4625 [5,] 3.258749 9.90 5.5500 $n [1] 4 4 4 $conf [,1] [,2] [,3] [1,] 3.127332 8.868 4.70425 [2,] 3.250373 10.132 5.77075 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(3.12888074826161, 3.15239669064518, 3.18885244714016, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1h0ej1210599649.ps tmp/1h0ej1210599649.png") > system("convert tmp/2v3yx1210599649.ps tmp/2v3yx1210599649.png") > system("convert tmp/3mf3r1210599649.ps tmp/3mf3r1210599649.png") > system("convert tmp/4hj391210599649.ps tmp/4hj391210599649.png") > system("convert tmp/50g721210599649.ps tmp/50g721210599649.png") > system("convert tmp/6runa1210599649.ps tmp/6runa1210599649.png") > > > proc.time() user system elapsed 1.28 0.82 1.61