R version 2.12.1 (2010-12-16) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-pc-linux-gnu (32-bit) 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. Natural language support but running in an English locale 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(31.514,27.071,29.462,26.105,22.397,23.843,21.705,18.089,20.764,25.316,17.704,15.548,28.029,29.383,36.438,32.034,22.679,24.319,18.004,17.537,20.366,22.782,19.169,13.807,29.743,25.591,29.096,26.482,22.405,27.044,17.970,18.730,19.684,19.785,18.479,10.698,31.956,29.506,34.506,27.165,26.736,23.691,18.157,17.328,18.205,20.995,17.382,9.367,31.124,26.551,30.651,25.859,25.100,25.778,20.418,18.688,20.424,24.776,19.814,12.738,31.566,30.111,30.019,31.934,25.826,26.835,20.205,17.789,20.520,22.518,15.572,11.509,25.447,24.090,27.786,26.195,20.516,22.759,19.028,16.971,20.036,22.485,18.730,14.538,27.561,25.985,34.670,32.066,27.186,29.586,21.359,21.553,19.573,24.256,22.380,16.167,27.297,28.287) > par1 = '12' > par1 <- as.numeric(par1) > (n <- length(x)) [1] 98 > (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] 9 9 8 8 8 8 8 8 8 8 8 8 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 31.514 28.029 29.743 31.956 31.124 31.566 25.447 27.561 27.297 [2,] 27.071 29.383 25.591 29.506 26.551 30.111 24.090 25.985 28.287 [3,] 29.462 36.438 29.096 34.506 30.651 30.019 27.786 34.670 NA [4,] 26.105 32.034 26.482 27.165 25.859 31.934 26.195 32.066 NA [5,] 22.397 22.679 22.405 26.736 25.100 25.826 20.516 27.186 NA [6,] 23.843 24.319 27.044 23.691 25.778 26.835 22.759 29.586 NA [7,] 21.705 18.004 17.970 18.157 20.418 20.205 19.028 21.359 NA [8,] 18.089 17.537 18.730 17.328 18.688 17.789 16.971 21.553 NA [9,] 20.764 20.366 19.684 18.205 20.424 20.520 20.036 19.573 NA [10,] 25.316 22.782 19.785 20.995 24.776 22.518 22.485 24.256 NA [11,] 17.704 19.169 18.479 17.382 19.814 15.572 18.730 22.380 NA [12,] 15.548 13.807 10.698 9.367 12.738 11.509 14.538 16.167 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] -4.443 1.354 -4.152 -2.450 -4.573 -1.455 -1.357 -1.576 0.99 [2,] 2.391 7.055 3.505 5.000 4.100 -0.092 3.696 8.685 NA [3,] -3.357 -4.404 -2.614 -7.341 -4.792 1.915 -1.591 -2.604 NA [4,] -3.708 -9.355 -4.077 -0.429 -0.759 -6.108 -5.679 -4.880 NA [5,] 1.446 1.640 4.639 -3.045 0.678 1.009 2.243 2.400 NA [6,] -2.138 -6.315 -9.074 -5.534 -5.360 -6.630 -3.731 -8.227 NA [7,] -3.616 -0.467 0.760 -0.829 -1.730 -2.416 -2.057 0.194 NA [8,] 2.675 2.829 0.954 0.877 1.736 2.731 3.065 -1.980 NA [9,] 4.552 2.416 0.101 2.790 4.352 1.998 2.449 4.683 NA [10,] -7.612 -3.613 -1.306 -3.613 -4.962 -6.946 -3.755 -1.876 NA [11,] -2.156 -5.362 -7.781 -8.015 -7.076 -4.063 -4.192 -6.213 NA [12,] 12.481 15.936 21.258 21.757 18.828 13.938 13.023 11.130 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/freestat/rcomp/tmp/1wu4b1305860433.ps",horizontal=F,onefile=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/freestat/rcomp/tmp/2ycrd1305860433.ps",horizontal=F,onefile=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/freestat/rcomp/tmp/3bfg11305860433.ps",horizontal=F,onefile=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/freestat/rcomp/tmp/49xh41305860433.ps",horizontal=F,onefile=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] [1,] 25.447 24.090 27.786 25.8590 20.5160 22.7590 17.9700 16.9710 19.5730 [2,] 27.561 25.985 29.279 26.1500 22.4010 23.7670 18.0805 17.4325 19.6285 [3,] 29.743 27.071 30.335 26.8235 23.8895 25.0485 19.6165 17.9390 20.2010 [4,] 31.514 29.383 34.588 31.9840 26.2810 26.9395 20.8885 18.7090 20.4720 [5,] 31.956 30.111 36.438 32.0660 27.1860 29.5860 21.7050 18.7300 20.7640 [,10] [,11] [,12] [1,] 19.785 15.5720 9.3670 [2,] 21.740 17.5430 11.1035 [3,] 22.650 18.6045 13.2725 [4,] 24.516 19.4915 15.0430 [5,] 25.316 22.3800 16.1670 $n [1] 9 9 8 8 8 8 8 8 8 8 8 8 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 27.66109 25.28139 27.36932 23.56454 21.72208 23.27630 18.04791 17.22593 [2,] 31.82491 28.86061 33.30068 30.08246 26.05692 26.82070 21.18509 18.65207 [,9] [,10] [,11] [,12] [1,] 19.72981 21.09929 17.51604 11.07184 [2,] 20.67219 24.20071 19.69296 15.47316 $out [1] 21.553 18.205 $group [1] 8 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(25.447, 27.561, 29.743, 31.514, 31.956, 24.09, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/5e26d1305860433.ps",horizontal=F,onefile=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] [1,] -4.573 -0.0920 -7.3410 -9.3550 0.6780 -9.0740 -3.6160 0.8770 0.1010 [2,] -4.152 2.9480 -4.5980 -5.8935 0.8435 -7.4285 -2.2365 0.9155 2.2070 [3,] -1.576 3.8980 -2.9855 -4.4785 1.5430 -5.9245 -1.2795 2.2055 2.6195 [4,] -1.357 6.0275 -2.0975 -2.2335 2.3215 -4.5455 -0.1365 2.7800 4.4520 [5,] 1.354 8.6850 -1.5910 -0.4290 2.4000 -2.1380 0.7600 3.0650 4.6830 [,10] [,11] [,12] [1,] -7.6120 -8.0150 11.130 [2,] -5.9540 -7.4285 12.752 [3,] -3.6840 -5.7875 14.937 [4,] -2.7445 -4.1275 20.043 [5,] -1.3060 -2.1560 21.757 $n [1] 9 8 8 8 8 8 8 8 8 8 8 8 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -3.0480333 2.177747 -4.382315 -6.523029 0.717368 -7.534985 -2.4525901 [2,] -0.1039667 5.618253 -1.588685 -2.433971 2.368632 -4.314015 -0.1064099 [,8] [,9] [,10] [,11] [,12] [1,] 1.163964 1.365411 -5.476873 -7.631486 10.86414 [2,] 3.247036 3.873589 -1.891127 -3.943514 19.00986 $out [1] 1.915 4.639 -3.045 -1.980 $group [1] 3 5 5 8 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-4.573, -4.152, -1.576, -1.357, 1.354, -0.0920000000000023, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/6f46y1305860433.ps",horizontal=F,onefile=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,] 15.5480 13.8070 10.6980 9.3670 12.738 11.509 14.5380 16.1670 27.297 [2,] 19.4265 18.5865 18.6045 17.7695 20.116 18.997 18.8790 21.4560 27.297 [3,] 23.1200 22.7305 21.0950 22.3430 24.938 24.172 21.5005 25.1205 27.792 [4,] 26.5880 28.7060 26.7630 28.3355 26.205 30.065 24.7685 28.5735 28.287 [5,] 31.5140 36.4380 29.7430 34.5060 31.124 31.934 27.7860 34.6700 28.287 $n [1] 12 12 12 12 12 12 12 12 2 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 19.85359 18.11493 17.37385 17.52378 22.16077 19.12381 18.81426 21.87416 [2,] 26.38641 27.34607 24.81615 27.16222 27.71523 29.22019 24.18674 28.36684 [,9] [1,] 26.68594 [2,] 28.89806 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" NA Warning message: In bxp(list(stats = c(15.548, 19.4265, 23.12, 26.588, 31.514, 13.807, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/7wlqq1305860433.ps",horizontal=F,onefile=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,] 13.04650 13.27250 13.04838 [2,] 19.12975 19.11050 18.93144 [3,] 23.48488 23.26975 23.73875 [4,] 27.93861 26.94725 28.37487 [5,] 31.57850 30.33500 31.95875 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 19.46709 19.69536 19.43153 [2,] 27.50266 26.84414 28.04597 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" > dev.off() null device 1 > try(system("convert tmp/1wu4b1305860433.ps tmp/1wu4b1305860433.png",intern=TRUE)) character(0) > try(system("convert tmp/2ycrd1305860433.ps tmp/2ycrd1305860433.png",intern=TRUE)) character(0) > try(system("convert tmp/3bfg11305860433.ps tmp/3bfg11305860433.png",intern=TRUE)) character(0) > try(system("convert tmp/49xh41305860433.ps tmp/49xh41305860433.png",intern=TRUE)) character(0) > try(system("convert tmp/5e26d1305860433.ps tmp/5e26d1305860433.png",intern=TRUE)) character(0) > try(system("convert tmp/6f46y1305860433.ps tmp/6f46y1305860433.png",intern=TRUE)) character(0) > try(system("convert tmp/7wlqq1305860433.ps tmp/7wlqq1305860433.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.837 0.222 2.055