R version 2.8.1 (2008-12-22) 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(25.60,23.70,22.00,21.30,20.70,20.40,20.30,20.40,19.80,19.50,23.10,23.50,23.50,22.90,21.90,21.50,20.50,20.20,19.40,19.20,18.80,18.80,22.60,23.30,23.00,21.40,19.90,18.80,18.60,18.40,18.60,19.90,19.20,18.40,21.10,20.50,19.10,18.10,17.00,17.10,17.40,16.80,15.30,14.30,13.40,15.30,22.10,23.70,22.20,19.50,16.60,17.30,19.80,21.20,21.50,20.60,19.10,19.60,23.50,24.00) > 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,] 25.6 23.5 23.0 19.1 22.2 NA [2,] 23.7 22.9 21.4 18.1 19.5 NA [3,] 22.0 21.9 19.9 17.0 16.6 NA [4,] 21.3 21.5 18.8 17.1 17.3 NA [5,] 20.7 20.5 18.6 17.4 19.8 NA [6,] 20.4 20.2 18.4 16.8 21.2 NA [7,] 20.3 19.4 18.6 15.3 21.5 NA [8,] 20.4 19.2 19.9 14.3 20.6 NA [9,] 19.8 18.8 19.2 13.4 19.1 NA [10,] 19.5 18.8 18.4 15.3 19.6 NA [11,] 23.1 22.6 21.1 22.1 23.5 NA [12,] 23.5 23.3 20.5 23.7 24.0 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/rcomp/tmp/1fghn1257676502.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/rcomp/tmp/2ll6m1257676502.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/rcomp/tmp/3iniq1257676502.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/rcomp/tmp/4thvi1257676502.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,] 22.2 18.1 16.6 17.1 17.4 16.8 18.6 19.2 18.8 18.4 21.1 23.3 [2,] 22.2 19.5 17.0 17.3 18.6 18.4 18.6 19.2 18.8 18.4 22.1 23.3 [3,] 23.0 21.4 19.9 18.8 19.8 20.2 19.4 19.9 19.1 18.8 22.6 23.5 [4,] 23.5 22.9 21.9 21.3 20.5 20.4 20.3 20.4 19.2 19.5 23.1 23.7 [5,] 23.5 23.7 22.0 21.5 20.7 21.2 21.5 20.6 19.2 19.6 23.5 24.0 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 22.08142 18.99757 16.43767 15.97361 18.45746 18.78681 18.19878 19.05208 [2,] 23.91858 23.80243 23.36233 21.62639 21.14254 21.61319 20.60122 20.74792 [,9] [,10] [,11] [,12] [1,] 18.81736 18.02274 21.89340 23.21736 [2,] 19.38264 19.57726 23.30660 23.78264 $out [1] 25.6 19.1 15.3 14.3 19.8 13.4 15.3 20.5 $group [1] 1 1 7 8 9 9 10 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(22.2, 22.2, 23, 23.5, 23.5, 18.1, 19.5, 21.4, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/5tcmp1257676502.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,] 19.50 18.80 18.40 13.40 16.60 NA [2,] 20.35 19.30 18.60 15.30 19.30 NA [3,] 21.00 21.00 19.55 17.05 20.20 NA [4,] 23.30 22.75 20.80 18.60 21.85 NA [5,] 25.60 23.50 23.00 22.10 24.00 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 19.65449 19.42643 18.54657 15.54485 19.03693 NA [2,] 22.34551 22.57357 20.55343 18.55515 21.36307 NA $out [1] 23.7 $group [1] 4 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(19.5, 20.35, 21, 23.3, 25.6, 18.8, 19.3, 21, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/6hay61257676502.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,] 0.9338094 2.40 0.40 [2,] 1.5905483 3.90 1.05 [3,] 2.2203040 4.90 1.50 [4,] 2.4767356 6.25 2.70 [5,] 2.6302091 6.50 4.90 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 1.816108 3.828149 0.7474239 [2,] 2.624500 5.971851 2.2525761 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(0.9338094023943, 1.59054828877737, 2.22030400748093, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1fghn1257676502.ps tmp/1fghn1257676502.png") > system("convert tmp/2ll6m1257676502.ps tmp/2ll6m1257676502.png") > system("convert tmp/3iniq1257676502.ps tmp/3iniq1257676502.png") > system("convert tmp/4thvi1257676502.ps tmp/4thvi1257676502.png") > system("convert tmp/5tcmp1257676502.ps tmp/5tcmp1257676502.png") > system("convert tmp/6hay61257676502.ps tmp/6hay61257676502.png") > > > proc.time() user system elapsed 1.260 1.170 2.443