R version 2.9.0 (2009-04-17) 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(151.7,121.3,133.0,119.6,122.2,117.4,106.7,87.5,81.0,110.3,87.0,55.7,146.0,137.5,138.5,135.6,107.3,99.0,91.4,68.4,82.6,98.4,71.3,47.6,130.8,113.6,125.7,113.6,97.1,104.4,91.8,75.1,89.2,110.2,78.4,68.4,122.8,129.7,159.1,139.0,102.2,113.6,81.5,77.4,87.6,101.2,87.2,64.9,133.1,118.0,135.9,125.7,108.0,128.3,84.7,86.4,92.2,95.8,92.3,54.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] 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,] 151.7 146.0 130.8 122.8 133.1 NA [2,] 121.3 137.5 113.6 129.7 118.0 NA [3,] 133.0 138.5 125.7 159.1 135.9 NA [4,] 119.6 135.6 113.6 139.0 125.7 NA [5,] 122.2 107.3 97.1 102.2 108.0 NA [6,] 117.4 99.0 104.4 113.6 128.3 NA [7,] 106.7 91.4 91.8 81.5 84.7 NA [8,] 87.5 68.4 75.1 77.4 86.4 NA [9,] 81.0 82.6 89.2 87.6 92.2 NA [10,] 110.3 98.4 110.2 101.2 95.8 NA [11,] 87.0 71.3 78.4 87.2 92.3 NA [12,] 55.7 47.6 68.4 64.9 54.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/www/html/rcomp/tmp/1qn2y1257951364.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/2q0vq1257951364.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/3taks1257951364.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/4f91b1257951364.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,] 122.8 113.6 125.7 113.6 97.1 99.0 81.5 68.4 81.0 95.8 71.3 47.6 [2,] 130.8 118.0 133.0 119.6 102.2 104.4 84.7 75.1 82.6 98.4 78.4 54.3 [3,] 133.1 121.3 135.9 125.7 107.3 113.6 91.4 77.4 87.6 101.2 87.0 55.7 [4,] 146.0 129.7 138.5 135.6 108.0 117.4 91.8 86.4 89.2 110.2 87.2 64.9 [5,] 151.7 137.5 138.5 139.0 108.0 128.3 91.8 87.5 92.2 110.3 92.3 68.4 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 122.3597 113.0328 132.0137 114.3944 103.2017 104.4142 86.38316 69.41545 [2,] 143.8403 129.5672 139.7863 137.0056 111.3983 122.7858 96.41684 85.38455 [,9] [,10] [,11] [,12] [1,] 82.93646 92.86215 80.78194 48.21007 [2,] 92.26354 109.53785 93.21806 63.18993 $out [1] 159.1 122.2 106.7 $group [1] 3 5 7 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(122.8, 130.8, 133.1, 146, 151.7, 113.6, 118, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/59g9p1257951364.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,] 55.70 47.60 68.40 64.90 54.3 NA [2,] 87.25 76.95 83.80 84.35 89.3 NA [3,] 113.85 98.70 100.75 101.70 101.9 NA [4,] 121.75 136.55 113.60 126.25 127.0 NA [5,] 151.70 146.00 130.80 159.10 135.9 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 98.11432 71.51604 87.15802 82.58913 84.70478 NA [2,] 129.58568 125.88396 114.34198 120.81087 119.09522 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(55.7, 87.25, 113.85, 121.75, 151.7, 47.6, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/66k9j1257951364.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,] 4.648871 11.20 5.50 [2,] 8.176357 19.95 6.85 [3,] 9.477969 24.50 10.95 [4,] 11.039726 27.15 12.40 [5,] 12.501920 33.40 16.00 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 8.171967 21.21603 8.418608 [2,] 10.783971 27.78397 13.481392 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(4.64887083064264, 8.1763572403525, 9.47796870790585, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1qn2y1257951364.ps tmp/1qn2y1257951364.png") > system("convert tmp/2q0vq1257951364.ps tmp/2q0vq1257951364.png") > system("convert tmp/3taks1257951364.ps tmp/3taks1257951364.png") > system("convert tmp/4f91b1257951364.ps tmp/4f91b1257951364.png") > system("convert tmp/59g9p1257951364.ps tmp/59g9p1257951364.png") > system("convert tmp/66k9j1257951364.ps tmp/66k9j1257951364.png") > > > proc.time() user system elapsed 1.098 0.851 32.733