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(8,5,2,5,-4,-4,-1,5,16,5,11,16,22,12,8,4,17,5,11,9,4,7,-5,9,11,11,-4,-7,9,-3,14,11,8,-14,-8,-2,15,-8,-4,-17,-13,0,9,-7,-14,-21,-10,-1,7,-14,-12,-16,-15,-15,-24,-14,-8,-14,-13,0,-6,-37,-12,-36,-32,-18,-22,-13,-17,-18,-19,-24,-14,-3,-6,-25,-19,-11,-13,-11,-22,-10,-4,5,-8,-7,5,-13,-15,3,3,7,16,16,18,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] 96 > (np <- floor(n / par1)) [1] 8 > 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] 8 8 8 8 8 8 8 8 8 8 8 8 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 8 22 11 15 7 -6 -14 -8 NA [2,] 5 12 11 -8 -14 -37 -3 -7 NA [3,] 2 8 -4 -4 -12 -12 -6 5 NA [4,] 5 4 -7 -17 -16 -36 -25 -13 NA [5,] -4 17 9 -13 -15 -32 -19 -15 NA [6,] -4 5 -3 0 -15 -18 -11 3 NA [7,] -1 11 14 9 -24 -22 -13 3 NA [8,] 5 9 11 -7 -14 -13 -11 7 NA [9,] 16 4 8 -14 -8 -17 -22 16 NA [10,] 5 7 -14 -21 -14 -18 -10 16 NA [11,] 11 -5 -8 -10 -13 -19 -4 18 NA [12,] 16 9 -2 -1 0 -24 5 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/freestat/rcomp/tmp/1w6341210628910.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/freestat/rcomp/tmp/2n88a1210628910.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/freestat/rcomp/tmp/3hi8s1210628910.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/freestat/rcomp/tmp/483tf1210628910.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,] -14.0 -37 -12.0 -36.0 -32.0 -18.0 -24.0 -14 -22.0 -21 -19.0 -2.0 [2,] -7.0 -11 -9.0 -21.0 -17.0 -13.0 -17.5 -12 -15.5 -16 -11.5 -1.5 [3,] 7.5 -5 -4.0 -14.5 -14.0 -3.5 1.0 -1 -2.0 -12 -6.5 2.5 [4,] 13.0 8 3.5 -1.5 2.5 1.5 10.0 8 12.0 6 3.5 9.5 [5,] 22.0 12 8.0 5.0 17.0 5.0 14.0 11 16.0 16 18.0 16.0 $n [1] 8 8 8 8 8 8 8 8 8 8 8 8 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -3.672287 -15.613673 -10.982679 -25.39298 -24.89298 -11.599908 -14.36189 [2,] 18.672287 5.613673 2.982679 -3.60702 -3.10702 4.599908 16.36189 [,8] [,9] [,10] [,11] [,12] [1,] -12.17229 -17.36189 -24.2895159 -14.879215 -3.644758 [2,] 10.17229 13.36189 0.2895159 1.879215 8.644758 $out [1] -24 $group [1] 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-14, -7, 7.5, 13, 22, -37, -11, -5, 8, 12, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/51bx61210628910.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] [1,] -4.0 -5.0 -14.0 -21.0 -16 -37.0 -25.0 -15.0 NA [2,] 0.5 4.5 -5.5 -13.5 -15 -28.0 -16.5 -7.5 NA [3,] 5.0 8.5 3.0 -7.5 -14 -18.5 -11.0 4.0 NA [4,] 9.5 11.5 11.0 -0.5 -10 -15.0 -5.0 13.0 NA [5,] 16.0 22.0 14.0 15.0 -8 -6.0 5.0 18.0 NA $n [1] 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.8950396 5.307253 -4.525761 -13.429387 -16.28053 -24.42939 -16.245227 [2,] 9.1049604 11.692747 10.525761 -1.570613 -11.71947 -12.57061 -5.754773 [,8] [,9] [1,] -5.350188 NA [2,] 13.350188 NA $out [1] 7 -24 0 $group [1] 5 5 5 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" NA Warning message: In bxp(list(stats = c(-4, 0.5, 5, 9.5, 16, -5, 4.5, 8.5, 11.5, 22, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/6w6dh1210628910.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,] 7.395703 20.0 10.250 [2,] 11.352445 30.5 11.625 [3,] 13.006827 37.5 15.625 [4,] 15.023135 40.5 19.750 [5,] 15.887439 49.0 24.750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 11.33260 32.93893 11.91913 [2,] 14.68105 42.06107 19.33087 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(7.39570338584699, 11.3524453880216, 13.0068266860113, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1w6341210628910.ps tmp/1w6341210628910.png") > system("convert tmp/2n88a1210628910.ps tmp/2n88a1210628910.png") > system("convert tmp/3hi8s1210628910.ps tmp/3hi8s1210628910.png") > system("convert tmp/483tf1210628910.ps tmp/483tf1210628910.png") > system("convert tmp/51bx61210628910.ps tmp/51bx61210628910.png") > system("convert tmp/6w6dh1210628910.ps tmp/6w6dh1210628910.png") > > > proc.time() user system elapsed 1.840 1.187 2.076