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.2,116.7,114.8,100.0,98.8,106.3,119.5,120.7,121.1,112.4,108.2,113.6,106.7,114.3,117.3,109.6,109.9,112.5,116.1,112.0,113.3,107.9,108.2,114.8,105.6,111.9,113.6,108.4,111.1,112.5,112.6,108.7,108.9,104.5,105.9,111.1,102.2,108.3,112.3,110.8,108.6,103.8,96.6,88.0,85.6,88.8,92.9,98.8,88.8,90.5,87.7,81.9,80.2,86.3,94.3,94.6,92.2,88.8,88.2,96.3) > 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.2 106.7 105.6 102.2 88.8 NA [2,] 116.7 114.3 111.9 108.3 90.5 NA [3,] 114.8 117.3 113.6 112.3 87.7 NA [4,] 100.0 109.6 108.4 110.8 81.9 NA [5,] 98.8 109.9 111.1 108.6 80.2 NA [6,] 106.3 112.5 112.5 103.8 86.3 NA [7,] 119.5 116.1 112.6 96.6 94.3 NA [8,] 120.7 112.0 108.7 88.0 94.6 NA [9,] 121.1 113.3 108.9 85.6 92.2 NA [10,] 112.4 107.9 104.5 88.8 88.8 NA [11,] 108.2 108.2 105.9 92.9 88.2 NA [12,] 113.6 114.8 111.1 98.8 96.3 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/105gw1258138473.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/2jeol1258138473.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/3sw451258138473.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/4xwb21258138473.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,] 102.2 108.3 112.3 100.0 98.8 103.8 94.3 88.0 85.6 88.8 88.2 96.3 [2,] 102.2 108.3 112.3 100.0 98.8 103.8 96.6 94.6 92.2 88.8 92.9 98.8 [3,] 105.6 111.9 113.6 108.4 108.6 106.3 112.6 108.7 108.9 104.5 105.9 111.1 [4,] 106.7 114.3 114.8 109.6 109.9 112.5 116.1 112.0 113.3 107.9 108.2 113.6 [5,] 111.2 116.7 117.3 110.8 111.1 112.5 119.5 120.7 121.1 112.4 108.2 114.8 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 102.4203 107.6604 111.8335 101.6167 100.7568 100.1526 98.82135 96.4052 [2,] 108.7797 116.1396 115.3665 115.1833 116.4432 112.4474 126.37865 120.9948 [,9] [,10] [,11] [,12] [1,] 93.9908 91.00399 95.08906 100.6424 [2,] 123.8092 117.99601 116.71094 121.5576 $out [1] 88.8 90.5 87.7 81.9 80.2 86.3 $group [1] 1 2 3 4 5 6 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(102.2, 102.2, 105.6, 106.7, 111.2, 108.3, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/51eih1258138473.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,] 98.80 106.70 104.50 85.60 80.20 NA [2,] 107.25 108.90 107.15 90.85 87.00 NA [3,] 113.00 112.25 110.00 100.50 88.80 NA [4,] 118.10 114.55 112.20 108.45 93.25 NA [5,] 121.10 117.30 113.60 112.30 96.30 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 108.0512 109.673 107.6967 92.47252 85.94933 NA [2,] 117.9488 114.827 112.3033 108.52748 91.65067 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(98.8, 107.25, 113, 118.1, 121.1, 106.7, 108.9, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6f6ug1258138473.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,] 8.513519 18.50 2.50 [2,] 9.943409 23.00 7.35 [3,] 11.302852 26.20 12.95 [4,] 12.552806 30.25 18.25 [5,] 14.836341 35.50 21.10 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 10.11269 22.89323 7.978437 [2,] 12.49302 29.50677 17.921563 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(8.5135186615171, 9.94340927164466, 11.3028516185039, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/105gw1258138473.ps tmp/105gw1258138473.png") > system("convert tmp/2jeol1258138473.ps tmp/2jeol1258138473.png") > system("convert tmp/3sw451258138473.ps tmp/3sw451258138473.png") > system("convert tmp/4xwb21258138473.ps tmp/4xwb21258138473.png") > system("convert tmp/51eih1258138473.ps tmp/51eih1258138473.png") > system("convert tmp/6f6ug1258138473.ps tmp/6f6ug1258138473.png") > > > proc.time() user system elapsed 1.073 0.832 1.426