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(40628,40167,43375,45610,46255,44375,35461,38096,40813,41582,44461,46390,45744,47990,51847,56641,55016,53119,44471,45200,46256,46922,48965,49447,51702,52837,56273,59070,57871,54862,44357,45264,47111,49050,50518,51824,53495,54623,58088,61321,60205,56527,45623,46127,48141,50648,52441,53661,54156,54245,58182,60436,59412,55903,43648,43555,45483,46956,49087,50433,50505,50890,53703,55276,53959,49732,37776,38437,40187,41626,42682,43647,43625,44352,49669,50986,48869,43127,33629,34948,36346,37607,38948,40274,40044,41139,45041,47433,48126,41639,33538,34742,37152,38399,41374,43363,44071,45080,48487,52140,52780,46700,38202,39915,42199,44356,46188,47883,48149,48201,51438,55796,55989,48794,39252,41414,43856,46086,48284,50101) > 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,] 40628 45744 51702 53495 54156 50505 43625 40044 44071 48149 NA [2,] 40167 47990 52837 54623 54245 50890 44352 41139 45080 48201 NA [3,] 43375 51847 56273 58088 58182 53703 49669 45041 48487 51438 NA [4,] 45610 56641 59070 61321 60436 55276 50986 47433 52140 55796 NA [5,] 46255 55016 57871 60205 59412 53959 48869 48126 52780 55989 NA [6,] 44375 53119 54862 56527 55903 49732 43127 41639 46700 48794 NA [7,] 35461 44471 44357 45623 43648 37776 33629 33538 38202 39252 NA [8,] 38096 45200 45264 46127 43555 38437 34948 34742 39915 41414 NA [9,] 40813 46256 47111 48141 45483 40187 36346 37152 42199 43856 NA [10,] 41582 46922 49050 50648 46956 41626 37607 38399 44356 46086 NA [11,] 44461 48965 50518 52441 49087 42682 38948 41374 46188 48284 NA [12,] 46390 49447 51824 53661 50433 43647 40274 43363 47883 50101 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] -461 2246 1135 1128 89 385 727 1095 1009 52 NA [2,] 3208 3857 3436 3465 3937 2813 5317 3902 3407 3237 NA [3,] 2235 4794 2797 3233 2254 1573 1317 2392 3653 4358 NA [4,] 645 -1625 -1199 -1116 -1024 -1317 -2117 693 640 193 NA [5,] -1880 -1897 -3009 -3678 -3509 -4227 -5742 -6487 -6080 -7195 NA [6,] -8914 -8648 -10505 -10904 -12255 -11956 -9498 -8101 -8498 -9542 NA [7,] 2635 729 907 504 -93 661 1319 1204 1713 2162 NA [8,] 2717 1056 1847 2014 1928 1750 1398 2410 2284 2442 NA [9,] 769 666 1939 2507 1473 1439 1261 1247 2157 2230 NA [10,] 2879 2043 1468 1793 2131 1056 1341 2975 1832 2198 NA [11,] 1929 482 1306 1220 1346 965 1326 1989 1695 1817 NA [12,] -646 2255 1671 495 72 -22 -230 708 266 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/129z11229616601.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/2jf1g1229616601.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/35ess1229616601.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/4oiir1229616601.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,] 40044.0 40167.0 43375.0 45610 46255.0 41639 33538 34742.0 36346.0 37607 [2,] 43625.0 44352.0 48487.0 50986 48869.0 44375 35461 38096.0 40187.0 41582 [3,] 46946.5 48095.5 51642.5 55536 54487.5 49263 38727 40664.5 43027.5 45221 [4,] 51702.0 52837.0 56273.0 59070 57871.0 54862 44357 45200.0 46256.0 46956 [5,] 54156.0 54623.0 58182.0 61321 60205.0 56527 45623 46127.0 48141.0 50648 [,11] [,12] [1,] 38948 40274 [2,] 42682 43647 [3,] 47236 48665 [4,] 49087 50433 [5,] 52441 53661 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 42910.91 43856.06 47752.3 51496.91 49989.74 44023.28 34282.20 37115.06 [2,] 50982.09 52334.94 55532.7 59575.09 58985.26 54502.72 43171.80 44213.94 [,9] [,10] [,11] [,12] [1,] 39995.19 42535.94 44035.81 45274.44 [2,] 46059.81 47906.06 50436.19 52055.56 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(40044, 43625, 46946.5, 51702, 54156, 40167, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/50keh1229616601.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] [1,] -461 2813.0 1317.0 -2117 -7195.0 -12255 -93.0 1056 666 1056.0 482 [2,] 89 3237.0 2235.0 -1317 -6080.0 -10904 661.0 1750 1247 1468.0 1220 [3,] 868 3450.5 2594.5 -1070 -3952.5 -9520 1055.5 1971 1456 1937.5 1336 [4,] 1128 3902.0 3653.0 640 -3009.0 -8648 1713.0 2410 2157 2198.0 1817 [5,] 2246 3937.0 4794.0 693 -1880.0 -8101 2635.0 2717 2507 2975.0 1989 [,12] [1,] -646 [2,] -22 [3,] 266 [4,] 708 [5,] 1671 $n [1] 10 10 10 10 10 10 10 10 10 10 10 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 348.8742 3118.239 1886.011 -2047.79523 -5486.894 -10647.188 529.8789 [2,] 1387.1258 3782.761 3302.989 -92.20477 -2418.106 -8392.812 1581.1211 [,8] [,9] [,10] [,11] [,12] [1,] 1641.238 1001.328 1572.763 1037.715 -118.4667 [2,] 2300.762 1910.672 2302.237 1634.285 650.4667 $out [1] 5317 2255 $group [1] 2 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-461, 89, 868, 1128, 2246, 2813, 3237, 3450.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6lqhu1229616601.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,] 35461.0 44471.0 44357.0 45623.0 43555.0 37776.0 33629.0 33538.0 38202 [2,] 40397.5 46000.0 48080.5 49394.5 46219.5 40906.5 36976.5 37775.5 43135 [3,] 42478.5 48477.5 51763.0 53578.0 52294.5 46689.5 41700.5 41256.5 45634 [4,] 45035.5 52483.0 55567.5 57307.5 57042.5 52296.5 46610.5 44202.0 48185 [5,] 46390.0 56641.0 59070.0 61321.0 60436.0 55276.0 50986.0 48126.0 52780 [,10] [,11] [1,] 39252.0 NA [2,] 44971.0 NA [3,] 48242.5 NA [4,] 50769.5 NA [5,] 55989.0 NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 40363.08 45520.56 48348.13 49968.83 47358.06 41494.44 37306.37 38325.33 [2,] 44593.92 51434.44 55177.87 57187.17 57230.94 51884.56 46094.63 44187.67 [,9] [,10] [,11] [1,] 43330.66 45597.77 NA [2,] 47937.34 50887.23 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(35461, 40397.5, 42478.5, 45035.5, 46390, 44471, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7jgxh1229616601.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,] 39595.70 38727.00 40109.75 [2,] 43538.80 44124.25 43736.69 [3,] 47457.10 47665.75 47455.50 [4,] 50544.05 50452.75 50948.88 [5,] 54470.90 55536.00 54868.62 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 44261.96 44779.28 44165.97 [2,] 50652.24 50552.22 50745.03 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(39595.7, 43538.8, 47457.1, 50544.05, 54470.9, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/129z11229616601.ps tmp/129z11229616601.png") > system("convert tmp/2jf1g1229616601.ps tmp/2jf1g1229616601.png") > system("convert tmp/35ess1229616601.ps tmp/35ess1229616601.png") > system("convert tmp/4oiir1229616601.ps tmp/4oiir1229616601.png") > system("convert tmp/50keh1229616601.ps tmp/50keh1229616601.png") > system("convert tmp/6lqhu1229616601.ps tmp/6lqhu1229616601.png") > system("convert tmp/7jgxh1229616601.ps tmp/7jgxh1229616601.png") > > > proc.time() user system elapsed 1.221 0.945 1.856