R version 2.7.2 (2008-08-25) 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(1712,2641,2267,2126,2231,1517,2010,2628,2115,1829,1636,1787,2122,2620,2555,2337,2524,1801,2417,2389,2267,2135,1760,1905,2176,2344,2673,2766,2785,2003,2588,2739,2703,2464,1974,2164,2385,2936,2700,2855,2764,1808,2588,2600,2526,2259,1738,1902,2137,2460,2495,2525,2465,1828,2273,2377,2344,2071,1611,1671) > par1 = '12' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > 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,] 1712 2122 2176 2385 2137 NA [2,] 2641 2620 2344 2936 2460 NA [3,] 2267 2555 2673 2700 2495 NA [4,] 2126 2337 2766 2855 2525 NA [5,] 2231 2524 2785 2764 2465 NA [6,] 1517 1801 2003 1808 1828 NA [7,] 2010 2417 2588 2588 2273 NA [8,] 2628 2389 2739 2600 2377 NA [9,] 2115 2267 2703 2526 2344 NA [10,] 1829 2135 2464 2259 2071 NA [11,] 1636 1760 1974 1738 1611 NA [12,] 1787 1905 2164 1902 1671 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 929 498 168 551 323 NA [2,] -374 -65 329 -236 35 NA [3,] -141 -218 93 155 30 NA [4,] 105 187 19 -91 -60 NA [5,] -714 -723 -782 -956 -637 NA [6,] 493 616 585 780 445 NA [7,] 618 -28 151 12 104 NA [8,] -513 -122 -36 -74 -33 NA [9,] -286 -132 -239 -267 -273 NA [10,] -193 -375 -490 -521 -460 NA [11,] 151 145 190 164 60 NA [12,] 335 271 221 235 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/www/html/rcomp/tmp/15mqn1225643464.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/2gj8h1225643464.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/34pf21225643464.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/4w45n1225643464.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,] 2122 2344 2267 2126 2231 1801 2010 2377 2115 1829 1611 1671 [2,] 2122 2460 2495 2337 2465 1801 2273 2389 2267 2071 1636 1787 [3,] 2137 2620 2555 2525 2524 1808 2417 2600 2344 2135 1738 1902 [4,] 2176 2641 2673 2766 2764 1828 2588 2628 2526 2259 1760 1905 [5,] 2176 2641 2700 2855 2785 1828 2588 2739 2703 2464 1760 1905 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 2098.844 2492.106 2429.226 2221.870 2312.727 1788.922 2194.422 2431.123 [2,] 2175.156 2747.894 2680.774 2828.130 2735.273 1827.078 2639.578 2768.877 [,9] [,10] [,11] [,12] [1,] 2160.991 2002.160 1650.382 1818.621 [2,] 2527.009 2267.840 1825.618 1985.379 $out [1] 1712 2385 2936 1517 2003 1974 2164 $group [1] 1 1 2 6 6 11 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(2122, 2122, 2137, 2176, 2176, 2344, 2460, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5dbs61225643464.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,] 168 -374 -218 -91 -782 445 -28 -122 -286 -521 145 221 [2,] 323 -236 -141 -60 -782 493 12 -122 -273 -490 145 228 [3,] 498 -65 30 19 -723 585 104 -74 -267 -460 151 253 [4,] 551 35 93 105 -714 616 151 -36 -239 -375 164 303 [5,] 551 329 155 187 -637 780 151 -33 -239 -375 190 335 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 336.8958 -256.4879 -135.3438 -97.58858 -771.0486 498.0885 5.78295 [2,] 659.1042 126.4879 195.3438 135.58858 -674.9514 671.9115 202.21705 [,8] [,9] [,10] [,11] [,12] [1,] -134.76738 -291.0243 -541.2587 137.5746 193.75 [2,] -13.23262 -242.9757 -378.7413 164.4254 312.25 $out [1] 929 -956 618 -513 -132 -193 60 $group [1] 1 5 7 8 9 10 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(168, 323, 498, 551, 551, -374, -236, -65, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6kpo21225643464.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] [,6] [1,] 1517.0 1760.0 1974 1738.0 1611.0 NA [2,] 1749.5 2013.5 2170 2080.5 1949.5 NA [3,] 2062.5 2302.0 2526 2557.0 2308.5 NA [4,] 2249.0 2470.5 2721 2732.0 2462.5 NA [5,] 2641.0 2620.0 2785 2936.0 2525.0 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1834.675 2093.559 2274.685 2259.846 2074.517 NA [2,] 2290.325 2510.441 2777.315 2854.154 2542.483 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(1517, 1749.5, 2062.5, 2249, 2641, 1760, 2013.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7a13o1225643464.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,] 1743.8 1738.0 1698.0 [2,] 1996.1 2018.5 1997.5 [3,] 2383.1 2380.5 2413.5 [4,] 2542.3 2540.0 2551.0 [5,] 2600.2 2620.0 2614.5 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 2133.975 2142.640 2161.045 [2,] 2632.225 2618.360 2665.955 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(1743.8, 1996.1, 2383.1, 2542.3, 2600.2, 1738, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/15mqn1225643464.ps tmp/15mqn1225643464.png") > system("convert tmp/2gj8h1225643464.ps tmp/2gj8h1225643464.png") > system("convert tmp/34pf21225643464.ps tmp/34pf21225643464.png") > system("convert tmp/4w45n1225643464.ps tmp/4w45n1225643464.png") > system("convert tmp/5dbs61225643464.ps tmp/5dbs61225643464.png") > system("convert tmp/6kpo21225643464.ps tmp/6kpo21225643464.png") > system("convert tmp/7a13o1225643464.ps tmp/7a13o1225643464.png") > > > proc.time() user system elapsed 1.487 0.983 1.779