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.0622,1.0773,1.0807,1.0848,1.1582,1.1663,1.1372,1.1139,1.1222,1.1692,1.1702,1.2286,1.2613,1.2646,1.2262,1.1985,1.2007,1.2138,1.2266,1.2176,1.2218,1.249,1.2991,1.3408,1.3119,1.3014,1.3201,1.2938,1.2694,1.2165,1.2037,1.2292,1.2256,1.2015,1.1786,1.1856,1.2103,1.1938,1.202,1.2271,1.277,1.265,1.2684,1.2811,1.2727,1.2611,1.2881,1.3213,1.2999,1.3074,1.3242,1.3516,1.3511,1.3419,1.3716,1.3622,1.3896,1.4227,1.4684,1.457) > 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,] 1.0622 1.2613 1.3119 1.2103 1.2999 NA [2,] 1.0773 1.2646 1.3014 1.1938 1.3074 NA [3,] 1.0807 1.2262 1.3201 1.2020 1.3242 NA [4,] 1.0848 1.1985 1.2938 1.2271 1.3516 NA [5,] 1.1582 1.2007 1.2694 1.2770 1.3511 NA [6,] 1.1663 1.2138 1.2165 1.2650 1.3419 NA [7,] 1.1372 1.2266 1.2037 1.2684 1.3716 NA [8,] 1.1139 1.2176 1.2292 1.2811 1.3622 NA [9,] 1.1222 1.2218 1.2256 1.2727 1.3896 NA [10,] 1.1692 1.2490 1.2015 1.2611 1.4227 NA [11,] 1.1702 1.2991 1.1786 1.2881 1.4684 NA [12,] 1.2286 1.3408 1.1856 1.3213 1.4570 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.0151 0.0033 -0.0105 -0.0165 0.0075 NA [2,] 0.0034 -0.0384 0.0187 0.0082 0.0168 NA [3,] 0.0041 -0.0277 -0.0263 0.0251 0.0274 NA [4,] 0.0734 0.0022 -0.0244 0.0499 -0.0005 NA [5,] 0.0081 0.0131 -0.0529 -0.0120 -0.0092 NA [6,] -0.0291 0.0128 -0.0128 0.0034 0.0297 NA [7,] -0.0233 -0.0090 0.0255 0.0127 -0.0094 NA [8,] 0.0083 0.0042 -0.0036 -0.0084 0.0274 NA [9,] 0.0470 0.0272 -0.0241 -0.0116 0.0331 NA [10,] 0.0010 0.0501 -0.0229 0.0270 0.0457 NA [11,] 0.0584 0.0417 0.0070 0.0332 -0.0114 NA [12,] 0.0327 -0.0289 0.0247 -0.0214 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/1iv4n1324515530.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/2fump1324515530.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/3duku1324515530.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/4ww7e1324515530.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] [1,] 1.2103 1.0773 1.0807 1.0848 1.1582 1.1663 1.1372 1.2176 1.2218 1.1692 [2,] 1.2103 1.1938 1.2020 1.1985 1.2007 1.2138 1.2037 1.2176 1.2218 1.2015 [3,] 1.2613 1.2646 1.2262 1.2271 1.2694 1.2165 1.2266 1.2292 1.2256 1.2490 [4,] 1.2999 1.3014 1.3201 1.2938 1.2770 1.2650 1.2684 1.2811 1.2727 1.2611 [5,] 1.3119 1.3074 1.3242 1.3516 1.3511 1.2650 1.2684 1.3622 1.2727 1.2611 [,11] [,12] [1,] 1.1702 1.1856 [2,] 1.1786 1.2286 [3,] 1.2881 1.3213 [4,] 1.2991 1.3408 [5,] 1.4684 1.4570 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 1.197989 1.18857 1.142751 1.159761 1.215487 1.180322 1.180883 1.184331 [2,] 1.324611 1.34063 1.309649 1.294439 1.323313 1.252678 1.272317 1.274069 [,9] [,10] [,11] [,12] [1,] 1.189634 1.206887 1.202955 1.24202 [2,] 1.261566 1.291113 1.373245 1.40058 $out [1] 1.0622 1.3419 1.3716 1.1139 1.1222 1.3896 1.4227 $group [1] 1 6 7 8 9 9 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(1.2103, 1.2103, 1.2613, 1.2999, 1.3119, 1.0773, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/569r51324515530.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,] -0.0165 0.0034 -0.0277 -0.0244 -0.0120 -0.0291 -0.0233 -0.0084 -0.0241 [2,] -0.0105 0.0034 -0.0263 -0.0005 -0.0120 -0.0128 -0.0094 -0.0036 -0.0116 [3,] 0.0033 0.0082 0.0041 0.0022 -0.0092 0.0034 -0.0090 0.0042 0.0272 [4,] 0.0075 0.0168 0.0251 0.0499 0.0081 0.0128 0.0127 0.0083 0.0331 [5,] 0.0151 0.0187 0.0274 0.0734 0.0131 0.0297 0.0255 0.0083 0.0470 [,10] [,11] [,12] [1,] -0.0229 -0.0114 -0.02890 [2,] 0.0010 0.0070 -0.02515 [3,] 0.0270 0.0332 0.00165 [4,] 0.0457 0.0417 0.02870 [5,] 0.0501 0.0584 0.03270 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.009418755 -0.001268406 -0.03221911 -0.03341251 -0.023402609 -0.0146889 [2,] 0.016018755 0.017668406 0.04041911 0.03781251 0.005002609 0.0214889 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.024615804 -0.00420851 -0.004384907 -0.004584907 0.008681067 -0.0408915 [2,] 0.006615804 0.01260851 0.058784907 0.058584907 0.057718933 0.0441915 $out [1] -0.0384 -0.0529 0.0274 $group [1] 2 5 8 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-0.0165, -0.0105000000000002, 0.00329999999999986, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/645nj1324515530.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,] 1.06220 1.19850 1.1786 1.19380 1.29990 NA [2,] 1.08275 1.21570 1.2026 1.21870 1.33305 NA [3,] 1.12970 1.22640 1.2274 1.26670 1.35690 NA [4,] 1.16775 1.26295 1.2976 1.27905 1.40615 NA [5,] 1.22860 1.29910 1.3201 1.32130 1.46840 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1.090931 1.204849 1.18407 1.239174 1.323559 NA [2,] 1.168469 1.247951 1.27073 1.294226 1.390241 NA $out [1] 1.3408 $group [1] 2 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(1.0622, 1.08275, 1.1297, 1.16775, 1.2286, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/74d3h1324515530.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.22890 1.2165 1.231300 [2,] 1.23090 1.2264 1.238850 [3,] 1.24115 1.2391 1.246700 [4,] 1.25599 1.2670 1.252225 [5,] 1.28088 1.3213 1.261050 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 1.229706 1.220582 1.2406 [2,] 1.252594 1.257618 1.2528 $out [1] 1.30666 1.28470 $group [1] 1 3 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(1.2289, 1.2309, 1.24115, 1.25599, 1.28088, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1iv4n1324515530.ps tmp/1iv4n1324515530.png",intern=TRUE)) character(0) > try(system("convert tmp/2fump1324515530.ps tmp/2fump1324515530.png",intern=TRUE)) character(0) > try(system("convert tmp/3duku1324515530.ps tmp/3duku1324515530.png",intern=TRUE)) character(0) > try(system("convert tmp/4ww7e1324515530.ps tmp/4ww7e1324515530.png",intern=TRUE)) character(0) > try(system("convert tmp/569r51324515530.ps tmp/569r51324515530.png",intern=TRUE)) character(0) > try(system("convert tmp/645nj1324515530.ps tmp/645nj1324515530.png",intern=TRUE)) character(0) > try(system("convert tmp/74d3h1324515530.ps tmp/74d3h1324515530.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.655 0.363 2.041