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(3595,3914,4159,3676,3794,3446,3504,3958,3353,3480,3098,2944,3389,3497,4404,3849,3734,3060,3507,3287,3215,3764,2734,2837,2766,3851,3289,3848,3348,3682,4058,3655,3811,3341,3032,3475,3353,3186,3902,4164,3499,4145,3796,3711,3949,3740,3243,4407,4814,3908,5250,3937,4004,5560,3922,3759,4138,4634,3996,4308,4142,4429,5219,4929,5754,5592,4163,4962,5208,4755,4491,5732,5730,5024,6056,4901,5353,5578,4618,4724,5011,5298,4143,4617,4736,4214,5112,4197,4119,5104,4194,4583,3790,5557,4304,3838,4277,4951,4479,4677,4274,4782) > 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] 102 > (np <- floor(n / par1)) [1] 8 > 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 8 8 8 8 8 8 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 3595 3389 2766 3353 4814 4142 5730 4736 4277 [2,] 3914 3497 3851 3186 3908 4429 5024 4214 4951 [3,] 4159 4404 3289 3902 5250 5219 6056 5112 4479 [4,] 3676 3849 3848 4164 3937 4929 4901 4197 4677 [5,] 3794 3734 3348 3499 4004 5754 5353 4119 4274 [6,] 3446 3060 3682 4145 5560 5592 5578 5104 4782 [7,] 3504 3507 4058 3796 3922 4163 4618 4194 NA [8,] 3958 3287 3655 3711 3759 4962 4724 4583 NA [9,] 3353 3215 3811 3949 4138 5208 5011 3790 NA [10,] 3480 3764 3341 3740 4634 4755 5298 5557 NA [11,] 3098 2734 3032 3243 3996 4491 4143 4304 NA [12,] 2944 2837 3475 4407 4308 5732 4617 3838 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 319 108 1085 -167 -906 287 -706 -522 674 [2,] 245 907 -562 716 1342 790 1032 898 -472 [3,] -483 -555 559 262 -1313 -290 -1155 -915 198 [4,] 118 -115 -500 -665 67 825 452 -78 -403 [5,] -348 -674 334 646 1556 -162 225 985 508 [6,] 58 447 376 -349 -1638 -1429 -960 -910 NA [7,] 454 -220 -403 -85 -163 799 106 389 NA [8,] -605 -72 156 238 379 246 287 -793 NA [9,] 127 549 -470 -209 496 -453 287 1767 NA [10,] -382 -1030 -309 -497 -638 -264 -1155 -1253 NA [11,] -154 103 443 1164 312 1241 474 -466 NA [12,] 445 -71 -122 407 -166 -2 119 439 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/1w7cq1228643343.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/2xgdk1228643343.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/3g46r1228643343.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/41bvw1228643343.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,] 2766 3186 3289 3676 3348 3060 3504.0 3287.0 3215.0 3341.0 2734.0 2837.0 [2,] 3389 3851 4159 3849 3734 3682 3651.5 3683.0 3571.5 3610.0 3065.0 3209.5 [3,] 4142 3914 4479 4164 4004 4782 3990.0 3858.5 3880.0 4199.0 3619.5 4073.0 [4,] 4736 4429 5219 4677 4274 5560 4178.5 4653.5 4574.5 5026.5 4223.5 4512.0 [5,] 5730 5024 6056 4929 4274 5592 4618.0 4962.0 5208.0 5557.0 4491.0 5732.0 $n [1] 9 9 9 9 9 9 8 8 8 8 8 8 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 3432.58 3609.587 3920.733 3727.92 3719.6 3792.92 3695.61 3316.365 3319.71 [2,] 4851.42 4218.413 5037.267 4600.08 4288.4 5771.08 4284.39 4400.635 4440.29 [,10] [,11] [,12] [1,] 3407.723 2972.345 3345.405 [2,] 4990.277 4266.655 4800.595 $out [1] 5754 5353 $group [1] 5 5 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(2766, 3389, 4142, 4736, 5730, 3186, 3851, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5ppug1228643343.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,] -906 -562 -1313 -665 -674 -1638.0 -403.0 -793.0 -470.0 -1253.0 -466.0 [2,] -522 245 -915 -403 -162 -1194.5 -191.5 -338.5 -331.0 -1092.5 -25.5 [3,] 108 790 -483 -78 334 -629.5 10.5 197.0 207.0 -567.5 377.5 [4,] 319 907 198 118 646 217.0 421.5 266.5 522.5 -345.5 819.0 [5,] 1085 1342 559 825 1556 447.0 799.0 379.0 1767.0 -264.0 1241.0 [,12] [1,] -166.0 [2,] -96.5 [3,] 58.5 [4,] 423.0 [5,] 445.0 $n [1] 9 9 9 9 9 8 8 8 8 8 8 8 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -334.9267 441.3467 -1069.18 -352.3933 -91.54667 -1417.9842 -331.9306 [2,] 550.9267 1138.6533 103.18 196.3933 759.54667 158.9842 352.9306 [,8] [,9] [,10] [,11] [,12] [1,] -140.9617 -269.7774 -984.7849 -94.24982 -231.7002 [2,] 534.9617 683.7774 -150.2151 849.24982 348.7002 $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(-906, -522, 108, 319, 1085, -562, 245, 790, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6of131228643343.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,] 2944.0 2734.0 2766.0 3186 3759.0 4142.0 4143.0 3790.0 4274 [2,] 3399.5 3137.5 3315.0 3426 3929.5 4460.0 4671.0 4156.5 4277 [3,] 3549.5 3443.0 3565.0 3768 4071.0 4945.5 5017.5 4259.0 4578 [4,] 3854.0 3749.0 3829.5 4047 4724.0 5405.5 5465.5 4920.0 4782 [5,] 4159.0 4404.0 4058.0 4407 5560.0 5754.0 6056.0 5557.0 4951 $n [1] 12 12 12 12 12 12 12 12 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 3342.199 3164.091 3330.333 3484.758 3708.623 4514.251 4655.123 3910.763 [2,] 3756.801 3721.909 3799.667 4051.242 4433.377 5376.749 5379.877 4607.237 [,9] [1,] 4252.259 [2,] 4903.741 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" NA Warning message: In bxp(list(stats = c(2944, 3399.5, 3549.5, 3854, 4159, 2734, 3137.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7ipjo1228643343.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,] 3970.250 3619.5 3632.375 [2,] 4039.562 3897.0 3975.625 [3,] 4098.667 4038.5 4101.250 [4,] 4281.562 4181.5 4272.938 [5,] 4549.889 4479.0 4689.000 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 3988.289 3908.738 3965.644 [2,] 4209.044 4168.262 4236.856 $out [1] 4652.222 3630.125 4782.000 $group [1] 1 1 2 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(3970.25, 4039.5625, 4098.66666666667, 4281.5625, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1w7cq1228643343.ps tmp/1w7cq1228643343.png") > system("convert tmp/2xgdk1228643343.ps tmp/2xgdk1228643343.png") > system("convert tmp/3g46r1228643343.ps tmp/3g46r1228643343.png") > system("convert tmp/41bvw1228643343.ps tmp/41bvw1228643343.png") > system("convert tmp/5ppug1228643343.ps tmp/5ppug1228643343.png") > system("convert tmp/6of131228643343.ps tmp/6of131228643343.png") > system("convert tmp/7ipjo1228643343.ps tmp/7ipjo1228643343.png") > > > proc.time() user system elapsed 1.210 0.952 1.529