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(1.324,1.310,1.310,1.310,1.310,1.338,1.338,1.338,1.358,1.358,1.358,1.358,1.351,1.351,1.351,1.351,1.351,1.372,1.372,1.372,1.372,1.386,1.386,1.386,1.386,1.414,1.414,1.414,1.414,1.443,1.443,1.443,1.443,1.443,1.443,1.443,1.443,1.443,1.448,1.448,1.448,1.463,1.463,1.463,1.456,1.456,1.456,1.456,1.456,1.440,1.440,1.440,1.440,1.429,1.429,1.429,1.419,1.419,1.435,1.435,1.435,1.435,1.435,1.465,1.465,1.438,1.438,1.394,1.394,1.394,1.423,1.423,1.423,1.460,1.460,1.460,1.460,1.472,1.472,1.472,1.451,1.451,1.451,1.400,1.421,1.421,1.421,1.421,1.421,1.421,1.450,1.450,1.450,1.450,1.463,1.463,1.463,1.463,1.463,1.463,1.463,1.463,1.459,1.459,1.459,1.459,1.480,1.480,1.480,1.480,1.498,1.498,1.498,1.498,1.498,1.498,1.498,1.498,1.498,1.511,1.511) > par1 = '12' > par1 <- as.numeric(par1) > (n <- length(x)) [1] 121 > (np <- floor(n / par1)) [1] 10 > 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] 11 10 10 10 10 10 10 10 10 10 10 10 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] 1.324 1.351 1.386 1.443 1.456 1.435 1.423 1.421 1.463 1.480 1.511 [2,] 1.310 1.351 1.414 1.443 1.440 1.435 1.460 1.421 1.463 1.480 NA [3,] 1.310 1.351 1.414 1.448 1.440 1.435 1.460 1.421 1.463 1.498 NA [4,] 1.310 1.351 1.414 1.448 1.440 1.465 1.460 1.421 1.463 1.498 NA [5,] 1.310 1.351 1.414 1.448 1.440 1.465 1.460 1.421 1.463 1.498 NA [6,] 1.338 1.372 1.443 1.463 1.429 1.438 1.472 1.421 1.463 1.498 NA [7,] 1.338 1.372 1.443 1.463 1.429 1.438 1.472 1.450 1.459 1.498 NA [8,] 1.338 1.372 1.443 1.463 1.429 1.394 1.472 1.450 1.459 1.498 NA [9,] 1.358 1.372 1.443 1.456 1.419 1.394 1.451 1.450 1.459 1.498 NA [10,] 1.358 1.386 1.443 1.456 1.419 1.394 1.451 1.450 1.459 1.498 NA [11,] 1.358 1.386 1.443 1.456 1.435 1.423 1.451 1.463 1.480 1.498 NA [12,] 1.358 1.386 1.443 1.456 1.435 1.423 1.400 1.463 1.480 1.511 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] -0.014 0.000 0.028 0.000 -0.016 0.000 0.037 0.000 0.000 0.000 NA [2,] 0.000 0.000 0.000 0.005 0.000 0.000 0.000 0.000 0.000 0.018 NA [3,] 0.000 0.000 0.000 0.000 0.000 0.030 0.000 0.000 0.000 0.000 NA [4,] 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 NA [5,] 0.028 0.021 0.029 0.015 -0.011 -0.027 0.012 0.000 0.000 0.000 NA [6,] 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.029 -0.004 0.000 NA [7,] 0.000 0.000 0.000 0.000 0.000 -0.044 0.000 0.000 0.000 0.000 NA [8,] 0.020 0.000 0.000 -0.007 -0.010 0.000 -0.021 0.000 0.000 0.000 NA [9,] 0.000 0.014 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 NA [10,] 0.000 0.000 0.000 0.000 0.016 0.029 0.000 0.013 0.021 0.000 NA [11,] 0.000 0.000 0.000 0.000 0.000 0.000 -0.051 0.000 0.000 0.013 NA [12,] -0.007 0.000 0.000 0.000 0.000 0.000 0.021 0.000 0.000 0.000 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/1e5pg1321358622.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/2e4j91321358622.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/3e46i1321358622.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/4zzpp1321358622.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] [,10] [,11] [1,] 1.3240 1.3510 1.3510 1.351 1.351 1.3720 1.4290 1.3380 1.3580 1.3580 1.386 [2,] 1.4035 1.4140 1.4140 1.414 1.414 1.4210 1.4290 1.3940 1.3940 1.3940 1.423 [3,] 1.4350 1.4375 1.4375 1.444 1.444 1.4405 1.4465 1.4465 1.4465 1.4465 1.447 [4,] 1.4595 1.4600 1.4600 1.463 1.463 1.4630 1.4630 1.4630 1.4560 1.4560 1.463 [5,] 1.5110 1.4800 1.4980 1.498 1.498 1.4980 1.4980 1.4980 1.4980 1.4980 1.498 [,12] [1,] 1.358 [2,] 1.400 [3,] 1.439 [4,] 1.463 [5,] 1.511 $n [1] 11 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 1.408322 1.414517 1.414517 1.419518 1.419518 1.419515 1.429512 1.412025 [2,] 1.461678 1.460483 1.460483 1.468482 1.468482 1.461485 1.463488 1.480975 [,9] [,10] [,11] [,12] [1,] 1.415522 1.415522 1.427014 1.407523 [2,] 1.477478 1.477478 1.466986 1.470477 $out [1] 1.310 1.310 1.310 1.310 1.338 1.338 1.372 1.358 $group [1] 2 3 4 5 6 7 7 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(1.324, 1.4035, 1.435, 1.4595, 1.511, 1.351, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5dfur1321358622.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] [,10] [,11] [,12] [1,] 0 0 0 0 -0.027 0 0 -0.010 0 0.000 0 0 [2,] 0 0 0 0 0.000 0 0 -0.007 0 0.000 0 0 [3,] 0 0 0 0 0.006 0 0 0.000 0 0.000 0 0 [4,] 0 0 0 0 0.021 0 0 0.000 0 0.016 0 0 [5,] 0 0 0 0 0.029 0 0 0.000 0 0.029 0 0 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 0 0 0 0 -0.004492437 0 0 -0.003497479 0 -0.007994238 [2,] 0 0 0 0 0.016492437 0 0 0.003497479 0 0.007994238 [,11] [,12] [1,] 0 0 [2,] 0 0 $out [1] -0.014 0.028 -0.016 0.037 0.005 0.018 0.030 0.029 -0.004 -0.044 [11] 0.020 -0.021 0.014 -0.051 0.013 -0.007 0.021 $group [1] 1 1 1 1 2 2 3 6 6 7 8 8 9 11 11 12 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6n6gw1321358622.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] [,10] [,11] [1,] 1.310 1.351 1.386 1.4430 1.419 1.3940 1.451 1.4210 1.459 1.498 1.511 [2,] 1.310 1.351 1.414 1.4480 1.429 1.4085 1.451 1.4210 1.459 1.498 1.511 [3,] 1.338 1.372 1.443 1.4560 1.435 1.4350 1.460 1.4355 1.463 1.498 1.511 [4,] 1.358 1.379 1.443 1.4595 1.440 1.4380 1.466 1.4500 1.463 1.498 1.511 [5,] 1.358 1.386 1.443 1.4630 1.456 1.4650 1.472 1.4630 1.463 1.498 1.511 $n [1] 12 12 12 12 12 12 12 12 12 12 1 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 1.316107 1.359229 1.429773 1.450755 1.429983 1.421545 1.453158 1.422273 [2,] 1.359893 1.384771 1.456227 1.461245 1.440017 1.448455 1.466842 1.448727 [,9] [,10] [,11] [1,] 1.461176 1.498 1.511 [2,] 1.464824 1.498 1.511 $out [1] 1.423 1.400 1.480 1.480 1.480 1.480 1.511 $group [1] 7 7 9 9 10 10 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(1.31, 1.31, 1.338, 1.358, 1.358, 1.351, 1.351, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7x0vt1321358622.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,] 1.421700 1.43500 1.427500 [2,] 1.426818 1.43825 1.431938 [3,] 1.430700 1.44400 1.436063 [4,] 1.434600 1.44650 1.441000 [5,] 1.439300 1.44700 1.446625 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 1.427151 1.440237 1.431929 [2,] 1.434249 1.447763 1.440196 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(1.4217, 1.42681818181818, 1.4307, 1.4346, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1e5pg1321358622.ps tmp/1e5pg1321358622.png",intern=TRUE)) character(0) > try(system("convert tmp/2e4j91321358622.ps tmp/2e4j91321358622.png",intern=TRUE)) character(0) > try(system("convert tmp/3e46i1321358622.ps tmp/3e46i1321358622.png",intern=TRUE)) character(0) > try(system("convert tmp/4zzpp1321358622.ps tmp/4zzpp1321358622.png",intern=TRUE)) character(0) > try(system("convert tmp/5dfur1321358622.ps tmp/5dfur1321358622.png",intern=TRUE)) character(0) > try(system("convert tmp/6n6gw1321358622.ps tmp/6n6gw1321358622.png",intern=TRUE)) character(0) > try(system("convert tmp/7x0vt1321358622.ps tmp/7x0vt1321358622.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.531 0.311 1.856