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(5.7,6.1,6,5.9,5.8,5.7,5.6,5.4,5.4,5.5,5.6,5.7,5.9,6.1,6,5.8,5.8,5.7,5.5,5.3,5.2,5.2,5,5.1,5.1,5.2,4.9,4.8,4.5,4.5,4.4,4.4,4.2,4.1,3.9,3.8,3.9,4.2,4.1,3.8,3.6,3.7,3.5,3.4,3.1,3.1,3.1,3.2,3.3,3.5,3.6,3.5,3.3,3.2,3.1,3.2,3,3,3.1,3.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] 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,] 5.7 5.9 5.1 3.9 3.3 NA [2,] 6.1 6.1 5.2 4.2 3.5 NA [3,] 6.0 6.0 4.9 4.1 3.6 NA [4,] 5.9 5.8 4.8 3.8 3.5 NA [5,] 5.8 5.8 4.5 3.6 3.3 NA [6,] 5.7 5.7 4.5 3.7 3.2 NA [7,] 5.6 5.5 4.4 3.5 3.1 NA [8,] 5.4 5.3 4.4 3.4 3.2 NA [9,] 5.4 5.2 4.2 3.1 3.0 NA [10,] 5.5 5.2 4.1 3.1 3.0 NA [11,] 5.6 5.0 3.9 3.1 3.1 NA [12,] 5.7 5.1 3.8 3.2 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/1lmdf1258105851.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/2hbey1258105851.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/3s2bb1258105851.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/4rtj31258105851.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,] 3.3 3.5 3.6 3.5 3.3 3.2 3.1 3.2 3.0 3.0 3.1 3.2 [2,] 3.9 4.2 4.1 3.8 3.6 3.7 3.5 3.4 3.1 3.1 3.1 3.4 [3,] 5.1 5.2 4.9 4.8 4.5 4.5 4.4 4.4 4.2 4.1 3.9 3.8 [4,] 5.7 6.1 6.0 5.8 5.8 5.7 5.5 5.3 5.2 5.2 5.0 5.1 [5,] 5.9 6.1 6.0 5.9 5.8 5.7 5.6 5.4 5.4 5.5 5.6 5.7 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 3.828125 3.857465 3.557465 3.386805 2.945486 3.086805 2.986805 3.057465 [2,] 6.371875 6.542535 6.242535 6.213195 6.054514 5.913195 5.813195 5.742535 [,9] [,10] [,11] [,12] [1,] 2.716145 2.616145 2.557465 2.598784 [2,] 5.683855 5.583855 5.242535 5.001216 $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(3.3, 3.9, 5.1, 5.7, 5.9, 3.5, 4.2, 5.2, 6.1, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/50uhq1258105851.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,] 5.40 5.00 3.80 3.10 3.00 NA [2,] 5.55 5.20 4.15 3.15 3.10 NA [3,] 5.70 5.60 4.45 3.55 3.25 NA [4,] 5.85 5.85 4.85 3.85 3.45 NA [5,] 6.10 6.10 5.20 4.20 3.60 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 5.563168 5.303531 4.130725 3.230725 3.090363 NA [2,] 5.836832 5.896469 4.769275 3.869275 3.409637 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(5.4, 5.55, 5.7, 5.85, 6.1, 5, 5.2, 5.6, 5.85, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6v6ns1258105851.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,] 1.089495 2.4 1.70 [2,] 1.103628 2.4 1.90 [3,] 1.131367 2.5 1.95 [4,] 1.147793 2.5 2.05 [5,] 1.181101 2.6 2.20 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 1.111223 2.454389 1.881584 [2,] 1.151510 2.545611 2.018416 $out [1] 1.028591 2.200000 $group [1] 1 2 $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(1.08949529599719, 1.10362804812830, 1.13136662033840, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1lmdf1258105851.ps tmp/1lmdf1258105851.png") > system("convert tmp/2hbey1258105851.ps tmp/2hbey1258105851.png") > system("convert tmp/3s2bb1258105851.ps tmp/3s2bb1258105851.png") > system("convert tmp/4rtj31258105851.ps tmp/4rtj31258105851.png") > system("convert tmp/50uhq1258105851.ps tmp/50uhq1258105851.png") > system("convert tmp/6v6ns1258105851.ps tmp/6v6ns1258105851.png") > > > proc.time() user system elapsed 1.037 0.803 1.702