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(139,135,130,127,122,117,112,113,149,157,157,147,137,132,125,123,117,114,111,112,144,150,149,134,123,116,117,111,105,102,95,93,124,130,124,115,106,105,105,101,95,93,84,87,116,120,117,109,105,107,109,109,108,107,99,103,131,137,135,124) > 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,] 139 137 123 106 105 NA [2,] 135 132 116 105 107 NA [3,] 130 125 117 105 109 NA [4,] 127 123 111 101 109 NA [5,] 122 117 105 95 108 NA [6,] 117 114 102 93 107 NA [7,] 112 111 95 84 99 NA [8,] 113 112 93 87 103 NA [9,] 149 144 124 116 131 NA [10,] 157 150 130 120 137 NA [11,] 157 149 124 117 135 NA [12,] 147 134 115 109 124 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/1nm7q1258663758.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/2fupj1258663758.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/33thn1258663758.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/4ffgw1258663758.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,] 105 105 105 101 95 93 84 87 116 120 117 109 [2,] 106 107 109 109 105 102 95 93 124 130 124 115 [3,] 123 116 117 111 108 107 99 103 131 137 135 124 [4,] 137 132 125 123 117 114 111 112 144 150 149 134 [5,] 139 135 130 127 122 117 112 113 149 157 157 147 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 101.0955 98.33506 105.6944 101.1076 99.52083 98.52083 87.69444 [2,] 144.9045 133.66494 128.3056 120.8924 116.47917 115.47917 110.30556 [,8] [,9] [,10] [,11] [,12] [1,] 89.57465 116.8681 122.8681 117.3351 110.5746 [2,] 116.42535 145.1319 151.1319 152.6649 137.4254 $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(105, 106, 123, 137, 139, 105, 107, 116, 132, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/52tak1258663758.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,] 112.0 111.0 93.0 84.0 99.0 NA [2,] 119.5 115.5 103.5 94.0 106.0 NA [3,] 132.5 128.5 115.5 105.0 108.5 NA [4,] 148.0 140.5 123.5 112.5 127.5 NA [5,] 157.0 150.0 130.0 120.0 137.0 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 119.5010 117.0973 106.3779 96.56203 98.6937 NA [2,] 145.4990 139.9027 124.6221 113.43797 118.3063 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(112, 119.5, 132.5, 148, 157, 111, 115.5, 128.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6425d1258663758.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,] 9.607289 24.0 12.0 [2,] 10.594715 26.0 15.0 [3,] 12.696121 29.0 19.0 [4,] 15.039497 35.5 22.5 [5,] 16.697305 40.0 31.0 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 10.66883 24.66699 15.5792 [2,] 14.72342 33.33301 22.4208 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(9.60728889958036, 10.5947151892693, 12.6961212405469, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1nm7q1258663758.ps tmp/1nm7q1258663758.png") > system("convert tmp/2fupj1258663758.ps tmp/2fupj1258663758.png") > system("convert tmp/33thn1258663758.ps tmp/33thn1258663758.png") > system("convert tmp/4ffgw1258663758.ps tmp/4ffgw1258663758.png") > system("convert tmp/52tak1258663758.ps tmp/52tak1258663758.png") > system("convert tmp/6425d1258663758.ps tmp/6425d1258663758.png") > > > proc.time() user system elapsed 1.060 0.821 1.277