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(58.1,57.9,57.3,55.9,55,55.9,56.6,57.3,56.2,57.7,56.8,57.9,58.3,58.2,56.9,57.1,56.7,54.2,54.2,52.1,51.5,51.8,53,52.4,52.41,52.36,52.94,52.34,51.84,51.42,50.85,50.66,51.53,51.59,52.32,51.98,51.17,50.57,49.84,50.12,49.08,48.57,47.22,46.78,46.04,45.05,44.42,44.09,44.46,44.34,43.04,42.87,42.32,42.49,41.94,41.6,41.42,41.12,41.28,40.21,39.69,39.16,38.8,38.44,37.02,36.75,35.95,36.29,36.35,36.07,36.6,36.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] 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,] 58.1 58.3 52.41 51.17 44.46 39.69 NA [2,] 57.9 58.2 52.36 50.57 44.34 39.16 NA [3,] 57.3 56.9 52.94 49.84 43.04 38.80 NA [4,] 55.9 57.1 52.34 50.12 42.87 38.44 NA [5,] 55.0 56.7 51.84 49.08 42.32 37.02 NA [6,] 55.9 54.2 51.42 48.57 42.49 36.75 NA [7,] 56.6 54.2 50.85 47.22 41.94 35.95 NA [8,] 57.3 52.1 50.66 46.78 41.60 36.29 NA [9,] 56.2 51.5 51.53 46.04 41.42 36.35 NA [10,] 57.7 51.8 51.59 45.05 41.12 36.07 NA [11,] 56.8 53.0 52.32 44.42 41.28 36.60 NA [12,] 57.9 52.4 51.98 44.09 40.21 36.50 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/1hszs1211035545.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/2x7ec1211035545.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/37k6u1211035545.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/44n551211035545.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] [1,] 39.69 39.160 38.80 38.44 37.02 36.750 35.950 36.29 36.35 36.07 36.60 [2,] 44.46 44.340 43.04 42.87 42.32 42.490 41.940 41.60 41.42 41.12 41.28 [3,] 51.79 51.465 51.39 51.23 50.46 49.995 49.035 48.72 48.77 48.32 48.37 [4,] 58.10 57.900 56.90 55.90 55.00 54.200 54.200 52.10 51.53 51.80 53.00 [5,] 58.30 58.200 57.30 57.10 56.70 55.900 56.600 57.30 56.20 57.70 56.80 [,12] [1,] 36.500 [2,] 40.210 [3,] 48.035 [4,] 52.400 [5,] 57.900 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 42.99176 42.71836 42.44985 42.82523 42.28099 42.44167 41.1269 41.94716 [2,] 60.58824 60.21164 60.33015 59.63477 58.63901 57.54833 56.9431 55.49284 [,9] [,10] [,11] [,12] [1,] 42.24872 41.43106 40.81022 40.17206 [2,] 55.29128 55.20894 55.92978 55.89794 $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(39.69, 44.46, 51.79, 58.1, 58.3, 39.16, 44.34, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5s6d71211035545.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,] 55.00 51.50 50.660 44.090 40.210 35.950 NA [2,] 56.05 52.25 51.475 45.545 41.350 36.320 NA [3,] 57.05 54.20 51.910 47.895 42.130 36.675 NA [4,] 57.80 57.00 52.350 49.980 42.955 38.620 NA [5,] 58.10 58.30 52.940 51.170 44.460 39.690 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 56.25181 52.03349 51.51091 45.87217 41.39795 35.62595 NA [2,] 57.84819 56.36651 52.30909 49.91783 42.86205 37.72405 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(55, 56.05, 57.05, 57.8, 58.1, 51.5, 52.25, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6abz11211035545.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.341649 18.500 8.84500 [2,] 7.411214 18.850 9.57000 [3,] 7.564240 19.765 10.26375 [4,] 7.808297 20.830 10.69125 [5,] 8.214599 21.630 11.17000 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 7.383128 18.86191 9.75234 [2,] 7.745352 20.66809 10.77516 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(7.34164945136082, 7.41121439469847, 7.56424033848476, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1hszs1211035545.ps tmp/1hszs1211035545.png") > system("convert tmp/2x7ec1211035545.ps tmp/2x7ec1211035545.png") > system("convert tmp/37k6u1211035545.ps tmp/37k6u1211035545.png") > system("convert tmp/44n551211035545.ps tmp/44n551211035545.png") > system("convert tmp/5s6d71211035545.ps tmp/5s6d71211035545.png") > system("convert tmp/6abz11211035545.ps tmp/6abz11211035545.png") > > > proc.time() user system elapsed 1.299 0.839 1.550