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(2293,2309,2299,2349,2374,2440,2485,2685,2803,2947,3066,3212,3116,3190,3193,3393,3316,3221,3246,3182,3150,3249,3192,3265,3142,3282,3326,3291,3343,3376,3307,3391,3389,3327,3258,3278,3269,3192,3413,3193,3122,3276,3122,3026,3015,3079,3035,3011,3045,3098,3018,3037,3057,3048,3014,2860,3014,3003,3015,2931) > par1 = '12' > par1 <- as.numeric(par1) > (n <- length(x)) [1] 60 > (np <- floor(n / par1)) [1] 5 > 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 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 2293 3116 3142 3269 3045 NA [2,] 2309 3190 3282 3192 3098 NA [3,] 2299 3193 3326 3413 3018 NA [4,] 2349 3393 3291 3193 3037 NA [5,] 2374 3316 3343 3122 3057 NA [6,] 2440 3221 3376 3276 3048 NA [7,] 2485 3246 3307 3122 3014 NA [8,] 2685 3182 3391 3026 2860 NA [9,] 2803 3150 3389 3015 3014 NA [10,] 2947 3249 3327 3079 3003 NA [11,] 3066 3192 3258 3035 3015 NA [12,] 3212 3265 3278 3011 2931 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 16 74 140 -77 53 NA [2,] -10 3 44 221 -80 NA [3,] 50 200 -35 -220 19 NA [4,] 25 -77 52 -71 20 NA [5,] 66 -95 33 154 -9 NA [6,] 45 25 -69 -154 -34 NA [7,] 200 -64 84 -96 -154 NA [8,] 118 -32 -2 -11 154 NA [9,] 144 99 -62 64 -11 NA [10,] 119 -57 -69 -44 12 NA [11,] 146 73 20 -24 -84 NA [12,] -96 -123 -9 34 NA 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/1763h1321202431.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/2t6vh1321202431.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/31nkg1321202431.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/4qb5b1321202431.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] [,12] [1,] 3045 3098 3018 3037 3057 3048 3014 2685 3014 2947 3015 2931 [2,] 3045 3098 3018 3037 3057 3048 3014 2860 3014 3003 3035 3011 [3,] 3116 3190 3193 3193 3122 3221 3122 3026 3015 3079 3066 3212 [4,] 3142 3192 3326 3291 3316 3276 3246 3182 3150 3249 3192 3265 [5,] 3269 3282 3413 3393 3343 3376 3307 3391 3150 3327 3258 3278 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 3047.46 3123.58 2975.368 3013.524 2938.991 3059.896 2958.069 2798.476 [2,] 3184.54 3256.42 3410.632 3372.476 3305.009 3382.104 3285.931 3253.524 [,9] [,10] [,11] [,12] [1,] 2918.903 2905.177 2955.064 3032.524 [2,] 3111.097 3252.823 3176.936 3391.476 $out [1] 2293 2309 2299 2349 2374 2440 2485 2803 3389 $group [1] 1 2 3 4 5 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(3045, 3045, 3116, 3142, 3269, 3098, 3098, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5jc4k1321202431.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,] 16 -80 -35 -77 -95 -154 -154 -32 -62 -69 -84 -123.0 [2,] 16 -10 -35 -71 -9 -69 -96 -11 -11 -57 -24 -109.5 [3,] 53 3 19 20 33 -34 -64 -2 64 -44 20 -52.5 [4,] 74 44 50 25 66 25 84 118 99 12 73 12.5 [5,] 140 44 50 52 154 45 200 154 144 12 146 34.0 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 12.01735 -35.15626 -41.06079 -47.83336 -19.99481 -100.42016 -191.18755 [2,] 93.98265 41.15626 79.06079 87.83336 85.99481 32.42016 63.18755 [,8] [,9] [,10] [,11] [,12] [1,] -93.15108 -13.72572 -92.755226 -48.53996 -148.88 [2,] 89.15108 141.72572 4.755226 88.53996 43.88 $out [1] -77 221 200 -220 119 $group [1] 1 2 3 3 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(16, 16, 53, 74, 140, -80, -10, 3, 44, 44, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6u3581321202431.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] [1,] 2293.0 3116 3258.0 3011.0 3003.0 NA [2,] 2329.0 3186 3280.0 3030.5 3008.5 NA [3,] 2462.5 3207 3316.5 3122.0 3016.5 NA [4,] 2875.0 3257 3359.5 3231.0 3046.5 NA [5,] 3212.0 3316 3391.0 3413.0 3098.0 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 2213.466 3174.616 3280.24 3030.551 2999.168 NA [2,] 2711.534 3239.384 3352.76 3213.449 3033.832 NA $out [1] 3393 3142 2860 2931 $group [1] 2 3 5 5 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(2293, 2329, 2462.5, 2875, 3212, 3116, 3186, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7a3vr1321202431.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,] 2973.0 3015.0 3021.0 [2,] 3031.8 3072.5 3103.5 [3,] 3051.2 3122.0 3134.0 [4,] 3093.7 3193.0 3163.0 [5,] 3139.4 3221.0 3186.5 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 3022.967 3067.039 3106.862 [2,] 3079.433 3176.961 3161.138 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(2973, 3031.8, 3051.2, 3093.7, 3139.4, 3015, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1763h1321202431.ps tmp/1763h1321202431.png",intern=TRUE)) character(0) > try(system("convert tmp/2t6vh1321202431.ps tmp/2t6vh1321202431.png",intern=TRUE)) character(0) > try(system("convert tmp/31nkg1321202431.ps tmp/31nkg1321202431.png",intern=TRUE)) character(0) > try(system("convert tmp/4qb5b1321202431.ps tmp/4qb5b1321202431.png",intern=TRUE)) character(0) > try(system("convert tmp/5jc4k1321202431.ps tmp/5jc4k1321202431.png",intern=TRUE)) character(0) > try(system("convert tmp/6u3581321202431.ps tmp/6u3581321202431.png",intern=TRUE)) character(0) > try(system("convert tmp/7a3vr1321202431.ps tmp/7a3vr1321202431.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.732 0.417 2.218