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(1.4,1,-0.8,-2.9,-0.7,-0.7,1.5,3,3.2,3.1,3.9,1,1.3,0.8,1.2,2.9,3.9,4.5,4.5,3.3,2,1.5,1,2.1,3,4,5.1,4.5,4.2,3.3,2.7,1.8,1.4,0.5,-0.4,0.8,0.7,1.9,2,1.1,0.9,0.4,0.7,2.1,2.8,3.9,3.5,2,2,1.5,2.5,3.1,2.7,2.8,2.5,3,3.2,2.8,2.4,2,1.8,1.1,-1.5,-3.7) > 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] 64 > (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] 6 6 6 6 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1.4 1.3 3.0 0.7 2.0 1.8 [2,] 1.0 0.8 4.0 1.9 1.5 1.1 [3,] -0.8 1.2 5.1 2.0 2.5 -1.5 [4,] -2.9 2.9 4.5 1.1 3.1 -3.7 [5,] -0.7 3.9 4.2 0.9 2.7 NA [6,] -0.7 4.5 3.3 0.4 2.8 NA [7,] 1.5 4.5 2.7 0.7 2.5 NA [8,] 3.0 3.3 1.8 2.1 3.0 NA [9,] 3.2 2.0 1.4 2.8 3.2 NA [10,] 3.1 1.5 0.5 3.9 2.8 NA [11,] 3.9 1.0 -0.4 3.5 2.4 NA [12,] 1.0 2.1 0.8 2.0 2.0 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/127zl1258142552.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/2vj4l1258142552.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/3duuc1258142552.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/4wgyd1258142552.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.7 0.8 -1.5 -3.7 -0.7 -0.7 0.7 1.8 1.4 0.5 -0.4 0.8 [2,] 1.3 1.0 -0.8 -2.9 0.9 0.4 1.5 2.1 2.0 1.5 1.0 1.0 [3,] 1.6 1.3 1.6 2.0 2.7 2.8 2.5 3.0 2.8 2.8 2.4 2.0 [4,] 2.0 1.9 2.5 3.1 3.9 3.3 2.7 3.0 3.2 3.1 3.5 2.0 [5,] 3.0 1.9 5.1 4.5 4.2 4.5 4.5 3.3 3.2 3.9 3.9 2.1 $n [1] 6 6 6 6 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1.148477 0.719471 -0.5286066 -1.870194 0.5802076 0.7508673 1.652083 [2,] 2.051523 1.880529 3.7286066 5.870194 4.8197924 4.8491327 3.347917 [,8] [,9] [,10] [,11] [,12] [1,] 2.364062 1.952083 1.669444 0.6335063 1.293403 [2,] 3.635938 3.647917 3.930556 4.1664937 2.706597 $out [1] 4 $group [1] 2 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0.7, 1.3, 1.6, 2, 3, 0.8, 1, 1.3, 1.9, 1.9, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5u5g91258142552.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.90 0.80 -0.40 0.40 1.5 -3.70 [2,] -0.70 1.25 1.10 0.80 2.2 -2.60 [3,] 1.20 2.05 2.85 1.95 2.6 -0.20 [4,] 3.05 3.60 4.10 2.45 2.9 1.45 [5,] 3.90 4.50 5.10 3.90 3.2 1.80 $n [1] 12 12 12 12 12 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.5104002 0.9781492 1.48168 1.197424 2.280725 -3.3995 [2,] 2.9104002 3.1218508 4.21832 2.702576 2.919275 2.9995 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(-2.9, -0.7, 1.2, 3.05, 3.9, 0.8, 1.25, 2.05, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6632a1258142552.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.6260990 1.30 0.6250 [2,] 0.7873639 2.05 0.9500 [3,] 1.3922579 3.60 1.4000 [4,] 2.1107571 5.05 2.7875 [5,] 3.3886084 8.20 4.9500 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 0.7886494 2.23168 0.5619039 [2,] 1.9958665 4.96832 2.2380961 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(0.626099033699941, 0.787363912079394, 1.39225793442502, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/127zl1258142552.ps tmp/127zl1258142552.png") > system("convert tmp/2vj4l1258142552.ps tmp/2vj4l1258142552.png") > system("convert tmp/3duuc1258142552.ps tmp/3duuc1258142552.png") > system("convert tmp/4wgyd1258142552.ps tmp/4wgyd1258142552.png") > system("convert tmp/5u5g91258142552.ps tmp/5u5g91258142552.png") > system("convert tmp/6632a1258142552.ps tmp/6632a1258142552.png") > > > proc.time() user system elapsed 1.049 0.820 1.497