R version 2.10.1 (2009-12-14) Copyright (C) 2009 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(18450,21845,26488,22394,28057,25451,24872,33424,24052,28449,33533,37351,19969,21701,26249,24493,24603,26485,30723,34569,26689,26157,32064,38870,21337,19419,23166,28286,24570,24001,33151,24878,26804,28967,33311,40226,20504,23060,23562,27562,23940,24584,34303,25517,23494,29095,32903,34379,16991,21109,23740,25552,21752,20294,29009,25500,24166,26960,31222,38641,14672,17543,25453,32683,22449,22316,27595,25451,25421,25288,32568,35110,16052,22146,21198,19543,22084,23816,29961,26773,26635,26972,30207,38687,16974,21697,24179,23757,25013,24019,30345,24488,25156,25650,30923,37240,17466,19463,24352,26805,25236,24735,29356,31234,22724,28496,32857,37198) > 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] 108 > (np <- floor(n / par1)) [1] 9 > 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] 9 9 9 9 9 9 9 9 9 9 9 9 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 18450 19969 21337 20504 16991 14672 16052 16974 17466 NA [2,] 21845 21701 19419 23060 21109 17543 22146 21697 19463 NA [3,] 26488 26249 23166 23562 23740 25453 21198 24179 24352 NA [4,] 22394 24493 28286 27562 25552 32683 19543 23757 26805 NA [5,] 28057 24603 24570 23940 21752 22449 22084 25013 25236 NA [6,] 25451 26485 24001 24584 20294 22316 23816 24019 24735 NA [7,] 24872 30723 33151 34303 29009 27595 29961 30345 29356 NA [8,] 33424 34569 24878 25517 25500 25451 26773 24488 31234 NA [9,] 24052 26689 26804 23494 24166 25421 26635 25156 22724 NA [10,] 28449 26157 28967 29095 26960 25288 26972 25650 28496 NA [11,] 33533 32064 33311 32903 31222 32568 30207 30923 32857 NA [12,] 37351 38870 40226 34379 38641 35110 38687 37240 37198 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 3395 1732 -1918 2556 4118 2871 6094 4723 1997 NA [2,] 4643 4548 3747 502 2631 7910 -948 2482 4889 NA [3,] -4094 -1756 5120 4000 1812 7230 -1655 -422 2453 NA [4,] 5663 110 -3716 -3622 -3800 -10234 2541 1256 -1569 NA [5,] -2606 1882 -569 644 -1458 -133 1732 -994 -501 NA [6,] -579 4238 9150 9719 8715 5279 6145 6326 4621 NA [7,] 8552 3846 -8273 -8786 -3509 -2144 -3188 -5857 1878 NA [8,] -9372 -7880 1926 -2023 -1334 -30 -138 668 -8510 NA [9,] 4397 -532 2163 5601 2794 -133 337 494 5772 NA [10,] 5084 5907 4344 3808 4262 7280 3235 5273 4361 NA [11,] 3818 6806 6915 1476 7419 2542 8480 6317 4341 NA [12,] -17382 -17533 -19722 -17388 -23969 -19058 -21713 -19774 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/rcomp/tmp/18l431272481737.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/rcomp/tmp/28l431272481737.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/rcomp/tmp/31ul61272481737.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/rcomp/tmp/41ul61272481737.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,] 14672 17543 21198 19543 21752 23816 27595 24488 22724 25288 30207 35110 [2,] 16974 19463 23562 23757 22449 23816 29009 25451 24052 26157 31222 37198 [3,] 17466 21697 24179 25552 24570 24019 29961 25517 25156 26972 32568 37351 [4,] 19969 21845 25453 27562 25013 24735 30723 31234 26635 28496 32903 38687 [5,] 21337 23060 26488 32683 28057 25451 33151 34569 26804 29095 33533 40226 $n [1] 9 9 9 9 9 9 9 9 9 9 9 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 15888.63 20442.48 23183.07 23548.03 23219.63 23534.99 29058.29 22471.29 [2,] 19043.37 22951.52 25174.93 27555.97 25920.37 24503.01 30863.71 28562.71 [,9] [,10] [,11] [,12] [1,] 23795.62 25740.13 31682.67 36566.79 [2,] 26516.38 28203.87 33453.33 38135.21 $out [1] 26485 20294 22316 24872 34303 34379 $group [1] 6 6 6 7 7 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(14672, 16974, 17466, 19969, 21337, 17543, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/5cmlr1272481737.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,] 1732 502 -4094 -10234 -2606 -579 -8786 -9372 -532 3235 1476 -23969.0 [2,] 1997 2482 -1655 -3716 -994 4621 -5857 -7880 337 4262 3818 -20743.5 [3,] 2871 3747 1812 -1569 -501 6145 -3188 -1334 2163 4361 6317 -19390.0 [4,] 4118 4643 4000 1256 644 8715 1878 -30 4397 5273 6915 -17460.5 [5,] 6094 4889 7230 5663 1882 9719 8552 1926 5772 5907 8480 -17382.0 $n [1] 9 9 9 9 9 9 9 9 9 9 9 8 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 1753.94 2608.873 -1166.3 -4187.587 -1363.68 3988.827 -7261.7667 -5468.333 [2,] 3988.06 4885.127 4790.3 1049.587 361.68 8301.173 885.7667 2800.333 [,9] [,10] [,11] [,12] [1,] 24.73333 3828.54 4685.913 -21223.93 [2,] 4301.26667 4893.46 7948.087 -17556.07 $out [1] -1918 7910 -948 7280 $group [1] 1 2 2 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(1732, 1997, 2871, 4118, 6094, 502, 2482, 3747, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/6cmlr1272481737.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] [,7] [,8] [,9] [1,] 18450.0 19969.0 19419.0 20504.0 16991.0 14672.0 16052.0 21697.0 17466.0 [2,] 23223.0 24548.0 23583.5 23528.0 21430.5 22382.5 21641.0 23888.0 23538.0 [3,] 25969.5 26367.0 25841.0 25050.5 24833.0 25436.0 25225.5 24750.5 26020.5 [4,] 30936.5 31393.5 31059.0 30999.0 27984.5 30081.5 28466.5 27997.5 30295.0 [5,] 37351.0 38870.0 40226.0 34379.0 31222.0 35110.0 38687.0 30923.0 37198.0 [,10] [1,] NA [2,] NA [3,] NA [4,] NA [5,] NA $n [1] 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 22451.32 23244.72 22431.37 21642.93 21843.68 21924.43 22112.34 22876.13 [2,] 29487.68 29489.28 29250.63 28458.07 27822.32 28947.57 28338.66 26624.87 [,9] [,10] [1,] 22938.59 NA [2,] 29102.41 NA $out [1] 38641 16974 37240 $group [1] 5 8 8 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" NA Warning message: In bxp(list(stats = c(18450, 23223, 25969.5, 30936.5, 37351, 19969, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/7cmlr1272481737.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,] 18046.11 21697.0 18471.50 [2,] 24078.06 24099.0 24003.25 [3,] 25345.33 25336.5 25501.50 [4,] 28952.72 28466.5 29104.25 [5,] 32176.44 32568.0 32062.50 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 23121.97 23344.45 23174.9 [2,] 27568.70 27328.55 27828.1 $out [1] 37522.44 17466.00 37351.00 37942.50 $group [1] 1 2 2 3 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(18046.1111111111, 24078.0555555556, 25345.3333333333, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/18l431272481737.ps tmp/18l431272481737.png",intern=TRUE)) character(0) > try(system("convert tmp/28l431272481737.ps tmp/28l431272481737.png",intern=TRUE)) character(0) > try(system("convert tmp/31ul61272481737.ps tmp/31ul61272481737.png",intern=TRUE)) character(0) > try(system("convert tmp/41ul61272481737.ps tmp/41ul61272481737.png",intern=TRUE)) character(0) > try(system("convert tmp/5cmlr1272481737.ps tmp/5cmlr1272481737.png",intern=TRUE)) character(0) > try(system("convert tmp/6cmlr1272481737.ps tmp/6cmlr1272481737.png",intern=TRUE)) character(0) > try(system("convert tmp/7cmlr1272481737.ps tmp/7cmlr1272481737.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.590 1.470 2.759