R version 2.7.0 (2008-04-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(79.2,81.5,81.5,82,85.8,88.2,88,88.8,89,90.4,90.9,94.6,97.9,101.7,102.3,103.5,103.6,102.3,101.6,104.3,110.8,112.1,111.1,114.4,115,115.3,114.1,114.8,114.5,114.1,112.3,113,112.2,113.7,113.6,115.8,117.9,120.1,118.8,114.7,110.9,112.9,113.3,114.3,116.5,114.3,115.9,120.1,122.6,122.4,123.1,127.9,130.9,135,134.9,130.2,130.8,132.6,138.6,146.2,149.3,149.9,156.8,158.8,156.7,159.9,158.2,157.5,159.1,160.6,161.6,161.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] 72 > (np <- floor(n / par1)) [1] 6 > 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 6 6 6 6 6 6 6 6 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 79.2 97.9 115.0 117.9 122.6 149.3 NA [2,] 81.5 101.7 115.3 120.1 122.4 149.9 NA [3,] 81.5 102.3 114.1 118.8 123.1 156.8 NA [4,] 82.0 103.5 114.8 114.7 127.9 158.8 NA [5,] 85.8 103.6 114.5 110.9 130.9 156.7 NA [6,] 88.2 102.3 114.1 112.9 135.0 159.9 NA [7,] 88.0 101.6 112.3 113.3 134.9 158.2 NA [8,] 88.8 104.3 113.0 114.3 130.2 157.5 NA [9,] 89.0 110.8 112.2 116.5 130.8 159.1 NA [10,] 90.4 112.1 113.7 114.3 132.6 160.6 NA [11,] 90.9 111.1 113.6 115.9 138.6 161.6 NA [12,] 94.6 114.4 115.8 120.1 146.2 161.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/freestat/rcomp/tmp/1wlje1212241627.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/freestat/rcomp/tmp/20oax1212241627.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/freestat/rcomp/tmp/3blth1212241627.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/freestat/rcomp/tmp/4a3yx1212241627.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] [1,] 79.20 81.5 81.50 82.00 85.8 88.2 88.0 88.80 89.00 90.4 90.90 [2,] 97.90 101.7 102.30 103.50 103.6 102.3 101.6 104.30 110.80 112.1 111.10 [3,] 116.45 117.7 116.45 114.75 112.7 113.5 112.8 113.65 114.35 114.0 114.75 [4,] 122.60 122.4 123.10 127.90 130.9 135.0 134.9 130.20 130.80 132.6 138.60 [5,] 149.30 149.9 123.10 158.80 156.7 159.9 158.2 157.50 159.10 160.6 161.60 [,12] [1,] 94.60 [2,] 114.40 [3,] 117.95 [4,] 146.20 [5,] 161.30 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 100.5177 104.3478 103.0333 99.01121 95.09062 92.40744 91.32042 [2,] 132.3823 131.0522 129.8667 130.48879 130.30938 134.59256 134.27958 [,8] [,9] [,10] [,11] [,12] [1,] 96.94366 101.4494 100.7768 97.01161 97.43797 [2,] 130.35634 127.2506 127.2232 132.48839 138.46203 $out [1] 156.8 $group [1] 3 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(79.2, 97.9, 116.45, 122.6, 149.3, 81.5, 101.7, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/5081a1212241627.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] [1,] 79.20 97.90 112.2 110.90 122.40 156.70 NA [2,] 81.75 102.00 113.3 113.80 125.50 156.75 NA [3,] 88.10 103.55 114.1 115.30 130.85 158.50 NA [4,] 89.70 110.95 114.9 118.35 134.95 160.25 NA [5,] 94.60 114.40 115.8 120.10 146.20 161.60 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 84.47395 99.46784 113.3702 113.2247 126.5398 156.9036 NA [2,] 91.72605 107.63216 114.8298 117.3753 135.1602 160.0964 NA $out [1] 149.3 149.9 $group [1] 6 6 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(79.2, 81.75, 88.1, 89.7, 94.6, 97.9, 102, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/6z4mo1212241627.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,] 22.79419 66.7 15.525 [2,] 23.65136 69.4 16.750 [3,] 24.24242 70.2 19.500 [4,] 24.95904 71.3 23.100 [5,] 25.62583 71.7 25.225 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 23.64597 69.3334 16.60372 [2,] 24.83886 71.0666 22.39628 $out [1] 75.3 76.8 $group [1] 2 2 $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(22.7941878556794, 23.6513622959251, 24.2424162898500, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1wlje1212241627.ps tmp/1wlje1212241627.png") > system("convert tmp/20oax1212241627.ps tmp/20oax1212241627.png") > system("convert tmp/3blth1212241627.ps tmp/3blth1212241627.png") > system("convert tmp/4a3yx1212241627.ps tmp/4a3yx1212241627.png") > system("convert tmp/5081a1212241627.ps tmp/5081a1212241627.png") > system("convert tmp/6z4mo1212241627.ps tmp/6z4mo1212241627.png") > > > proc.time() user system elapsed 1.836 1.175 1.973