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.544,1.544,1.524,1.524,1.524,1.524,1.558,1.558,1.558,1.558,1.558,1.558,1.536,1.536,1.536,1.536,1.536,1.536,1.536,1.536,1.536,1.536,1.559,1.559,1.559,1.591,1.591,1.591,1.591,1.591,1.624,1.624,1.587,1.587,1.587,1.572,1.572,1.572,1.636,1.636,1.636,1.660,1.660,1.660,1.660,1.660,1.660,1.682,1.682,1.682,1.682,1.682,1.658,1.658,1.658,1.616,1.616,1.639,1.639,1.639,1.639,1.606,1.606,1.606,1.606,1.606,1.606,1.569,1.569,1.569,1.571,1.596,1.596,1.596,1.643,1.643,1.643,1.643,1.643,1.643,1.643,1.599,1.599,1.599,1.599,1.586,1.586,1.586,1.586,1.586,1.618,1.618,1.657,1.657,1.657,1.657,1.657,1.645,1.645,1.645,1.585,1.585,1.593,1.593,1.593,1.593,1.627,1.627,1.627,1.627,1.627,1.590,1.590,1.590,1.590,1.590,1.590,1.590,1.607,1.607,1.607) > 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.544 1.536 1.559 1.572 1.682 1.639 1.596 1.599 1.657 1.627 1.607 [2,] 1.544 1.536 1.591 1.572 1.682 1.606 1.596 1.586 1.645 1.627 NA [3,] 1.524 1.536 1.591 1.636 1.682 1.606 1.643 1.586 1.645 1.627 NA [4,] 1.524 1.536 1.591 1.636 1.682 1.606 1.643 1.586 1.645 1.590 NA [5,] 1.524 1.536 1.591 1.636 1.658 1.606 1.643 1.586 1.585 1.590 NA [6,] 1.524 1.536 1.591 1.660 1.658 1.606 1.643 1.586 1.585 1.590 NA [7,] 1.558 1.536 1.624 1.660 1.658 1.606 1.643 1.618 1.593 1.590 NA [8,] 1.558 1.536 1.624 1.660 1.616 1.569 1.643 1.618 1.593 1.590 NA [9,] 1.558 1.536 1.587 1.660 1.616 1.569 1.643 1.657 1.593 1.590 NA [10,] 1.558 1.536 1.587 1.660 1.639 1.569 1.599 1.657 1.593 1.590 NA [11,] 1.558 1.559 1.587 1.660 1.639 1.571 1.599 1.657 1.627 1.607 NA [12,] 1.558 1.559 1.572 1.682 1.639 1.596 1.599 1.657 1.627 1.607 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] 0.000 0.000 0.032 0.000 0.000 -0.033 0.000 -0.013 -0.012 0.000 NA [2,] -0.020 0.000 0.000 0.064 0.000 0.000 0.047 0.000 0.000 0.000 NA [3,] 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 -0.037 NA [4,] 0.000 0.000 0.000 0.000 -0.024 0.000 0.000 0.000 -0.060 0.000 NA [5,] 0.000 0.000 0.000 0.024 0.000 0.000 0.000 0.000 0.000 0.000 NA [6,] 0.034 0.000 0.033 0.000 0.000 0.000 0.000 0.032 0.008 0.000 NA [7,] 0.000 0.000 0.000 0.000 -0.042 -0.037 0.000 0.000 0.000 0.000 NA [8,] 0.000 0.000 -0.037 0.000 0.000 0.000 0.000 0.039 0.000 0.000 NA [9,] 0.000 0.000 0.000 0.000 0.023 0.000 -0.044 0.000 0.000 0.000 NA [10,] 0.000 0.023 0.000 0.000 0.000 0.002 0.000 0.000 0.034 0.017 NA [11,] 0.000 0.000 -0.015 0.022 0.000 0.025 0.000 0.000 0.000 0.000 NA [12,] -0.022 0.000 0.000 0.000 0.000 0.000 0.000 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/1k8rl1321357702.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/2ajvt1321357702.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/3kgky1321357702.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/4vtiw1321357702.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.5360 1.5360 1.5240 1.5240 1.5240 1.5240 1.536 1.5360 1.5360 1.5360 1.558 [2,] 1.5655 1.5720 1.5860 1.5860 1.5850 1.5850 1.590 1.5690 1.5690 1.5690 1.571 [3,] 1.5990 1.5935 1.6165 1.5985 1.5905 1.5905 1.612 1.6045 1.5915 1.5915 1.603 [4,] 1.6330 1.6270 1.6430 1.6430 1.6360 1.6430 1.643 1.6240 1.6430 1.6390 1.639 [5,] 1.6820 1.6820 1.6820 1.6820 1.6580 1.6600 1.660 1.6600 1.6600 1.6600 1.660 [,12] [1,] 1.558 [2,] 1.572 [3,] 1.603 [4,] 1.639 [5,] 1.682 $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.566844 1.56602 1.588021 1.570021 1.565018 1.561521 1.585519 1.57702 [2,] 1.631156 1.62098 1.644979 1.626979 1.615982 1.619479 1.638481 1.63198 [,9] [,10] [,11] [,12] [1,] 1.554527 1.556525 1.569024 1.569524 [2,] 1.628473 1.626475 1.636976 1.636476 $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(1.536, 1.5655, 1.599, 1.633, 1.682, 1.536, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5dd6s1321357702.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.013 0 0 0 0 0.000 0 0 0 0.000 0 0 [2,] -0.012 0 0 0 0 0.000 0 0 0 0.000 0 0 [3,] 0.000 0 0 0 0 0.000 0 0 0 0.000 0 0 [4,] 0.000 0 0 0 0 0.032 0 0 0 0.017 0 0 [5,] 0.000 0 0 0 0 0.034 0 0 0 0.034 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.005995678 0 0 0 0 -0.01598848 0 0 0 -0.008493878 [2,] 0.005995678 0 0 0 0 0.01598848 0 0 0 0.008493878 [,11] [,12] [1,] 0 0 [2,] 0 0 $out [1] 0.032 -0.033 -0.020 0.064 0.047 -0.037 -0.024 -0.060 0.024 -0.042 [11] -0.037 -0.037 0.039 0.023 -0.044 -0.015 0.022 0.025 -0.022 $group [1] 1 1 2 2 2 3 4 4 5 7 7 8 8 9 9 11 11 11 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-0.0129999999999999, -0.012, 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/61yaz1321357702.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.524 1.536 1.587 1.636 1.616 1.569 1.596 1.5860 1.585 1.590 1.607 [2,] 1.524 1.536 1.587 1.636 1.639 1.570 1.599 1.5860 1.593 1.590 1.607 [3,] 1.551 1.536 1.591 1.660 1.658 1.606 1.643 1.6085 1.610 1.590 1.607 [4,] 1.558 1.536 1.591 1.660 1.682 1.606 1.643 1.6570 1.645 1.617 1.607 [5,] 1.558 1.536 1.591 1.682 1.682 1.639 1.643 1.6570 1.657 1.627 1.607 $n [1] 12 12 12 12 12 12 12 12 12 12 1 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 1.535492 1.536 1.589176 1.649053 1.638387 1.58958 1.622931 1.576116 [2,] 1.566508 1.536 1.592824 1.670947 1.677613 1.62242 1.663069 1.640884 [,9] [,10] [,11] [1,] 1.586282 1.577685 1.607 [2,] 1.633718 1.602315 1.607 $out [1] 1.559 1.559 1.559 1.624 1.624 1.572 1.572 1.572 $group [1] 2 2 3 3 3 3 4 4 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(1.524, 1.524, 1.551, 1.558, 1.558, 1.536, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7c12t1321357702.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.595500 1.59050 1.598375 [2,] 1.598650 1.59150 1.600250 [3,] 1.601268 1.59875 1.606187 [4,] 1.607000 1.60375 1.611813 [5,] 1.609600 1.61650 1.614500 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 1.597460 1.593163 1.600914 [2,] 1.605077 1.604337 1.611461 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(1.5955, 1.59865, 1.60126818181818, 1.607, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1k8rl1321357702.ps tmp/1k8rl1321357702.png",intern=TRUE)) character(0) > try(system("convert tmp/2ajvt1321357702.ps tmp/2ajvt1321357702.png",intern=TRUE)) character(0) > try(system("convert tmp/3kgky1321357702.ps tmp/3kgky1321357702.png",intern=TRUE)) character(0) > try(system("convert tmp/4vtiw1321357702.ps tmp/4vtiw1321357702.png",intern=TRUE)) character(0) > try(system("convert tmp/5dd6s1321357702.ps tmp/5dd6s1321357702.png",intern=TRUE)) character(0) > try(system("convert tmp/61yaz1321357702.ps tmp/61yaz1321357702.png",intern=TRUE)) character(0) > try(system("convert tmp/7c12t1321357702.ps tmp/7c12t1321357702.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.650 0.454 2.119