R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-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. 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(68.897,38.683,44.720,39.525,45.315,50.380,40.600,36.279,42.438,38.064,31.879,11.379,70.249,39.253,47.060,41.697,38.708,49.267,39.018,32.228,40.870,39.383,34.571,12.066,70.938,34.077,45.409,40.809,37.013,44.953,37.848,32.745,39.401,34.931,33.008,8.620,68.906,39.556,50.669,36.432,40.891,48.428,36.222,33.425,39.401,37.967,34.801,12.657,69.116,41.519,51.321,38.529,41.547,52.073,38.401,40.898,40.439,41.888,37.898,8.771,68.184,50.530,47.221,41.756,45.633,48.138,39.486,39.341,41.117,41.629,29.722,7.054,56.676,34.870,35.117,30.169,30.936,35.699,33.228,27.733,33.666,35.429,27.438,8.170,63.410,38.040,45.389,37.353,37.024,50.957,37.994,36.454,46.080,43.373,37.395) > par1 = '12' > par1 <- as.numeric(par1) > (n <- length(x)) [1] 95 > (np <- floor(n / par1)) [1] 7 > 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 7 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 68.897 70.249 70.938 68.906 69.116 68.184 56.676 63.410 [2,] 38.683 39.253 34.077 39.556 41.519 50.530 34.870 38.040 [3,] 44.720 47.060 45.409 50.669 51.321 47.221 35.117 45.389 [4,] 39.525 41.697 40.809 36.432 38.529 41.756 30.169 37.353 [5,] 45.315 38.708 37.013 40.891 41.547 45.633 30.936 37.024 [6,] 50.380 49.267 44.953 48.428 52.073 48.138 35.699 50.957 [7,] 40.600 39.018 37.848 36.222 38.401 39.486 33.228 37.994 [8,] 36.279 32.228 32.745 33.425 40.898 39.341 27.733 36.454 [9,] 42.438 40.870 39.401 39.401 40.439 41.117 33.666 46.080 [10,] 38.064 39.383 34.931 37.967 41.888 41.629 35.429 43.373 [11,] 31.879 34.571 33.008 34.801 37.898 29.722 27.438 37.395 [12,] 11.379 12.066 8.620 12.657 8.771 7.054 8.170 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] -30.214 -30.996 -36.861 -29.350 -27.597 -17.654 -21.806 -25.370 [2,] 6.037 7.807 11.332 11.113 9.802 -3.309 0.247 7.349 [3,] -5.195 -5.363 -4.600 -14.237 -12.792 -5.465 -4.948 -8.036 [4,] 5.790 -2.989 -3.796 4.459 3.018 3.877 0.767 -0.329 [5,] 5.065 10.559 7.940 7.537 10.526 2.505 4.763 13.933 [6,] -9.780 -10.249 -7.105 -12.206 -13.672 -8.652 -2.471 -12.963 [7,] -4.321 -6.790 -5.103 -2.797 2.497 -0.145 -5.495 -1.540 [8,] 6.159 8.642 6.656 5.976 -0.459 1.776 5.933 9.626 [9,] -4.374 -1.487 -4.470 -1.434 1.449 0.512 1.763 -2.707 [10,] -6.185 -4.812 -1.923 -3.166 -3.990 -11.907 -7.991 -5.978 [11,] -20.500 -22.505 -24.388 -22.144 -29.127 -22.668 -19.268 NA [12,] 58.870 58.872 60.286 56.459 59.413 49.622 55.240 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/wessaorg/rcomp/tmp/12srj1322133762.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/wessaorg/rcomp/tmp/29quk1322133762.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/wessaorg/rcomp/tmp/3n0w91322133762.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/wessaorg/rcomp/tmp/4ryq71322133762.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,] 63.4100 34.0770 44.7200 36.4320 30.9360 44.9530 36.2220 27.7330 39.4010 [2,] 65.7970 36.4550 45.0545 36.8925 37.0185 46.5455 37.0350 32.4865 39.4010 [3,] 68.9015 38.9680 46.2345 39.0270 39.7995 48.8475 38.1975 34.8520 40.6545 [4,] 69.6825 40.5375 48.9450 41.2530 43.4310 50.6685 39.2520 37.8975 41.7775 [5,] 70.9380 41.5190 51.3210 41.7560 45.6330 52.0730 40.6000 40.8980 42.4380 [,10] [,11] [,12] [1,] 34.9310 27.4380 7.0540 [2,] 36.6980 30.8005 8.3950 [3,] 38.7235 33.7895 8.7710 [4,] 41.7585 36.0980 11.7225 [5,] 43.3730 37.8980 12.6570 $n [1] 8 8 8 8 8 8 8 8 8 8 8 7 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 66.731 36.68746 44.06121 36.59116 36.21739 46.54433 36.95905 31.82934 [2,] 71.072 41.24854 48.40779 41.46284 43.38161 51.15067 39.43595 37.87466 [,9] [,10] [,11] [,12] [1,] 39.32695 35.89663 30.83024 6.783871 [2,] 41.98205 41.55037 36.74876 10.758129 $out [1] 56.676 50.530 35.117 30.169 35.699 33.228 33.666 46.080 $group [1] 1 2 3 4 6 7 9 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(63.41, 65.797, 68.9015, 69.6825, 70.938, 34.077, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5x1y21322133762.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,] -36.8610 -3.3090 -14.2370 -3.7960 2.5050 -13.6720 -6.7900 -0.4590 -4.4700 [2,] -30.6050 3.1420 -10.4140 -1.6590 4.9140 -12.5845 -5.2990 3.8545 -3.5405 [3,] -28.4735 7.5780 -5.4140 1.8925 7.7385 -10.0145 -3.5590 6.0675 -1.4605 [4,] -23.5880 10.4575 -5.0715 4.1680 10.5425 -7.8785 -0.8425 7.6490 0.9805 [5,] -17.6540 11.3320 -4.6000 5.7900 13.9330 -2.4710 2.4970 9.6260 1.7630 [,10] [,11] [,12] [1,] -11.907 -24.388 55.2400 [2,] -7.088 -23.528 55.8495 [3,] -5.395 -22.505 58.8700 [4,] -3.578 -21.322 59.1425 [5,] -1.923 -19.268 60.2860 $n [1] 8 8 8 8 8 8 8 8 8 8 7 7 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -32.3933 3.491457 -8.398397 -1.362546 4.594339 -12.643339 -6.048465 [2,] -24.5537 11.664543 -2.429603 5.147546 10.882661 -7.385661 -1.069535 [,8] [,9] [,10] [,11] [,12] [1,] 3.947838 -3.985996 -7.355736 -23.82239 56.90347 [2,] 8.187162 1.064996 -3.434264 -21.18761 60.83653 $out [1] -29.127 49.622 $group [1] 11 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-36.861, -30.605, -28.4735, -23.588, -17.654, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/62iv71322133762.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] [1,] 31.8790 32.2280 32.7450 33.4250 37.8980 29.7220 27.438 36.4540 [2,] 37.1715 36.6395 33.5425 35.5115 38.4650 39.4135 28.951 37.3740 [3,] 40.0625 39.3180 37.4305 38.6840 41.2085 41.6925 33.447 38.0400 [4,] 45.0175 44.3785 42.8810 44.6595 46.6045 47.6795 35.273 45.7345 [5,] 50.3800 49.2670 45.4090 50.6690 52.0730 50.5300 35.699 50.9570 $n [1] 12 12 12 12 12 12 12 11 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 36.48389 35.78819 33.17115 34.51154 37.49602 37.92232 30.56349 34.05716 [2,] 43.64111 42.84781 41.68985 42.85646 44.92098 45.46268 36.33051 42.02284 $out [1] 68.897 11.379 70.249 12.066 70.938 8.620 68.906 12.657 69.116 8.771 [11] 68.184 7.054 56.676 8.170 63.410 $group [1] 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 $names [1] "1" "2" "3" "4" "5" "6" "7" NA Warning message: In bxp(list(stats = c(31.879, 37.1715, 40.0625, 45.0175, 50.38, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7qa6m1322133762.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,] 33.33900 33.78950 33.39463 [2,] 36.36875 36.52475 36.59200 [3,] 39.32450 38.99750 39.29500 [4,] 43.14487 43.44450 43.53825 [5,] 47.48687 48.84750 48.93300 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 36.23386 35.84136 36.12677 [2,] 42.41514 42.15364 42.46323 $out [1] 67.047000 9.816714 68.901500 8.771000 68.194875 10.058750 $group [1] 1 1 2 2 3 3 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(33.339, 36.36875, 39.3245, 43.144875, 47.486875, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/12srj1322133762.ps tmp/12srj1322133762.png",intern=TRUE)) character(0) > try(system("convert tmp/29quk1322133762.ps tmp/29quk1322133762.png",intern=TRUE)) character(0) > try(system("convert tmp/3n0w91322133762.ps tmp/3n0w91322133762.png",intern=TRUE)) character(0) > try(system("convert tmp/4ryq71322133762.ps tmp/4ryq71322133762.png",intern=TRUE)) character(0) > try(system("convert tmp/5x1y21322133762.ps tmp/5x1y21322133762.png",intern=TRUE)) character(0) > try(system("convert tmp/62iv71322133762.ps tmp/62iv71322133762.png",intern=TRUE)) character(0) > try(system("convert tmp/7qa6m1322133762.ps tmp/7qa6m1322133762.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.538 0.345 1.903