R version 2.10.1 (2009-12-14) 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(17.1,13.4,15.3,14,9.7,13.7,13.7,12.5,9.8,7,-1.9,-2.9,-6.8,-10.4,-17.2,-19.8,-16.8,-23.2,-21.7,-17.6,-13,-12.6,-4,-0.2,3.1,6.5,19.2,26.6,26.6,31.4,31.2,26.4,20.7,20.7,15,13.3,8.7,10.2,4.3,-0.1,-4.6,-3.9,-3.5,-3.4,-2.5,-1.1,0.3,-0.9,3.6,2.7,-0.2,-1,5.8,6.4,9.6,13.2,10.6,10.9,12.9,15.9,12.2,9.1,9,17.4,14.7,17,13.7,9.5,14.8,13.6,12.6,8.9,10.2,12.7,16,10.4,9.9,9.5,8.6,10,3.5,-4.2,-4.4,-1.5,-0.1,0.8,-2.4,-1.2,0.2,-1.9,-1.6,-4.2,-2.2,6.2,5.7,3.1,1.1,-0.9,0.1,-4,-4,-5.3,-8,-6.3,-3.6,-3.5,-5.1,-3.3) > 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,] 17.1 -6.8 3.1 8.7 3.6 12.2 10.2 -0.1 1.1 NA [2,] 13.4 -10.4 6.5 10.2 2.7 9.1 12.7 0.8 -0.9 NA [3,] 15.3 -17.2 19.2 4.3 -0.2 9.0 16.0 -2.4 0.1 NA [4,] 14.0 -19.8 26.6 -0.1 -1.0 17.4 10.4 -1.2 -4.0 NA [5,] 9.7 -16.8 26.6 -4.6 5.8 14.7 9.9 0.2 -4.0 NA [6,] 13.7 -23.2 31.4 -3.9 6.4 17.0 9.5 -1.9 -5.3 NA [7,] 13.7 -21.7 31.2 -3.5 9.6 13.7 8.6 -1.6 -8.0 NA [8,] 12.5 -17.6 26.4 -3.4 13.2 9.5 10.0 -4.2 -6.3 NA [9,] 9.8 -13.0 20.7 -2.5 10.6 14.8 3.5 -2.2 -3.6 NA [10,] 7.0 -12.6 20.7 -1.1 10.9 13.6 -4.2 6.2 -3.5 NA [11,] -1.9 -4.0 15.0 0.3 12.9 12.6 -4.4 5.7 -5.1 NA [12,] -2.9 -0.2 13.3 -0.9 15.9 8.9 -1.5 3.1 -3.3 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/yougetitorg/rcomp/tmp/130l41305045171.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/yougetitorg/rcomp/tmp/2ynmv1305045171.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/yougetitorg/rcomp/tmp/3rxx51305045171.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/yougetitorg/rcomp/tmp/4nag21305045171.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,] -6.8 -10.4 -17.2 -19.8 -16.8 -23.2 -21.7 -17.6 -13.0 -12.6 -5.1 -3.3 [2,] 1.1 0.8 -0.2 -1.2 -4.0 -3.9 -3.5 -4.2 -2.5 -3.5 -4.0 -1.5 [3,] 3.6 6.5 4.3 -0.1 5.8 6.4 8.6 9.5 3.5 6.2 0.3 -0.2 [4,] 10.2 10.2 15.3 14.0 9.9 13.7 13.7 12.5 10.6 10.9 12.6 8.9 [5,] 17.1 13.4 19.2 26.6 26.6 31.4 31.2 26.4 20.7 20.7 15.0 15.9 $n [1] 9 9 9 9 9 9 9 9 9 9 9 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -1.192667 1.549333 -3.863333 -8.105333 -1.520667 -2.869333 -0.4586667 [2,] 8.392667 11.450667 12.463333 7.905333 13.120667 15.669333 17.6586667 [,8] [,9] [,10] [,11] [,12] [1,] 0.7046667 -3.399333 -1.384 -8.442667 -5.677333 [2,] 18.2953333 10.399333 13.784 9.042667 5.277333 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-6.8, 1.1, 3.6, 10.2, 17.1, -10.4, 0.8, 6.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/yougetitorg/rcomp/tmp/5p5zy1305045171.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,] 7.00 -23.2 3.10 -4.60 -1.00 8.90 -4.4 -4.20 -8.0 NA [2,] 8.35 -18.7 14.15 -3.45 3.15 9.30 1.0 -2.05 -5.2 NA [3,] 12.95 -14.9 20.70 -1.00 8.00 13.10 9.7 -0.65 -3.8 NA [4,] 13.85 -8.6 26.60 2.30 11.90 14.75 10.3 1.95 -2.1 NA [5,] 17.10 -0.2 31.40 10.20 15.90 17.40 16.0 6.20 1.1 NA $n [1] 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 10.44141 -19.50668 15.02147 -3.622614 4.009066 10.61422 5.458208 [2,] 15.45859 -10.29332 26.37853 1.622614 11.990934 15.58578 13.941792 [,8] [,9] [,10] [1,] -2.474427 -5.213931 NA [2,] 1.174427 -2.386069 NA $out [1] -1.9 -2.9 $group [1] 1 1 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" NA Warning message: In bxp(list(stats = c(7, 8.35, 12.95, 13.85, 17.1, -23.2, -18.7, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/yougetitorg/rcomp/tmp/6m7gj1305045171.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,] 7.272742 19.20 9.10 [2,] 7.944441 23.85 11.75 [3,] 11.014352 35.05 14.80 [4,] 13.561993 45.20 16.65 [5,] 15.679693 54.60 17.60 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 8.452149 25.31212 12.56508 [2,] 13.576555 44.78788 17.03492 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(7.27274210857073, 7.9444411921893, 11.0143520557963, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/130l41305045171.ps tmp/130l41305045171.png",intern=TRUE)) character(0) > try(system("convert tmp/2ynmv1305045171.ps tmp/2ynmv1305045171.png",intern=TRUE)) character(0) > try(system("convert tmp/3rxx51305045171.ps tmp/3rxx51305045171.png",intern=TRUE)) character(0) > try(system("convert tmp/4nag21305045171.ps tmp/4nag21305045171.png",intern=TRUE)) character(0) > try(system("convert tmp/5p5zy1305045171.ps tmp/5p5zy1305045171.png",intern=TRUE)) character(0) > try(system("convert tmp/6m7gj1305045171.ps tmp/6m7gj1305045171.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.250 1.040 1.778