R version 2.9.0 (2009-04-17) 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(2465,1932,1993,2243,1758,1806,2063,1823,2137,2428,2139,2265,2615,2070,2794,2190,2434,2520,2063,2068,2537,1898,2139,2408,2725,2201,2311,2548,2276,2351,2280,2057,2479,2379,2295,2456,2546,2844,2260,2981,2678,3440,2842,2450,2669,2570,2540,2318,2930,2946,2799,2695,2498,2260,2160,2058,2533,2150,2172,2155,3016) > 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] 61 > (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] 6 5 5 5 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 2465 2615 2725 2546 2930 3016 [2,] 1932 2070 2201 2844 2946 NA [3,] 1993 2794 2311 2260 2799 NA [4,] 2243 2190 2548 2981 2695 NA [5,] 1758 2434 2276 2678 2498 NA [6,] 1806 2520 2351 3440 2260 NA [7,] 2063 2063 2280 2842 2160 NA [8,] 1823 2068 2057 2450 2058 NA [9,] 2137 2537 2479 2669 2533 NA [10,] 2428 1898 2379 2570 2150 NA [11,] 2139 2139 2295 2540 2172 NA [12,] 2265 2408 2456 2318 2155 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -533 -545 -524 298 16 NA [2,] 61 724 110 -584 -147 NA [3,] 250 -604 237 721 -104 NA [4,] -485 244 -272 -303 -197 NA [5,] 48 86 75 762 -238 NA [6,] 257 -457 -71 -598 -100 NA [7,] -240 5 -223 -392 -102 NA [8,] 314 469 422 219 475 NA [9,] 291 -639 -100 -99 -383 NA [10,] -289 241 -84 -30 22 NA [11,] 126 269 161 -222 -17 NA [12,] 350 317 90 612 861 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/14jgx1258053141.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/2kqht1258053141.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/3bezo1258053141.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/4zj281258053141.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,] 2465 1932 1993 2190 2276 2260 2063 2057 2479 1898 2139 2155 [2,] 2546 2070 2260 2243 2276 2260 2063 2057 2479 2150 2139 2265 [3,] 2670 2201 2311 2548 2434 2351 2160 2058 2533 2379 2172 2318 [4,] 2930 2844 2794 2695 2498 2520 2280 2068 2537 2428 2295 2408 [5,] 3016 2946 2799 2981 2678 2520 2280 2068 2537 2570 2295 2456 $n [1] 6 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 2422.308 1654.094 1933.677 2228.618 2277.135 2167.285 2006.668 2050.227 [2,] 2917.692 2747.906 2688.323 2867.382 2590.865 2534.715 2313.332 2065.773 [,9] [,10] [,11] [,12] [1,] 2492.017 2182.566 2061.771 2216.957 [2,] 2573.983 2575.434 2282.229 2419.043 $out [1] 1758 1806 3440 2842 1823 2450 2137 2669 2540 $group [1] 5 6 6 7 8 8 9 9 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(2465, 2546, 2670, 2930, 3016, 1932, 2070, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/52g7e1258053141.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,] -545 -147 -604 -303 48 -598 -392 219 -639 -84 -222 90 [2,] -533 -147 -104 -303 48 -457 -240 314 -383 -84 -17 317 [3,] -524 61 237 -272 75 -100 -223 422 -100 -30 126 350 [4,] 16 110 250 -197 86 -71 -102 469 -99 22 161 612 [5,] 298 110 721 -197 86 257 5 475 291 22 269 861 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -911.9220 -120.5956 -13.13551 -346.8993 48.1493 -372.7466 -320.5105 [2,] -136.0780 242.5956 487.13551 -197.1007 101.8507 172.7466 -125.4895 [,8] [,9] [,10] [,11] [,12] [1,] 312.4774 -300.6737 -104.89933 0.2256484 141.5537 [2,] 531.5226 100.6737 44.89933 251.7743516 558.4463 $out [1] 724 -584 -485 244 762 -238 -289 241 $group [1] 2 2 4 4 5 5 10 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-545, -533, -524, 16, 298, -147, -147, 61, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/69obf1258053141.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,] 1758.0 1898.0 2057.0 2260.0 2058.0 3016 [2,] 1877.5 2069.0 2278.0 2495.0 2157.5 3016 [3,] 2100.0 2299.0 2331.0 2619.5 2379.0 3016 [4,] 2254.0 2528.5 2467.5 2843.0 2747.0 3016 [5,] 2465.0 2794.0 2725.0 2981.0 2946.0 3016 $n [1] 12 12 12 12 12 1 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1928.276 2089.419 2244.568 2460.775 2110.125 3016 [2,] 2271.724 2508.581 2417.432 2778.225 2647.875 3016 $out [1] 3440 $group [1] 4 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(1758, 1877.5, 2100, 2254, 2465, 1898, 2069, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/76kdl1258053141.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,] 2091.200 2058.0 2062.5 [2,] 2283.300 2186.5 2253.0 [3,] 2363.700 2334.5 2388.5 [4,] 2473.200 2483.5 2488.5 [5,] 2716.167 2670.0 2721.0 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 2277.085 2199.036 2281.087 [2,] 2450.315 2469.964 2495.913 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(2091.2, 2283.3, 2363.7, 2473.2, 2716.16666666667, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > system("convert tmp/14jgx1258053141.ps tmp/14jgx1258053141.png") > system("convert tmp/2kqht1258053141.ps tmp/2kqht1258053141.png") > system("convert tmp/3bezo1258053141.ps tmp/3bezo1258053141.png") > system("convert tmp/4zj281258053141.ps tmp/4zj281258053141.png") > system("convert tmp/52g7e1258053141.ps tmp/52g7e1258053141.png") > system("convert tmp/69obf1258053141.ps tmp/69obf1258053141.png") > system("convert tmp/76kdl1258053141.ps tmp/76kdl1258053141.png") > > > proc.time() user system elapsed 1.213 0.970 7.771