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(2,2,2,2,2,2,2,2,2,2,2,2,2,2,2.21,2.25,2.25,2.45,2.5,2.5,2.64,2.75,2.93,3,3.17,3.25,3.39,3.5,3.5,3.65,3.75,3.75,3.9,4,4,4,4,4,4,4,4,4,4,4,4,4.18,4.25,4.25,3.97,3.42,2.75,2.31,2,1.66,1.31,1.09,1,1,1,1) > 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,] 2 2.00 3.17 4.00 3.97 NA [2,] 2 2.00 3.25 4.00 3.42 NA [3,] 2 2.21 3.39 4.00 2.75 NA [4,] 2 2.25 3.50 4.00 2.31 NA [5,] 2 2.25 3.50 4.00 2.00 NA [6,] 2 2.45 3.65 4.00 1.66 NA [7,] 2 2.50 3.75 4.00 1.31 NA [8,] 2 2.50 3.75 4.00 1.09 NA [9,] 2 2.64 3.90 4.00 1.00 NA [10,] 2 2.75 4.00 4.18 1.00 NA [11,] 2 2.93 4.00 4.25 1.00 NA [12,] 2 3.00 4.00 4.25 1.00 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/1dejt1257960196.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/2utgr1257960196.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/3honb1257960196.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/4a4qu1257960196.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,] 2.00 2.00 2.00 2.00 2.00 1.66 1.31 1.09 1.00 1.00 1.00 1.00 [2,] 2.00 2.00 2.21 2.25 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 [3,] 3.17 3.25 2.75 2.31 2.25 2.45 2.50 2.50 2.64 2.75 2.93 3.00 [4,] 3.97 3.42 3.39 3.50 3.50 3.65 3.75 3.75 3.90 4.00 4.00 4.00 [5,] 4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.18 4.25 4.25 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 1.778003 2.246632 1.916215 1.426753 1.190104 1.284114 1.263454 1.263454 [2,] 4.561997 4.253368 3.583785 3.193247 3.309896 3.615886 3.736546 3.736546 [,9] [,10] [,11] [,12] [1,] 1.297465 1.336805 1.516805 1.586805 [2,] 3.982535 4.163195 4.343195 4.413195 $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(2, 2, 3.17, 3.97, 4, 2, 2, 3.25, 3.42, 4, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/57g4k1257960196.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,] 2 2.000 3.170 4.00 1.000 NA [2,] 2 2.230 3.445 4.00 1.000 NA [3,] 2 2.475 3.700 4.00 1.485 NA [4,] 2 2.695 3.950 4.09 2.530 NA [5,] 2 3.000 4.000 4.18 3.970 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 2 2.262910 3.469666 3.95895 0.7871567 NA [2,] 2 2.687090 3.930334 4.04105 2.1828433 NA $out [1] 4.25 4.25 $group [1] 4 4 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(2, 2, 2, 2, 2, 2, 2.23, 2.475, 2.695, 3, 3.17, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/66ct41257960196.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.8297891 2.000 1.180 [2,] 0.9161155 2.000 1.460 [3,] 1.0861783 2.515 1.750 [4,] 1.3100550 3.090 1.985 [5,] 1.3647344 3.250 2.000 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 0.9064998 2.017844 1.510544 [2,] 1.2658568 3.012156 1.989456 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(0.829789129839624, 0.916115469434137, 1.08617831055863, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1dejt1257960196.ps tmp/1dejt1257960196.png") > system("convert tmp/2utgr1257960196.ps tmp/2utgr1257960196.png") > system("convert tmp/3honb1257960196.ps tmp/3honb1257960196.png") > system("convert tmp/4a4qu1257960196.ps tmp/4a4qu1257960196.png") > system("convert tmp/57g4k1257960196.ps tmp/57g4k1257960196.png") > system("convert tmp/66ct41257960196.ps tmp/66ct41257960196.png") > > > proc.time() user system elapsed 1.19 1.20 2.46