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(2.02,1.99,1.99,2.01,2.01,2.01,2,2.01,2.02,2.01,2,2.01,2.01,2.01,2,2,1.98,2.01,1.99,1.99,2,2,1.99,1.96,1.98,1.98,1.99,1.99,1.99,1.99,1.98,1.98,1.98,1.98,1.98,1.98,1.97,1.99,2,1.99,1.98,1.98,1.96,1.95,1.94,1.93,1.92,1.91,1.92,1.93,1.94,1.93,1.94,1.93,1.93,1.92,1.92,1.91,1.92,1.92,1.93,1.91,1.95,2.01,1.98,2.01,2,1.99,1.98,1.98,1.99,1.98,1.99) > 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] 73 > (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] 7 6 6 6 6 6 6 6 6 6 6 6 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 2.02 2.01 1.98 1.97 1.92 1.93 1.99 [2,] 1.99 2.01 1.98 1.99 1.93 1.91 NA [3,] 1.99 2.00 1.99 2.00 1.94 1.95 NA [4,] 2.01 2.00 1.99 1.99 1.93 2.01 NA [5,] 2.01 1.98 1.99 1.98 1.94 1.98 NA [6,] 2.01 2.01 1.99 1.98 1.93 2.01 NA [7,] 2.00 1.99 1.98 1.96 1.93 2.00 NA [8,] 2.01 1.99 1.98 1.95 1.92 1.99 NA [9,] 2.02 2.00 1.98 1.94 1.92 1.98 NA [10,] 2.01 2.00 1.98 1.93 1.91 1.98 NA [11,] 2.00 1.99 1.98 1.92 1.92 1.99 NA [12,] 2.01 1.96 1.98 1.91 1.92 1.98 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/1na7m1211116935.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/2n7rh1211116935.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/3hpb21211116935.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/48j551211116935.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,] 1.92 1.910 1.94 1.990 1.98 1.98 1.930 1.920 1.92 1.91 1.920 1.91 [2,] 1.95 1.930 1.95 1.990 1.98 1.98 1.960 1.950 1.94 1.93 1.920 1.92 [3,] 1.98 1.985 1.99 1.995 1.98 2.00 1.985 1.985 1.98 1.98 1.985 1.97 [4,] 2.00 1.990 2.00 2.010 1.99 2.01 2.000 1.990 2.00 2.00 1.990 1.98 [5,] 2.02 2.010 2.00 2.010 1.99 2.01 2.000 2.010 2.02 2.01 2.000 2.01 $n [1] 7 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 1.950141 1.946298 1.957748 1.982099 1.973550 1.980649 1.959199 1.959199 [2,] 2.009859 2.023702 2.022252 2.007901 1.986450 2.019351 2.010801 2.010801 [,9] [,10] [,11] [,12] [1,] 1.941298 1.934848 1.939848 1.931298 [2,] 2.018702 2.025152 2.030152 2.008702 $out [1] 1.93 2.01 1.94 1.93 $group [1] 4 5 5 6 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(1.92, 1.95, 1.98, 2, 2.02, 1.91, 1.93, 1.985, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/5p1ez1211116935.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,] 1.99 1.980 1.98 1.910 1.910 1.930 1.99 [2,] 2.00 1.990 1.98 1.935 1.920 1.965 1.99 [3,] 2.01 2.000 1.98 1.965 1.925 1.980 1.99 [4,] 2.01 2.005 1.99 1.985 1.930 1.995 1.99 [5,] 2.02 2.010 1.99 2.000 1.940 2.010 1.99 $n [1] 12 12 12 12 12 12 1 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 2.005439 1.993158 1.975439 1.942195 1.920439 1.966317 1.99 [2,] 2.014561 2.006842 1.984561 1.987805 1.929561 1.993683 1.99 $out [1] 1.96 1.91 $group [1] 2 6 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(1.99, 2, 2.01, 2.01, 2.02, 1.98, 1.99, 2, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/6d3711211116935.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,] 0.02280351 0.060 0.00750 [2,] 0.02863480 0.075 0.03000 [3,] 0.03467841 0.085 0.04125 [4,] 0.03813361 0.100 0.05000 [5,] 0.03970726 0.100 0.05500 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 0.03034594 0.07359733 0.03212787 [2,] 0.03901088 0.09640267 0.05037213 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(0.0228035085019827, 0.0286347974755966, 0.0346784102112517, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1na7m1211116935.ps tmp/1na7m1211116935.png") > system("convert tmp/2n7rh1211116935.ps tmp/2n7rh1211116935.png") > system("convert tmp/3hpb21211116935.ps tmp/3hpb21211116935.png") > system("convert tmp/48j551211116935.ps tmp/48j551211116935.png") > system("convert tmp/5p1ez1211116935.ps tmp/5p1ez1211116935.png") > system("convert tmp/6d3711211116935.ps tmp/6d3711211116935.png") > > > proc.time() user system elapsed 1.805 1.173 1.961