R version 2.8.0 (2008-10-20) 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.8,83.4,113.6,112.9,104,109.9,99,106.3,128.9,111.1,102.9,130,87,87.5,117.6,103.4,110.8,112.6,102.5,112.4,135.6,105.1,127.7,137,91,90.5,122.4,123.3,124.3,120,118.1,119,142.7,123.6,129.6,151.6,110.4,99.2,130.5,136.2,129.7,128,121.6,135.8,143.8,147.5,136.2,156.6,123.3,104.5,139.8,136.5,112.1,118.5,94.4,102.3,111.4,99.2,87.8,115.8) > 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,] 79.8 87.0 91.0 110.4 123.3 NA [2,] 83.4 87.5 90.5 99.2 104.5 NA [3,] 113.6 117.6 122.4 130.5 139.8 NA [4,] 112.9 103.4 123.3 136.2 136.5 NA [5,] 104.0 110.8 124.3 129.7 112.1 NA [6,] 109.9 112.6 120.0 128.0 118.5 NA [7,] 99.0 102.5 118.1 121.6 94.4 NA [8,] 106.3 112.4 119.0 135.8 102.3 NA [9,] 128.9 135.6 142.7 143.8 111.4 NA [10,] 111.1 105.1 123.6 147.5 99.2 NA [11,] 102.9 127.7 129.6 136.2 87.8 NA [12,] 130.0 137.0 151.6 156.6 115.8 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/1uoqu1257688492.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/2zz3y1257688492.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/3h6ey1257688492.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/4fpne1257688492.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,] 79.8 83.4 113.6 103.4 104.0 109.9 94.4 102.3 111.4 99.2 87.8 115.8 [2,] 87.0 87.5 117.6 112.9 110.8 112.6 99.0 106.3 128.9 105.1 102.9 130.0 [3,] 91.0 90.5 122.4 123.3 112.1 118.5 102.5 112.4 135.6 111.1 127.7 137.0 [4,] 110.4 99.2 130.5 136.2 124.3 120.0 118.1 119.0 142.7 123.6 129.6 151.6 [5,] 123.3 104.5 139.8 136.5 129.7 128.0 121.6 135.8 143.8 147.5 136.2 156.6 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 74.46562 82.23281 113.2849 106.8363 102.5609 113.2712 89.00399 103.4262 [2,] 107.53438 98.76719 131.5151 139.7637 121.6391 123.7288 115.99601 121.3738 [,9] [,10] [,11] [,12] [1,] 125.8490 98.02795 108.8338 121.7375 [2,] 145.3510 124.17205 146.5662 152.2625 $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(79.8, 87, 91, 110.4, 123.3, 83.4, 87.5, 90.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/5ms5m1257688492.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,] 83.40 87.00 118.10 110.40 87.80 NA [2,] 100.95 102.95 118.55 124.80 100.75 NA [3,] 108.10 111.60 122.85 133.15 111.75 NA [4,] 113.25 122.65 126.95 140.00 120.90 NA [5,] 130.00 137.00 129.60 156.60 139.80 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 102.4899 102.6147 119.0187 126.2172 102.5594 NA [2,] 113.7101 120.5853 126.6813 140.0828 120.9406 NA $out [1] 79.8 91.0 90.5 142.7 151.6 99.2 $group [1] 1 3 3 3 3 4 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(83.4, 100.95, 108.1, 113.25, 130, 87, 102.95, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/6ya5u1257688492.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,] 7.050177 18.10 7.40 [2,] 10.507109 25.95 12.80 [3,] 13.189724 32.75 16.15 [4,] 17.243610 42.15 22.45 [5,] 20.574329 48.40 26.70 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 10.11716 25.36107 11.74857 [2,] 16.26229 40.13893 20.55143 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(7.05017730273502, 10.5071089249336, 13.1897239478766, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1uoqu1257688492.ps tmp/1uoqu1257688492.png") > system("convert tmp/2zz3y1257688492.ps tmp/2zz3y1257688492.png") > system("convert tmp/3h6ey1257688492.ps tmp/3h6ey1257688492.png") > system("convert tmp/4fpne1257688492.ps tmp/4fpne1257688492.png") > system("convert tmp/5ms5m1257688492.ps tmp/5ms5m1257688492.png") > system("convert tmp/6ya5u1257688492.ps tmp/6ya5u1257688492.png") > > > proc.time() user system elapsed 1.678 1.291 1.914