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(0,1,0,0,1,3,9,2,3,5,3,5,2,2,0,1,0,1,3,3,2,1,1,5,0,3,1,0,1,4,0,0,1,6,14,1,1,0,0,1,1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,2,0,1,0,1,0,0,1,2,0,0,1,2,0,3,1,1,0,2,0,4,0,2,1,1,1,1,0,1,1,0,2,1,3,1,2,4,0,0,0,1,0,1,0,2,2,4,2,3,3,0,0,2,7,8,2,4,1,1,2,4) > 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] 120 > (np <- floor(n / par1)) [1] 10 > 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] 10 10 10 10 10 10 10 10 10 10 10 10 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] 0 2 0 1 1 0 0 1 0 3 NA [2,] 1 2 3 0 0 1 3 1 0 0 NA [3,] 0 0 1 0 1 0 1 0 0 0 NA [4,] 0 1 0 1 0 1 1 1 1 2 NA [5,] 1 0 1 1 1 0 0 1 0 7 NA [6,] 3 1 4 1 0 0 2 0 1 8 NA [7,] 9 3 0 1 1 1 0 2 0 2 NA [8,] 2 3 0 0 0 2 4 1 2 4 NA [9,] 3 2 1 1 1 0 0 3 2 1 NA [10,] 5 1 6 0 0 0 2 1 4 1 NA [11,] 3 1 14 1 0 1 1 2 2 2 NA [12,] 5 5 1 0 2 2 1 4 3 4 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/1jpic1244126880.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/2ix1q1244126880.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/3vr651244126880.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/4qggt1244126880.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,] 0.0 0 0 0 0 0 0 0 0 0 0.0 0.0 [2,] 0.0 0 0 0 0 0 0 0 1 0 1.0 1.0 [3,] 0.5 1 0 1 1 1 1 2 1 1 1.5 2.5 [4,] 1.0 2 1 1 1 3 2 3 2 4 2.0 4.0 [5,] 2.0 3 1 2 1 4 3 4 3 6 3.0 5.0 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.0003601297 0.0007202594 -0.4996399 0.5003601 0.5003601 -0.4989196 [2,] 0.9996398703 1.9992797406 0.4996399 1.4996399 1.4996399 2.4989196 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0.0007202594 0.5010804 0.5003601 -0.9985595 1.000360 1.001080 [2,] 1.9992797406 3.4989196 1.4996399 2.9985595 1.999640 3.998920 $out [1] 3 7 8 9 14 $group [1] 1 5 6 7 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0, 0, 0.5, 1, 2, 0, 0, 1, 2, 3, 0, 0, 0, 1, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5b6rp1244126880.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] [,10] [,11] [1,] 0.0 0.0 0.0 0 0.0 0.0 0 0 0 0 NA [2,] 0.5 1.0 0.0 0 0.0 0.0 0 1 0 1 NA [3,] 2.5 1.5 1.0 1 0.5 0.5 1 1 1 2 NA [4,] 4.0 2.5 3.5 1 1.0 1.0 2 2 2 4 NA [5,] 9.0 3.0 6.0 1 2.0 2.0 4 3 4 8 NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.9036265 0.81584 -0.5963735 0.5438933 0.04389329 0.04389329 0.08778657 [2,] 4.0963735 2.18416 2.5963735 1.4561067 0.95610671 0.95610671 1.91221343 [,8] [,9] [,10] [,11] [1,] 0.5438933 0.08778657 0.6316799 NA [2,] 1.4561067 1.91221343 3.3683201 NA $out [1] 5 14 4 $group [1] 2 3 8 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(0, 0.5, 2.5, 4, 9, 0, 1, 1.5, 2.5, 3, 0, 0, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/67bo91244126880.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.4830459 1.0 0.750 [2,] 1.0538816 3.0 1.000 [3,] 1.6580872 4.5 1.375 [4,] 2.3527607 7.5 2.500 [5,] 4.0565448 14.0 3.250 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 1.065660 2.44752 0.69084 [2,] 2.250515 6.55248 2.05916 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(0.483045891539648, 1.05388162938089, 1.65808722128805, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1jpic1244126880.ps tmp/1jpic1244126880.png") > system("convert tmp/2ix1q1244126880.ps tmp/2ix1q1244126880.png") > system("convert tmp/3vr651244126880.ps tmp/3vr651244126880.png") > system("convert tmp/4qggt1244126880.ps tmp/4qggt1244126880.png") > system("convert tmp/5b6rp1244126880.ps tmp/5b6rp1244126880.png") > system("convert tmp/67bo91244126880.ps tmp/67bo91244126880.png") > > > proc.time() user system elapsed 1.043 0.816 1.324