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(8.55,8.56,8.57,8.59,8.61,8.62,8.62,8.63,8.71,8.72,8.74,8.75,8.79,8.82,8.82,8.84,8.86,8.86,8.85,8.86,8.86,8.87,8.88,8.9,8.91,8.96,8.98,8.99,9,9,9,9.01,9.01,8.99,8.99,8.99,9,9,9.02,9.05,9.05,9.05,9.06,9.06,9.08,9.07,9.06,9.08,9.07,9.11,9.15,9.15,9.17,9.2,9.23,9.26,9.27,9.28,9.29,9.29,9.11,9.06,9.11,9.13,9.13,9.19,9.2,9.23,9.24,9.28,9.32,9.32,9.32,9.36,9.37,9.38,9.41,9.44,9.44,9.44,9.47,9.48,9.56,9.58,9.56,9.58,9.7,9.74,9.76,9.78,9.84,9.88,9.96,9.97,9.96,9.96) > par1 = '12' > par1 <- as.numeric(par1) > (n <- length(x)) [1] 96 > (np <- floor(n / par1)) [1] 8 > arr <- array(NA,dim=c(par1,np+1)) > darr <- array(NA,dim=c(par1,np+1)) > ari <- array(0,dim=par1) > dx <- diff(x) > j <- 0 > for (i in 1:n) + { + j = j + 1 + ari[j] = ari[j] + 1 + arr[j,ari[j]] <- x[i] + darr[j,ari[j]] <- dx[i] + if (j == par1) j = 0 + } > ari [1] 8 8 8 8 8 8 8 8 8 8 8 8 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 8.55 8.79 8.91 9.00 9.07 9.11 9.32 9.56 NA [2,] 8.56 8.82 8.96 9.00 9.11 9.06 9.36 9.58 NA [3,] 8.57 8.82 8.98 9.02 9.15 9.11 9.37 9.70 NA [4,] 8.59 8.84 8.99 9.05 9.15 9.13 9.38 9.74 NA [5,] 8.61 8.86 9.00 9.05 9.17 9.13 9.41 9.76 NA [6,] 8.62 8.86 9.00 9.05 9.20 9.19 9.44 9.78 NA [7,] 8.62 8.85 9.00 9.06 9.23 9.20 9.44 9.84 NA [8,] 8.63 8.86 9.01 9.06 9.26 9.23 9.44 9.88 NA [9,] 8.71 8.86 9.01 9.08 9.27 9.24 9.47 9.96 NA [10,] 8.72 8.87 8.99 9.07 9.28 9.28 9.48 9.97 NA [11,] 8.74 8.88 8.99 9.06 9.29 9.32 9.56 9.96 NA [12,] 8.75 8.90 8.99 9.08 9.29 9.32 9.58 9.96 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 0.01 0.03 0.05 0.00 0.04 -0.05 0.04 0.02 NA [2,] 0.01 0.00 0.02 0.02 0.04 0.05 0.01 0.12 NA [3,] 0.02 0.02 0.01 0.03 0.00 0.02 0.01 0.04 NA [4,] 0.02 0.02 0.01 0.00 0.02 0.00 0.03 0.02 NA [5,] 0.01 0.00 0.00 0.00 0.03 0.06 0.03 0.02 NA [6,] 0.00 -0.01 0.00 0.01 0.03 0.01 0.00 0.06 NA [7,] 0.01 0.01 0.01 0.00 0.03 0.03 0.00 0.04 NA [8,] 0.08 0.00 0.00 0.02 0.01 0.01 0.03 0.08 NA [9,] 0.01 0.01 -0.02 -0.01 0.01 0.04 0.01 0.01 NA [10,] 0.02 0.01 0.00 -0.01 0.01 0.04 0.08 -0.01 NA [11,] 0.01 0.02 0.00 0.02 0.00 0.00 0.02 0.00 NA [12,] 0.04 0.01 0.01 -0.01 -0.18 0.00 -0.02 NA NA > arr.mean <- array(NA,dim=par1) > arr.median <- array(NA,dim=par1) > arr.midrange <- array(NA,dim=par1) > for (j in 1:par1) + { + arr.mean[j] <- mean(arr[j,],na.rm=TRUE) + arr.median[j] <- median(arr[j,],na.rm=TRUE) + arr.midrange[j] <- (quantile(arr[j,],0.75,na.rm=TRUE) + quantile(arr[j,],0.25,na.rm=TRUE)) / 2 + } > overall.mean <- mean(x) > overall.median <- median(x) > overall.midrange <- (quantile(x,0.75) + quantile(x,0.25)) / 2 > postscript(file="/var/www/html/rcomp/tmp/1sgju1259698925.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.mean,type='b',ylab='mean',main='Mean Plot',xlab='Periodic Index') > mtext(paste('#blocks = ',np)) > abline(overall.mean,0) > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/214jj1259698925.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.median,type='b',ylab='median',main='Median Plot',xlab='Periodic Index') > mtext(paste('#blocks = ',np)) > abline(overall.median,0) > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/3442w1259698925.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.midrange,type='b',ylab='midrange',main='Midrange Plot',xlab='Periodic Index') > mtext(paste('#blocks = ',np)) > abline(overall.midrange,0) > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/400f71259698925.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,] 8.550 8.560 8.570 8.590 8.61 8.62 8.620 8.630 8.710 8.720 8.740 8.750 [2,] 8.850 8.890 8.900 8.915 8.93 8.93 8.925 8.935 8.935 8.930 8.935 8.945 [3,] 9.035 9.030 9.065 9.090 9.09 9.12 9.130 9.145 9.160 9.175 9.175 9.185 [4,] 9.215 9.235 9.260 9.265 9.29 9.32 9.335 9.350 9.370 9.380 9.440 9.450 [5,] 9.560 9.580 9.700 9.740 9.76 9.78 9.840 9.880 9.960 9.970 9.960 9.960 $n [1] 8 8 8 8 8 8 8 8 8 8 8 8 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 8.831106 8.837278 8.863899 8.894485 8.888899 8.90214 8.900968 8.913175 [2,] 9.238894 9.222722 9.266101 9.285515 9.291101 9.33786 9.359032 9.376825 [,9] [,10] [,11] [,12] [1,] 8.917003 8.923624 8.8929 8.9029 [2,] 9.402997 9.426376 9.4571 9.4671 $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(8.55, 8.85, 9.035, 9.215, 9.56, 8.56, 8.89, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/53gn51259698925.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(t(darr)) > names(z) <- c(1:par1) > (boxplot(z,notch=TRUE,col='grey',xlab='Periodic Index',ylab='Value',main='Notched Box Plots - Differenced Periodic Subseries')) $stats [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0.000 0.000 0.000 0.000 0.000 -0.010 0.000 0.000 -0.01 -0.010 0.000 -0.020 [2,] 0.005 0.010 0.010 0.005 0.000 0.000 0.005 0.005 0.00 -0.005 0.000 -0.015 [3,] 0.025 0.020 0.020 0.020 0.015 0.005 0.010 0.015 0.01 0.010 0.005 0.000 [4,] 0.040 0.045 0.025 0.020 0.030 0.020 0.030 0.055 0.01 0.030 0.020 0.010 [5,] 0.050 0.050 0.040 0.030 0.060 0.030 0.040 0.080 0.01 0.080 0.020 0.040 $n [1] 8 8 8 8 8 8 8 8 8 8 8 7 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.005448498 0.0004484975 0.01162078 0.01162078 -0.001758431 -0.006172287 [2,] 0.044551502 0.0395515025 0.02837922 0.02837922 0.031758431 0.016172287 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.003965359 -0.01293072 0.004413856 -0.009551502 -0.006172287 -0.01492960 [2,] 0.023965359 0.04293072 0.015586144 0.029551502 0.016172287 0.01492960 $out [1] -0.05 0.12 0.06 -0.02 0.04 -0.18 $group [1] 1 2 6 9 9 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0, 0.00499999999999989, 0.0250000000000004, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/61e121259698925.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] [,8] [,9] [1,] 8.550 8.790 8.980 9.000 9.070 9.060 9.320 9.56 NA [2,] 8.580 8.830 8.985 9.035 9.150 9.120 9.375 9.72 NA [3,] 8.620 8.860 8.990 9.055 9.215 9.195 9.440 9.81 NA [4,] 8.715 8.865 9.000 9.065 9.275 9.260 9.475 9.96 NA [5,] 8.750 8.900 9.010 9.080 9.290 9.320 9.580 9.97 NA $n [1] 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 8.558426 8.844036 8.983158 9.041317 9.157987 9.131145 9.39439 9.700534 [2,] 8.681574 8.875964 8.996842 9.068683 9.272013 9.258855 9.48561 9.919466 [,9] [1,] NA [2,] NA $out [1] 8.91 8.96 $group [1] 3 3 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" NA Warning message: In bxp(list(stats = c(8.55, 8.58, 8.62, 8.715, 8.75, 8.79, 8.83, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7o6191259698925.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(cbind(arr.mean,arr.median,arr.midrange)) > names(z) <- list('mean','median','midrange') > (boxplot(z,notch=TRUE,col='grey',ylab='Overall Central Tendency',main='Notched Box Plots')) $stats [,1] [,2] [,3] [1,] 9.038750 9.0300 9.021250 [2,] 9.099375 9.0775 9.076250 [3,] 9.148750 9.1250 9.117500 [4,] 9.203750 9.1675 9.145625 [5,] 9.233750 9.1850 9.176250 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 9.101144 9.08395 9.085858 [2,] 9.196356 9.16605 9.149142 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(9.03875, 9.099375, 9.14875, 9.20375, 9.23375, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1sgju1259698925.ps tmp/1sgju1259698925.png") > system("convert tmp/214jj1259698925.ps tmp/214jj1259698925.png") > system("convert tmp/3442w1259698925.ps tmp/3442w1259698925.png") > system("convert tmp/400f71259698925.ps tmp/400f71259698925.png") > system("convert tmp/53gn51259698925.ps tmp/53gn51259698925.png") > system("convert tmp/61e121259698925.ps tmp/61e121259698925.png") > system("convert tmp/7o6191259698925.ps tmp/7o6191259698925.png") > > > proc.time() user system elapsed 1.191 0.947 1.464