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(111.632,106.707,108.827,108.413,106.249,104.861,102.382,100.320,100.228,117.089,121.523,114.948,112.831,107.605,108.928,101.993,102.850,99.925,101.536,99.450,98.305,110.159,109.483,106.810,96.279,91.982,90.276,90.999,86.622,83.117,80.367,77.550,77.443,92.844,92.175,84.822,81.632,78.872,81.485,80.651,78.192,76.844,76.335,71.415,73.889,86.822,86.371,83.469,82.662,82.880,89.406,95.378,97.657,100.247,99.180,97.493,101.628,114.585,115.669,111.311) > 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,] 111.632 112.831 96.279 81.632 82.662 NA [2,] 106.707 107.605 91.982 78.872 82.880 NA [3,] 108.827 108.928 90.276 81.485 89.406 NA [4,] 108.413 101.993 90.999 80.651 95.378 NA [5,] 106.249 102.850 86.622 78.192 97.657 NA [6,] 104.861 99.925 83.117 76.844 100.247 NA [7,] 102.382 101.536 80.367 76.335 99.180 NA [8,] 100.320 99.450 77.550 71.415 97.493 NA [9,] 100.228 98.305 77.443 73.889 101.628 NA [10,] 117.089 110.159 92.844 86.822 114.585 NA [11,] 121.523 109.483 92.175 86.371 115.669 NA [12,] 114.948 106.810 84.822 83.469 111.311 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/1ubpo1258126171.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/2ot7f1258126171.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/34m0s1258126171.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/4z3481258126171.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] [1,] 81.632 78.872 81.485 80.651 78.192 76.844 76.335 71.415 73.889 [2,] 82.662 82.880 89.406 90.999 86.622 83.117 80.367 77.550 77.443 [3,] 96.279 91.982 90.276 95.378 97.657 99.925 99.180 97.493 98.305 [4,] 111.632 106.707 108.827 101.993 102.850 100.247 101.536 99.450 100.228 [5,] 112.831 107.605 108.928 108.413 106.249 104.861 102.382 100.320 101.628 [,10] [,11] [,12] [1,] 86.822 86.371 83.469 [2,] 92.844 92.175 84.822 [3,] 110.159 109.483 106.810 [4,] 114.585 115.669 111.311 [5,] 117.089 121.523 114.948 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 75.80887 75.1459 76.55317 87.60967 86.19034 87.82099 84.22204 [2,] 116.74913 108.8181 103.99883 103.14633 109.12366 112.02901 114.13796 [,8] [,9] [,10] [,11] [,12] [1,] 82.01852 82.20518 94.79686 92.8822 88.09294 [2,] 112.96748 114.40482 125.52114 126.0838 125.52706 $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(81.632, 82.662, 96.279, 111.632, 112.831, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/586g11258126171.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,] 100.2280 98.3050 77.4430 71.4150 82.6620 NA [2,] 103.6215 100.7305 81.7420 76.5895 92.3920 NA [3,] 107.5600 104.8300 88.4490 79.7615 98.4185 NA [4,] 113.2900 109.2055 92.0785 82.5505 106.4695 NA [5,] 121.5230 112.8310 96.2790 86.8220 115.6690 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 103.1501 100.9645 83.73445 77.04265 91.99766 NA [2,] 111.9699 108.6955 93.16355 82.48035 104.83934 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(100.228, 103.6215, 107.56, 113.29, 121.523, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/63h4h1258126171.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,] 10.60272 26.0470 10.9940 [2,] 12.33967 27.7505 18.2755 [3,] 13.35983 28.3950 21.8205 [4,] 14.34859 30.7330 23.6605 [5,] 15.15293 35.1520 28.9700 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 12.44355 27.03466 19.36437 [2,] 14.27612 29.75534 24.27663 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(10.6027170197077, 12.3396745910251, 13.3598334711263, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1ubpo1258126171.ps tmp/1ubpo1258126171.png") > system("convert tmp/2ot7f1258126171.ps tmp/2ot7f1258126171.png") > system("convert tmp/34m0s1258126171.ps tmp/34m0s1258126171.png") > system("convert tmp/4z3481258126171.ps tmp/4z3481258126171.png") > system("convert tmp/586g11258126171.ps tmp/586g11258126171.png") > system("convert tmp/63h4h1258126171.ps tmp/63h4h1258126171.png") > > > proc.time() user system elapsed 1.075 0.820 1.302