R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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(7.6,7.4,7.3,7.1,6.9,6.8,7.5,7.6,7.8,8,8.1,8.2,8.3,8.2,8,7.9,7.6,7.6,8.3,8.4,8.4,8.4,8.4,8.6,8.9,8.8,8.3,7.5,7.2,7.4,8.8,9.3,9.3,8.7,8.2,8.3,8.5,8.6,8.5,8.2,8.1,7.9,8.6,8.7,8.7,8.5,8.4,8.5,8.7,8.7,8.6,8.5,8.3,8,8.2,8.1,8.1,8,7.9,7.9,8,8,7.9,8,7.7,7.2,7.5,7.3,7,7,7,7.2,7.3,7.1,6.8,6.4,6.1,6.5,7.7,7.9,7.5,6.9,6.6,6.9,7.7,8,8,7.7,7.3,7.4,8.1,8.3,8.1,7.9,7.9,8.3,8.6,8.7,8.5,8.3,8,8,8.8,8.7,8.5,8.1,7.8,7.6) > 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] 108 > (np <- floor(n / par1)) [1] 9 > 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] 9 9 9 9 9 9 9 9 9 9 9 9 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 7.6 8.3 8.9 8.5 8.7 8.0 7.3 7.7 8.6 NA [2,] 7.4 8.2 8.8 8.6 8.7 8.0 7.1 8.0 8.7 NA [3,] 7.3 8.0 8.3 8.5 8.6 7.9 6.8 8.0 8.5 NA [4,] 7.1 7.9 7.5 8.2 8.5 8.0 6.4 7.7 8.3 NA [5,] 6.9 7.6 7.2 8.1 8.3 7.7 6.1 7.3 8.0 NA [6,] 6.8 7.6 7.4 7.9 8.0 7.2 6.5 7.4 8.0 NA [7,] 7.5 8.3 8.8 8.6 8.2 7.5 7.7 8.1 8.8 NA [8,] 7.6 8.4 9.3 8.7 8.1 7.3 7.9 8.3 8.7 NA [9,] 7.8 8.4 9.3 8.7 8.1 7.0 7.5 8.1 8.5 NA [10,] 8.0 8.4 8.7 8.5 8.0 7.0 6.9 7.9 8.1 NA [11,] 8.1 8.4 8.2 8.4 7.9 7.0 6.6 7.9 7.8 NA [12,] 8.2 8.6 8.3 8.5 7.9 7.2 6.9 8.3 7.6 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/wessaorg/rcomp/tmp/1l8s41322578819.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/2m2211322578819.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/3cedm1322578819.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/459dm1322578819.ps",horizontal=F,onefile=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,] 7.3 7.1 7.3 7.1 6.1 6.5 7.5 7.3 7.0 7.9 7.8 6.9 [2,] 7.7 8.0 7.9 7.5 7.2 7.2 7.7 7.9 7.8 7.9 7.8 7.6 [3,] 8.3 8.2 8.0 7.9 7.6 7.4 8.2 8.3 8.1 8.0 7.9 8.2 [4,] 8.6 8.7 8.5 8.2 8.0 7.9 8.6 8.7 8.5 8.4 8.2 8.3 [5,] 8.9 8.8 8.6 8.5 8.3 8.0 8.8 9.3 9.3 8.7 8.4 8.6 $n [1] 9 9 9 9 9 9 9 9 9 9 9 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 7.826 7.831333 7.684 7.531333 7.178667 7.031333 7.726 7.878667 7.731333 [2,] 8.774 8.568667 8.316 8.268667 8.021333 7.768667 8.674 8.721333 8.468667 [,10] [,11] [,12] [1,] 7.736667 7.689333 7.831333 [2,] 8.263333 8.110667 8.568667 $out [1] 6.8 6.4 7.0 6.9 7.0 6.6 $group [1] 3 4 10 10 11 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(7.3, 7.7, 8.3, 8.6, 8.9, 7.1, 8, 8.2, 8.7, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/504u21322578819.ps",horizontal=F,onefile=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] [1,] 6.80 7.60 7.20 7.9 7.90 7.00 6.10 7.30 7.60 NA [2,] 7.20 7.95 7.85 8.3 8.00 7.10 6.55 7.70 8.00 NA [3,] 7.55 8.30 8.50 8.5 8.15 7.40 6.90 7.95 8.40 NA [4,] 7.90 8.40 8.85 8.6 8.55 7.95 7.40 8.10 8.65 NA [5,] 8.20 8.60 9.30 8.7 8.70 8.00 7.90 8.30 8.80 NA $n [1] 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 7.230725 8.094752 8.043893 8.363168 7.899141 7.012309 6.512309 7.767557 [2,] 7.869275 8.505248 8.956107 8.636832 8.400859 7.787691 7.287691 8.132443 [,9] [,10] [1,] 8.103531 NA [2,] 8.696469 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" NA Warning message: In bxp(list(stats = c(6.8, 7.2, 7.55, 7.9, 8.2, 7.6, 7.95, 8.3, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6folu1322578819.ps",horizontal=F,onefile=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,] 0.5147815 1.30 0.50 [2,] 0.5739883 1.65 0.65 [3,] 0.6094085 1.80 0.70 [4,] 0.6401827 2.05 0.80 [5,] 0.6837397 2.30 0.90 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 0.5792168 1.617557 0.631584 [2,] 0.6396002 1.982443 0.768416 $out [1] 0.4 $group [1] 3 $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(0.51478150704935, 0.573988330330002, 0.609408490482705, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1l8s41322578819.ps tmp/1l8s41322578819.png",intern=TRUE)) character(0) > try(system("convert tmp/2m2211322578819.ps tmp/2m2211322578819.png",intern=TRUE)) character(0) > try(system("convert tmp/3cedm1322578819.ps tmp/3cedm1322578819.png",intern=TRUE)) character(0) > try(system("convert tmp/459dm1322578819.ps tmp/459dm1322578819.png",intern=TRUE)) character(0) > try(system("convert tmp/504u21322578819.ps tmp/504u21322578819.png",intern=TRUE)) character(0) > try(system("convert tmp/6folu1322578819.ps tmp/6folu1322578819.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.390 0.285 1.734