R version 2.8.0 (2008-10-20) 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(14538,18730,22485,20036,16971,19028,22759,20516,26195,27786,24090,25447,11509,15572,22518,20520,17789,20205,26835,25826,31934,30019,30111,31566,12738,19814,24776,20424,18688,20418,25778,25100,25859,30651,26551,31124,9367,17382,20995,18205,17328,18157,23691,26736,27165,34506,29506,31956,10698,18479,19785,19684,18730,17970,27044,22405,26482,29096,25591,29743,13807,19169,22782,20366,17537,18004,24319,22679,32034,36438,29383,28029,15548,17704,25316,20764,18089,21705,23843,22397,26105,29462,27071,31514,11514,17409,24561,21382,17351,22780,23970,26887,34777,35022,35338,36845,13971,22228,28806,20506,22414,25814,28352,29965,30212,32609,30364,37702,13253,21790,27192,21725,22205,24693,29133,35953,37863,43129,39690,41086) > 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] 120 > (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] 10 10 10 10 10 10 10 10 10 10 10 10 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] 14538 11509 12738 9367 10698 13807 15548 11514 13971 13253 NA [2,] 18730 15572 19814 17382 18479 19169 17704 17409 22228 21790 NA [3,] 22485 22518 24776 20995 19785 22782 25316 24561 28806 27192 NA [4,] 20036 20520 20424 18205 19684 20366 20764 21382 20506 21725 NA [5,] 16971 17789 18688 17328 18730 17537 18089 17351 22414 22205 NA [6,] 19028 20205 20418 18157 17970 18004 21705 22780 25814 24693 NA [7,] 22759 26835 25778 23691 27044 24319 23843 23970 28352 29133 NA [8,] 20516 25826 25100 26736 22405 22679 22397 26887 29965 35953 NA [9,] 26195 31934 25859 27165 26482 32034 26105 34777 30212 37863 NA [10,] 27786 30019 30651 34506 29096 36438 29462 35022 32609 43129 NA [11,] 24090 30111 26551 29506 25591 29383 27071 35338 30364 39690 NA [12,] 25447 31566 31124 31956 29743 28029 31514 36845 37702 41086 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 4192 4063 7076 8015 7781 5362 2156 5895 8257 8537 [2,] 3755 6946 4962 3613 1306 3613 7612 7152 6578 5402 [3,] -2449 -1998 -4352 -2790 -101 -2416 -4552 -3179 -8300 -5467 [4,] -3065 -2731 -1736 -877 -954 -2829 -2675 -4031 1908 480 [5,] 2057 2416 1730 829 -760 467 3616 5429 3400 2488 [6,] 3731 6630 5360 5534 9074 6315 2138 1190 2538 4440 [7,] -2243 -1009 -678 3045 -4639 -1640 -1446 2917 1613 6820 [8,] 5679 6108 759 429 4077 9355 3708 7890 247 1910 [9,] 1591 -1915 4792 7341 2614 4404 3357 245 2397 5266 [10,] -3696 92 -4100 -5000 -3505 -7055 -2391 316 -2245 -3439 [11,] 1357 1455 4573 2450 4152 -1354 4443 1507 7338 1396 [12,] -13938 -18828 -21757 -21258 -15936 -12481 -20000 -22874 -24449 NA [,11] [1,] NA [2,] NA [3,] NA [4,] NA [5,] NA [6,] NA [7,] NA [8,] NA [9,] NA [10,] NA [11,] NA [12,] 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/freestat/rcomp/tmp/1bdh51272319020.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/freestat/rcomp/tmp/2bdh51272319020.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/freestat/rcomp/tmp/3bdh51272319020.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/freestat/rcomp/tmp/4l4g81272319020.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] [1,] 9367.0 15572.0 19785.0 19684 16971 17970.0 22759.0 20516 25859.0 27786 [2,] 11509.0 17409.0 22485.0 20036 17351 18157.0 23843.0 22405 26195.0 29462 [3,] 12995.5 18604.5 23671.5 20465 17939 20311.5 25048.5 25463 28688.5 31630 [4,] 13971.0 19814.0 25316.0 20764 18730 22780.0 27044.0 26887 32034.0 35022 [5,] 15548.0 22228.0 28806.0 21725 18730 25814.0 29133.0 29965 37863.0 43129 [,11] [,12] [1,] 24090.0 25447 [2,] 26551.0 29743 [3,] 29444.5 31540 [4,] 30364.0 36845 [5,] 35338.0 41086 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 11765.39 17402.87 22257.02 20101.26 17250.00 18001.66 23449.15 23223.61 [2,] 14225.61 19806.13 25085.98 20828.74 18628.00 22621.34 26647.85 27702.39 [,9] [,10] [,11] [,12] [1,] 25771.10 28852 27539.37 27991.56 [2,] 31605.90 34408 31349.63 35088.44 $out [1] 18205 22414 22205 35953 39690 $group [1] 4 5 5 8 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(9367, 11509, 12995.5, 13971, 15548, 15572, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/5l4g81272319020.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] [1,] 2156.0 1306 -5467.0 -4031.0 -760.0 1190 -4639.0 247.0 -1915.0 -5000 [2,] 4192.0 3613 -4552.0 -2829.0 829.0 2538 -1640.0 759.0 1591.0 -4100 [3,] 6485.5 5182 -2984.5 -2205.5 2236.5 4900 -843.5 3892.5 2985.5 -3472 [4,] 8015.0 6946 -2416.0 -877.0 3400.0 6315 2917.0 6108.0 4792.0 -2245 [5,] 8537.0 7612 -101.0 1908.0 5429.0 9074 6820.0 9355.0 7341.0 316 [,11] [,12] [1,] -1354.0 -24449 [2,] 1396.0 -21757 [3,] 1978.5 -20000 [4,] 4443.0 -15936 [5,] 7338.0 -12481 $n [1] 10 10 10 10 10 10 10 10 10 10 10 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 4575.377 3516.7 -4051.731 -3180.797 951.9259 3012.86 -3120.359 1219.926 [2,] 8395.623 6847.3 -1917.269 -1230.203 3521.0741 6787.14 1433.359 6565.074 [,9] [,10] [,11] [,12] [1,] 1386.153 -4398.832 456.0973 -23065.73 [2,] 4584.847 -2545.168 3500.9027 -16934.27 $out [1] -8300 -7055 $group [1] 3 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(2156, 4192, 6485.5, 8015, 8537, 1306, 3613, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/6edgs1272319020.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] [,10] [1,] 14538.0 11509 12738 9367.0 10698.0 13807.0 15548.0 11514.0 13971 13253.0 [2,] 18879.0 18997 20116 17769.5 18604.5 18586.5 19426.5 19395.5 22321 21997.5 [3,] 21500.5 24172 24938 22343.0 21095.0 22730.5 23120.0 24265.5 28579 28162.5 [4,] 24768.5 30065 26205 28335.5 26763.0 28706.0 26588.0 34899.5 30288 38776.5 [5,] 27786.0 31934 31124 34506.0 29743.0 36438.0 31514.0 36845.0 37702 43129.0 [,11] [1,] NA [2,] NA [3,] NA [4,] NA [5,] NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 18814.26 19123.81 22160.77 17523.78 17373.85 18114.93 19853.59 17194.02 [2,] 24186.74 29220.19 27715.23 27162.22 24816.15 27346.07 26386.41 31336.98 [,9] [,10] [,11] [1,] 24945.2 20509.49 NA [2,] 32212.8 35815.51 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(14538, 18879, 21500.5, 24768.5, 27786, 11509, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/7edgs1272319020.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,] 12694.30 12995.5 12720.12 [2,] 19594.45 19458.0 19489.25 [3,] 24747.00 24360.0 24249.25 [4,] 29816.05 29066.5 28814.38 [5,] 32871.80 31630.0 32855.50 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 20084.86 19977.5 19996.00 [2,] 29409.14 28742.5 28502.50 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" > dev.off() null device 1 > > try(system("convert tmp/1bdh51272319020.ps tmp/1bdh51272319020.png",intern=TRUE)) character(0) > try(system("convert tmp/2bdh51272319020.ps tmp/2bdh51272319020.png",intern=TRUE)) character(0) > try(system("convert tmp/3bdh51272319020.ps tmp/3bdh51272319020.png",intern=TRUE)) character(0) > try(system("convert tmp/4l4g81272319020.ps tmp/4l4g81272319020.png",intern=TRUE)) character(0) > try(system("convert tmp/5l4g81272319020.ps tmp/5l4g81272319020.png",intern=TRUE)) character(0) > try(system("convert tmp/6edgs1272319020.ps tmp/6edgs1272319020.png",intern=TRUE)) character(0) > try(system("convert tmp/7edgs1272319020.ps tmp/7edgs1272319020.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.959 1.537 2.291