R version 2.12.1 (2010-12-16) Copyright (C) 2010 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(193.230,199.068,195.076,191.563,191.067,186.665,185.508,184.371,183.046,175.714,175.768,171.029,170.465,170.102,156.389,124.291,99.360,86.675,85.056,128.236,164.257,162.401,152.779,156.005,153.387,153.190,148.840,144.211,145.953,145.542,150.271,147.489,143.824,134.754,131.736,126.304,125.511,125.495,130.133,126.257,110.323,98.417,105.749,120.665,124.075,127.245,146.731,144.979,148.210,144.670,142.970,142.524,146.142,146.522,148.128,148.798,150.181,152.388,155.694,160.662,155.520,158.262,154.338,158.196,160.371,154.856,150.636,145.899,141.242,140.834,141.119,139.104,134.437,129.425,123.155,119.273,120.472,121.523,121.983,123.658,124.794,124.827,120.382,117.395,115.790,114.283,117.271,117.448,118.764,120.550,123.554,125.412,124.182,119.828,115.361,114.226,115.214,115.864,114.276,113.469) > par1 = '10' > #'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] 100 > (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 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 193.230 175.768 164.257 150.271 110.323 142.970 155.520 141.119 124.794 [2,] 199.068 171.029 162.401 147.489 98.417 142.524 158.262 139.104 124.827 [3,] 195.076 170.465 152.779 143.824 105.749 146.142 154.338 134.437 120.382 [4,] 191.563 170.102 156.005 134.754 120.665 146.522 158.196 129.425 117.395 [5,] 191.067 156.389 153.387 131.736 124.075 148.128 160.371 123.155 115.790 [6,] 186.665 124.291 153.190 126.304 127.245 148.798 154.856 119.273 114.283 [7,] 185.508 99.360 148.840 125.511 146.731 150.181 150.636 120.472 117.271 [8,] 184.371 86.675 144.211 125.495 144.979 152.388 145.899 121.523 117.448 [9,] 183.046 85.056 145.953 130.133 148.210 155.694 141.242 121.983 118.764 [10,] 175.714 128.236 145.542 126.257 144.670 160.662 140.834 123.658 120.550 [,10] [,11] [1,] 123.554 NA [2,] 125.412 NA [3,] 124.182 NA [4,] 119.828 NA [5,] 115.361 NA [6,] 114.226 NA [7,] 115.214 NA [8,] 115.864 NA [9,] 114.276 NA [10,] 113.469 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 5.838 -4.739 -1.856 -2.782 -11.906 -0.446 2.742 -2.015 0.033 1.858 [2,] -3.992 -0.564 -9.622 -3.665 7.332 3.618 -3.924 -4.667 -4.445 -1.230 [3,] -3.513 -0.363 3.226 -9.070 14.916 0.380 3.858 -5.012 -2.987 -4.354 [4,] -0.496 -13.713 -2.618 -3.018 3.410 1.606 2.175 -6.270 -1.605 -4.467 [5,] -4.402 -32.098 -0.197 -5.432 3.170 0.670 -5.515 -3.882 -1.507 -1.135 [6,] -1.157 -24.931 -4.350 -0.793 19.486 1.383 -4.220 1.199 2.988 0.988 [7,] -1.137 -12.685 -4.629 -0.016 -1.752 2.207 -4.737 1.051 0.177 0.650 [8,] -1.325 -1.619 1.742 4.638 3.231 3.306 -4.657 0.460 1.316 -1.588 [9,] -7.332 43.180 -0.411 -3.876 -3.540 4.968 -0.408 1.675 1.786 -0.807 [10,] 0.054 36.021 4.729 -15.934 -1.700 -5.142 0.285 1.136 3.004 NA [,11] [1,] NA [2,] NA [3,] NA [4,] NA [5,] NA [6,] NA [7,] NA [8,] NA [9,] NA [10,] 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/16t9w1305836761.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/www/rcomp/tmp/2h7jp1305836761.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/www/rcomp/tmp/3i29r1305836761.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/www/rcomp/tmp/45sy81305836761.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] [1,] 110.3230 98.4170 105.749 117.395 115.361 114.2260 99.360 86.675 [2,] 124.7940 125.4120 124.182 120.665 123.155 119.2730 117.271 117.448 [3,] 146.6205 145.0065 144.983 140.638 139.932 126.7745 136.121 134.853 [4,] 164.2570 162.4010 154.338 158.196 156.389 153.1900 150.181 145.899 [5,] 193.2300 199.0680 195.076 191.563 191.067 186.6650 185.508 184.371 [,9] [,10] [1,] 85.0560 113.469 [2,] 118.7640 123.658 [3,] 135.6875 134.535 [4,] 148.2100 145.542 [5,] 183.0460 175.714 $n [1] 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 126.9032 126.5253 129.9159 121.8860 123.3270 109.8282 119.6779 120.6377 [2,] 166.3378 163.4877 160.0501 159.3900 156.5370 143.7208 152.5641 149.0683 [,9] [,10] [1,] 120.9751 123.6009 [2,] 150.3999 145.4691 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" Warning message: In bxp(list(stats = c(110.323, 124.794, 146.6205, 164.257, 193.23, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/5a2891305836761.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,] -4.739 -9.6220 -9.070 -6.2700 -5.5150 -4.3500 -4.7370 -4.657 -7.3320 [2,] -2.782 -4.4450 -4.354 -4.4670 -5.4320 -4.2200 -4.6290 -1.588 -3.5400 [3,] -1.151 -3.7945 -1.675 -2.1115 -2.6945 0.0975 -0.5765 0.888 -0.4095 [4,] 1.858 -0.5640 3.226 1.6060 -0.1970 1.3830 0.6500 3.231 1.7860 [5,] 5.838 3.6180 3.858 3.4100 3.1700 2.9880 2.2070 4.638 4.9680 [,10] [1,] -5.142 [2,] -1.700 [3,] 0.285 [4,] 3.004 [5,] 4.729 $n [1] 10 10 10 10 10 10 10 10 10 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -3.469329 -5.733602 -5.462270 -5.145813 -5.31011472 -2.701982 -3.214099 [2,] 1.167329 -1.855398 2.112270 0.922813 -0.07888528 2.896982 2.061099 [,8] [,9] [,10] [1,] -1.519765 -3.070582 -2.19244 [2,] 3.295765 2.251582 2.76244 $out [1] -11.906 7.332 14.916 -13.713 -32.098 -24.931 19.486 -12.685 43.180 [10] 36.021 -15.934 $group [1] 1 2 3 4 5 6 6 7 9 10 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" Warning message: In bxp(list(stats = c(-4.739, -2.78199999999998, -1.15100000000000, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/6jzpa1305836761.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] [,7] [,8] [1,] 175.714 85.0560 144.2110 125.4950 98.417 142.524 140.834 119.2730 [2,] 184.371 99.3600 145.9530 126.2570 110.323 146.142 145.899 121.5230 [3,] 188.866 142.3125 152.9845 130.9345 125.660 148.463 154.597 123.4065 [4,] 193.230 170.4650 156.0050 143.8240 144.979 152.388 158.196 134.4370 [5,] 199.068 175.7680 164.2570 150.2710 148.210 160.662 160.371 141.1190 [,9] [,10] [,11] [1,] 114.283 113.4690 NA [2,] 117.271 114.2760 NA [3,] 118.106 115.6125 NA [4,] 120.550 123.5540 NA [5,] 124.827 125.4120 NA $n [1] 10 10 10 10 10 10 10 10 10 10 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 184.4397 106.7856 147.9621 122.1573 108.3445 145.3422 148.4529 116.9542 [2,] 193.2923 177.8394 158.0069 139.7117 142.9755 151.5838 160.7411 129.8588 [,9] [,10] [,11] [1,] 116.4677 110.9768 NA [2,] 119.7443 120.2482 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(175.714, 184.371, 188.866, 193.23, 199.068, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/7bit71305836761.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,] 133.8853 126.7745 132.0679 [2,] 135.9724 134.8530 133.9585 [3,] 139.9526 138.0265 137.9108 [4,] 144.7374 144.9830 140.3470 [5,] 148.1806 146.6205 145.4740 $n [1] 10 10 10 $conf [,1] [,2] [,3] [1,] 135.5732 132.9651 134.7188 [2,] 144.3319 143.0879 141.1027 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(133.8853, 135.9724, 139.95255, 144.7374, 148.1806, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/16t9w1305836761.ps tmp/16t9w1305836761.png",intern=TRUE)) character(0) > try(system("convert tmp/2h7jp1305836761.ps tmp/2h7jp1305836761.png",intern=TRUE)) character(0) > try(system("convert tmp/3i29r1305836761.ps tmp/3i29r1305836761.png",intern=TRUE)) character(0) > try(system("convert tmp/45sy81305836761.ps tmp/45sy81305836761.png",intern=TRUE)) character(0) > try(system("convert tmp/5a2891305836761.ps tmp/5a2891305836761.png",intern=TRUE)) character(0) > try(system("convert tmp/6jzpa1305836761.ps tmp/6jzpa1305836761.png",intern=TRUE)) character(0) > try(system("convert tmp/7bit71305836761.ps tmp/7bit71305836761.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.736 0.536 3.258