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. Natural language support but running in an English locale 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(102.8,106.3,103.7,106.9,104.3,105.4,96.2,95.7,95.9,93.6,94.7,94.5,96.6,96.7,98.9,102,105.2,106.4,99.3,96.4,93.1,95.6,93.3,96.7,105.6,105.2,107,104.9,104.5,105.2,99.7,100.2,98.5,98.4,97.1,98.4,100.6,111.3,119,117.8,108.8,109.3,103.5,103.7,110,105.5,110.4,106.7,110.2,105.2,108,108.1,107.2,106,99.4,100.2,100.3,100.8,99.5,100.2,103,111,120.5,109.5,106.6,105.5,103.9,104.9,104.8,99.6,97,95.4,99.3,103.9,107.4,107.4,111,113.2,108.5,113.3,113.8,105.3,107.5,109.4,118.9,119,115,124.1,120.5,117.7,117.1,118.1,119.6,118.8,124.9,124,124.9,121.7,121.6,125.1,127.9,129,130.1,130.3,127.9,124.1,125.7,129.2,129.2,132.6,131.5,131,125.8,127.2,127.3,127.5,122,118.4,118.3,115.5) > 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] 120 > (np <- floor(n / par1)) [1] 10 > 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] 10 10 10 10 10 10 10 10 10 10 10 10 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] 102.8 96.6 105.6 100.6 110.2 103.0 99.3 118.9 124.9 129.2 NA [2,] 106.3 96.7 105.2 111.3 105.2 111.0 103.9 119.0 121.7 132.6 NA [3,] 103.7 98.9 107.0 119.0 108.0 120.5 107.4 115.0 121.6 131.5 NA [4,] 106.9 102.0 104.9 117.8 108.1 109.5 107.4 124.1 125.1 131.0 NA [5,] 104.3 105.2 104.5 108.8 107.2 106.6 111.0 120.5 127.9 125.8 NA [6,] 105.4 106.4 105.2 109.3 106.0 105.5 113.2 117.7 129.0 127.2 NA [7,] 96.2 99.3 99.7 103.5 99.4 103.9 108.5 117.1 130.1 127.3 NA [8,] 95.7 96.4 100.2 103.7 100.2 104.9 113.3 118.1 130.3 127.5 NA [9,] 95.9 93.1 98.5 110.0 100.3 104.8 113.8 119.6 127.9 122.0 NA [10,] 93.6 95.6 98.4 105.5 100.8 99.6 105.3 118.8 124.1 118.4 NA [11,] 94.7 93.3 97.1 110.4 99.5 97.0 107.5 124.9 125.7 118.3 NA [12,] 94.5 96.7 98.4 106.7 100.2 95.4 109.4 124.0 129.2 115.5 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/16rk71291228295.ps",horizontal=F,onefile=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/2hijr1291228295.ps",horizontal=F,onefile=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/3hijr1291228295.ps",horizontal=F,onefile=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/4r9ic1291228295.ps",horizontal=F,onefile=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,] 96.6 96.70 98.9 102.0 104.3 105.20 96.2 95.7 93.1 93.60 93.3 [2,] 100.6 105.20 107.0 106.9 105.2 105.50 99.4 100.2 98.5 98.40 97.0 [3,] 104.3 108.65 111.5 108.8 108.0 107.85 103.7 104.3 107.4 103.05 103.5 [4,] 118.9 119.00 120.5 124.1 120.5 117.70 117.1 118.1 119.6 118.40 118.3 [5,] 129.2 132.60 131.5 131.0 127.9 129.00 130.1 130.3 127.9 124.10 125.7 [,12] [1,] 94.50 [2,] 96.70 [3,] 103.45 [4,] 115.50 [5,] 129.20 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 95.15659 101.7550 104.7549 100.2062 100.3555 101.7544 94.85637 95.35645 [2,] 113.44341 115.5450 118.2451 117.3938 115.6445 113.9456 112.54363 113.24355 [,9] [,10] [,11] [,12] [1,] 96.8576 93.0572 92.85767 94.05677 [2,] 117.9424 113.0428 114.14233 112.84323 $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(96.6, 100.6, 104.3, 118.9, 129.2, 96.7, 105.2, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/5r9ic1291228295.ps",horizontal=F,onefile=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] [,8] [,9] [,10] [,11] [1,] 93.60 93.10 97.10 100.60 99.4 95.40 99.30 115.00 121.6 115.50 NA [2,] 95.20 96.00 98.45 104.60 100.2 101.30 106.35 117.90 124.5 120.20 NA [3,] 99.50 96.70 102.35 109.05 103.0 104.85 108.00 118.95 126.8 127.25 NA [4,] 104.85 100.65 105.20 110.85 107.6 108.05 112.10 122.25 129.1 130.10 NA [5,] 106.90 106.40 107.00 119.00 110.2 111.00 113.80 124.90 130.3 132.60 NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 95.09857 94.5791 99.27128 106.1993 99.62481 101.7713 105.3774 116.9659 [2,] 103.90143 98.8209 105.42872 111.9007 106.37519 107.9287 110.6226 120.9341 [,9] [,10] [,11] [1,] 124.7019 122.7345 NA [2,] 128.8981 131.7655 NA $out [1] 120.5 $group [1] 6 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(93.6, 95.2, 99.5, 104.85, 106.9, 93.1, 96, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/6r9ic1291228295.ps",horizontal=F,onefile=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,] 9.070073 23.60 10.9500 [2,] 9.980238 29.75 12.8000 [3,] 11.046029 32.60 15.5375 [4,] 12.277321 34.65 16.7750 [5,] 12.616836 35.90 19.3000 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 9.998314 30.36508 13.72448 [2,] 12.093745 34.83492 17.35052 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(9.07007288957604, 9.98023754109928, 11.0460293605214, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/16rk71291228295.ps tmp/16rk71291228295.png",intern=TRUE)) character(0) > try(system("convert tmp/2hijr1291228295.ps tmp/2hijr1291228295.png",intern=TRUE)) character(0) > try(system("convert tmp/3hijr1291228295.ps tmp/3hijr1291228295.png",intern=TRUE)) character(0) > try(system("convert tmp/4r9ic1291228295.ps tmp/4r9ic1291228295.png",intern=TRUE)) character(0) > try(system("convert tmp/5r9ic1291228295.ps tmp/5r9ic1291228295.png",intern=TRUE)) character(0) > try(system("convert tmp/6r9ic1291228295.ps tmp/6r9ic1291228295.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.693 1.243 1.904