R version 2.7.0 (2008-04-22) 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(72.50,59.40,85.70,88.20,62.80,87.00,79.20,112.00,79.20,132.10,40.10,69.00,59.40,73.80,57.40,81.10,46.60,41.40,71.20,67.90,72.00,145.50,39.70,51.90,73.70,70.90,60.80,61.00,54.50,39.10,66.60,58.50,59.80,80.90,37.30,44.60,48.70,54.00,49.50,61.60,35.00,35.70,51.30,49.00,41.50,72.50,42.10,44.10,45.10,50.30,40.90,47.20,36.90,40.90,38.30,46.30,28.40,78.40,36.80,50.70,42.80) > par1 = '12' > x <- x[x>quantile(x,0.05) & x par1 <- as.numeric(par1) > (n <- length(x)) [1] 53 > (np <- floor(n / par1)) [1] 4 > 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] 5 5 5 5 5 4 4 4 4 4 4 4 > arr [,1] [,2] [,3] [,4] [,5] [1,] 72.5 81.1 54.5 51.3 38.3 [2,] 59.4 46.6 39.1 49.0 46.3 [3,] 85.7 41.4 66.6 41.5 78.4 [4,] 62.8 71.2 58.5 72.5 50.7 [5,] 87.0 67.9 59.8 42.1 42.8 [6,] 79.2 72.0 80.9 44.1 NA [7,] 79.2 39.7 37.3 45.1 NA [8,] 40.1 51.9 44.6 50.3 NA [9,] 69.0 73.7 48.7 40.9 NA [10,] 59.4 70.9 54.0 47.2 NA [11,] 73.8 60.8 49.5 36.9 NA [12,] 57.4 61.0 61.6 40.9 NA > darr [,1] [,2] [,3] [,4] [,5] [1,] -13.1 -34.5 -15.4 -2.3 8.0 [2,] 26.3 -5.2 27.5 -7.5 32.1 [3,] -22.9 29.8 -8.1 31.0 -27.7 [4,] 24.2 -3.3 1.3 -30.4 -7.9 [5,] -7.8 4.1 21.1 2.0 NA [6,] 0.0 -32.3 -43.6 1.0 NA [7,] -39.1 12.2 7.3 5.2 NA [8,] 28.9 21.8 4.1 -9.4 NA [9,] -9.6 -2.8 5.3 6.3 NA [10,] 14.4 -10.1 -4.5 -10.3 NA [11,] -16.4 0.2 12.1 4.0 NA [12,] 23.7 -6.5 -10.3 -2.6 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/1o9251225472961.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/2brb81225472961.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/3ipa21225472961.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/41ux41225472961.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,] 38.3 46.3 41.4 50.7 42.1 44.10 37.30 40.10 40.90 47.20 36.90 40.90 [2,] 51.3 46.3 41.5 58.5 42.8 58.05 38.50 42.35 44.80 50.60 43.20 49.15 [3,] 54.5 46.6 66.6 62.8 59.8 75.60 42.40 47.45 58.85 56.70 55.15 59.20 [4,] 72.5 49.0 78.4 71.2 67.9 80.05 62.15 51.10 71.35 65.15 67.30 61.30 [5,] 81.1 49.0 85.7 72.5 87.0 80.90 79.20 51.90 73.70 70.90 73.80 61.60 $n [1] 5 5 5 5 5 4 4 4 4 4 4 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 39.52013 44.69219 40.52655 53.82621 42.0644 58.22 23.7165 40.5375 37.8755 [2,] 69.47987 48.50781 92.67345 71.77379 77.5356 92.98 61.0835 54.3625 79.8245 [,10] [,11] [,12] [1,] 45.2055 36.111 49.6015 [2,] 68.1945 74.189 68.7985 $out [1] 59.4 39.1 $group [1] 2 2 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(38.3, 51.3, 54.5, 72.5, 81.1, 46.3, 46.3, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5ihun1225472961.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,] -34.5 -7.5 -27.7 -7.9 -7.80 -43.60 -39.10 -9.40 -9.60 -10.30 -16.40 -10.30 [2,] -15.4 -5.2 -22.9 -7.9 -2.90 -37.95 -16.95 -2.65 -6.20 -10.20 -8.10 -8.40 [3,] -13.1 26.3 -8.1 -3.3 3.05 -16.15 6.25 12.95 1.25 -7.30 2.10 -4.55 [4,] -2.3 27.5 29.8 1.3 12.60 0.50 9.75 25.35 5.80 4.95 8.05 10.55 [5,] 8.0 32.1 31.0 1.3 21.10 1.00 12.20 28.90 6.30 14.40 12.10 23.70 $n [1] 5 5 5 5 4 4 4 4 4 4 4 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] -22.356427 3.194262 -45.33769 -9.800697 -9.195 -46.5255 -14.843 -9.17 [2,] -3.843573 49.405738 29.13769 3.200697 15.295 14.2255 27.343 35.07 [,9] [,10] [,11] [,12] [1,] -8.23 -19.2685 -10.6585 -19.5205 [2,] 10.73 4.6685 14.8585 10.4205 $out [1] 24.2 -30.4 $group [1] 4 4 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-34.5, -15.4, -13.1, -2.30000000000000, 8, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6amll1225472961.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] [1,] 40.10 39.70 37.30 36.90 38.3 [2,] 59.40 49.25 46.65 41.20 42.8 [3,] 70.75 64.45 54.25 44.60 46.3 [4,] 79.20 71.60 60.70 49.65 50.7 [5,] 87.00 81.10 80.90 51.30 50.7 $n [1] 12 12 12 12 5 $conf [,1] [,2] [,3] [,4] [,5] [1,] 61.71909 54.25601 47.8417 40.7459 40.71788 [2,] 79.78091 74.64399 60.6583 48.4541 51.88212 $out [1] 72.5 78.4 $group [1] 4 5 $names [1] "1" "2" "3" "4" NA Warning message: In bxp(list(stats = c(40.1, 59.4, 70.75, 79.2, 87, 39.7, 49.25, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/737oe1225472961.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,] 46.725 42.400 46.3625 [2,] 52.775 50.975 51.4250 [3,] 57.975 57.775 57.2500 [4,] 61.320 61.300 60.9250 [5,] 69.050 75.600 72.3250 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 54.07757 53.0657 52.91699 [2,] 61.87243 62.4843 61.58301 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(46.725, 52.775, 57.975, 61.32, 69.05, 42.4, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1o9251225472961.ps tmp/1o9251225472961.png") > system("convert tmp/2brb81225472961.ps tmp/2brb81225472961.png") > system("convert tmp/3ipa21225472961.ps tmp/3ipa21225472961.png") > system("convert tmp/41ux41225472961.ps tmp/41ux41225472961.png") > system("convert tmp/5ihun1225472961.ps tmp/5ihun1225472961.png") > system("convert tmp/6amll1225472961.ps tmp/6amll1225472961.png") > system("convert tmp/737oe1225472961.ps tmp/737oe1225472961.png") > > > proc.time() user system elapsed 2.590 1.589 2.843