R version 2.6.2 (2008-02-08) 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(229.7,231.5,226.4,242.1,228.3,209.9,209.3,220.8,239.6,241.1,241.9,240.8,179.9,190.8,174.2,170,170.3,159.3,147.9,154.2,164.5,173.9,163.6,149.7,128.2,124.7,125.1,120.9,117.5,114,113.4,118.9,121.7,121.9,120.3,115.6,105.7,105.1,104.6,105,104.9,105.1,103.9,101.9,99,97,95.8,94.7,97.6,97.9,99.3,99.7,99.7,100,99.1,98.2,98.1,98.6,100.2,101.9,97.5,97.1,98.1,98.5,98.3,99.3,100.9,100.4,101.7,102,103.2,103.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] 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,] 229.7 179.9 128.2 105.7 97.6 97.5 NA [2,] 231.5 190.8 124.7 105.1 97.9 97.1 NA [3,] 226.4 174.2 125.1 104.6 99.3 98.1 NA [4,] 242.1 170.0 120.9 105.0 99.7 98.5 NA [5,] 228.3 170.3 117.5 104.9 99.7 98.3 NA [6,] 209.9 159.3 114.0 105.1 100.0 99.3 NA [7,] 209.3 147.9 113.4 103.9 99.1 100.9 NA [8,] 220.8 154.2 118.9 101.9 98.2 100.4 NA [9,] 239.6 164.5 121.7 99.0 98.1 101.7 NA [10,] 241.1 173.9 121.9 97.0 98.6 102.0 NA [11,] 241.9 163.6 120.3 95.8 100.2 103.2 NA [12,] 240.8 149.7 115.6 94.7 101.9 103.1 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/109fi1210682540.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/25gv31210682540.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/31z7a1210682540.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/4fbk31210682540.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,] 97.50 97.1 98.10 98.50 98.3 99.30 99.10 98.2 98.1 97.00 95.80 [2,] 97.60 97.9 99.30 99.70 99.7 100.00 100.90 100.4 99.0 98.60 100.20 [3,] 116.95 114.9 114.85 112.95 111.2 109.55 108.65 110.4 111.7 111.95 111.75 [4,] 179.90 190.8 174.20 170.00 170.3 159.30 147.90 154.2 164.5 173.90 163.60 [5,] 229.70 231.5 226.40 242.10 228.3 209.90 209.30 220.8 239.6 241.10 241.90 [,12] [1,] 94.70 [2,] 101.90 [3,] 109.35 [4,] 149.70 [5,] 149.70 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 63.86384 54.9765 66.53708 67.60423 65.66072 71.29958 78.33348 [2,] 170.03616 174.8235 163.16292 158.29577 156.73928 147.80042 138.96652 [,8] [,9] [,10] [,11] [,12] [1,] 75.69726 69.45038 63.37907 70.85495 78.51746 [2,] 145.10274 153.94962 160.52093 152.64505 140.18254 $out [1] 240.8 $group [1] 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(97.5, 97.6, 116.95, 179.9, 229.7, 97.1, 97.9, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5ywhg1210682540.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,] 209.30 147.90 113.40 94.70 97.60 97.10 NA [2,] 223.60 156.75 116.55 98.00 98.15 98.20 NA [3,] 230.60 167.25 120.60 104.25 99.20 99.85 NA [4,] 240.95 174.05 123.30 105.05 99.85 101.85 NA [5,] 242.10 190.80 128.20 105.70 101.90 103.20 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 222.6865 159.3594 117.5213 101.0344 98.42462 98.18521 NA [2,] 238.5135 175.1406 123.6787 107.4656 99.97538 101.51479 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(209.3, 223.6, 230.6, 240.95, 242.1, 147.9, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6fjp51210682540.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,] 43.27181 110.20 37.6250 [2,] 50.05652 125.45 45.6500 [3,] 54.83636 133.30 55.1125 [4,] 56.73822 143.85 61.3750 [5,] 57.79264 146.10 74.5750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 51.78879 124.9076 47.94022 [2,] 57.88393 141.6924 62.28478 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(43.2718114558042, 50.0565174170191, 54.8363603553712, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/109fi1210682540.ps tmp/109fi1210682540.png") > system("convert tmp/25gv31210682540.ps tmp/25gv31210682540.png") > system("convert tmp/31z7a1210682540.ps tmp/31z7a1210682540.png") > system("convert tmp/4fbk31210682540.ps tmp/4fbk31210682540.png") > system("convert tmp/5ywhg1210682540.ps tmp/5ywhg1210682540.png") > system("convert tmp/6fjp51210682540.ps tmp/6fjp51210682540.png") > > > proc.time() user system elapsed 1.275 0.822 1.602