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(-22,-31,-22,-26,-19,-20,-24,-29,-28,-31,-30,-32,-38,-43,-51,-43,-43,-42,-47,-45,-38,-46,-38,-32,-27,-26,-21,-23,-24,-17,-23,-16,-22,-26,-25,-21,-21,-18,-12,-19,-31,-38,-38,-32,-43,-33,-28,-25,-19,-20,-21,-19,-17,-16,-10,-16,-10,-8,-7,-15,-7,-6,-6,2,-4,-4,-8,-10,-16,-14,-30,-33) > 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,] -22 -38 -27 -21 -19 -7 NA [2,] -31 -43 -26 -18 -20 -6 NA [3,] -22 -51 -21 -12 -21 -6 NA [4,] -26 -43 -23 -19 -19 2 NA [5,] -19 -43 -24 -31 -17 -4 NA [6,] -20 -42 -17 -38 -16 -4 NA [7,] -24 -47 -23 -38 -10 -8 NA [8,] -29 -45 -16 -32 -16 -10 NA [9,] -28 -38 -22 -43 -10 -16 NA [10,] -31 -46 -26 -33 -8 -14 NA [11,] -30 -38 -25 -28 -7 -30 NA [12,] -32 -32 -21 -25 -15 -33 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/12vw61211141991.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/freestat/rcomp/tmp/2ox121211141991.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/freestat/rcomp/tmp/3uaru1211141991.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/freestat/rcomp/tmp/4o4cw1211141991.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,] -38.0 -43 -22 -26 -43.0 -42.0 -47.0 -45.0 -43 -46.0 -30 -33.0 [2,] -27.0 -31 -22 -26 -31.0 -38.0 -38.0 -32.0 -38 -33.0 -30 -32.0 [3,] -21.5 -23 -21 -21 -21.5 -18.5 -23.5 -22.5 -25 -28.5 -29 -28.5 [4,] -19.0 -18 -12 -19 -17.0 -16.0 -10.0 -16.0 -16 -14.0 -25 -21.0 [5,] -7.0 -6 -6 -19 -4.0 -4.0 -8.0 -10.0 -10 -8.0 -25 -15.0 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -26.66026 -31.38542 -27.45032 -25.51523 -30.53045 -32.690711 -41.560904 [2,] -16.33974 -14.61458 -14.54968 -16.48477 -12.46955 -4.309289 -5.439096 [,8] [,9] [,10] [,11] [,12] [1,] -32.82052 -39.19071 -40.75561 -32.22516 -35.59536 [2,] -12.17948 -10.80929 -16.24439 -25.77484 -21.40464 $out [1] -51 -43 2 -38 -7 $group [1] 3 4 4 11 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-38, -27, -21.5, -19, -7, -43, -31, -23, -18, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/58zts1211141991.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,] -32.0 -51.0 -27.0 -43.0 -21 -30.0 NA [2,] -30.5 -45.5 -25.5 -35.5 -19 -15.0 NA [3,] -27.0 -43.0 -23.0 -29.5 -16 -7.5 NA [4,] -22.0 -38.0 -21.0 -20.0 -10 -5.0 NA [5,] -19.0 -32.0 -16.0 -12.0 -7 2.0 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -30.87691 -46.4208 -25.05248 -36.56965 -20.10496 -12.061067 NA [2,] -23.12309 -39.5792 -20.94752 -22.43035 -11.89504 -2.938933 NA $out [1] -33 $group [1] 6 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(-32, -30.5, -27, -22, -19, -51, -45.5, -43, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/6pgal1211141991.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,] 7.31209 31.0 4.250 [2,] 11.48747 32.0 6.875 [3,] 13.15002 37.5 11.500 [4,] 14.45738 39.0 16.375 [5,] 15.48440 45.0 21.250 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 11.79542 34.30725 7.166986 [2,] 14.50462 40.69275 15.833014 $out [1] 18 $group [1] 2 $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(7.31209044437134, 11.4874660156887, 13.1500210109532, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/12vw61211141991.ps tmp/12vw61211141991.png") > system("convert tmp/2ox121211141991.ps tmp/2ox121211141991.png") > system("convert tmp/3uaru1211141991.ps tmp/3uaru1211141991.png") > system("convert tmp/4o4cw1211141991.ps tmp/4o4cw1211141991.png") > system("convert tmp/58zts1211141991.ps tmp/58zts1211141991.png") > system("convert tmp/6pgal1211141991.ps tmp/6pgal1211141991.png") > > > proc.time() user system elapsed 1.807 1.169 1.952