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(112,304,794,901,1232,1240,1032,1145,1588,2264,2209,2917,243,558,1238,1502,2000,2146,2066,2046,1952,2771,3278,4000,410,1107,1622,1986,2036,2400,2736,2901,2883,3747,4075,4996,575,999,1411,1493,1846,2899,2372,2856,3468,4193,4440,4186,655,1453,1989,2209,2667,3005,2195,2236,2489,2651,2636,2819) > 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] 60 > (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] 5 5 5 5 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 112 243 410 575 655 NA [2,] 304 558 1107 999 1453 NA [3,] 794 1238 1622 1411 1989 NA [4,] 901 1502 1986 1493 2209 NA [5,] 1232 2000 2036 1846 2667 NA [6,] 1240 2146 2400 2899 3005 NA [7,] 1032 2066 2736 2372 2195 NA [8,] 1145 2046 2901 2856 2236 NA [9,] 1588 1952 2883 3468 2489 NA [10,] 2264 2771 3747 4193 2651 NA [11,] 2209 3278 4075 4440 2636 NA [12,] 2917 4000 4996 4186 2819 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 192 315 697 424 798 NA [2,] 490 680 515 412 536 NA [3,] 107 264 364 82 220 NA [4,] 331 498 50 353 458 NA [5,] 8 146 364 1053 338 NA [6,] -208 -80 336 -527 -810 NA [7,] 113 -20 165 484 41 NA [8,] 443 -94 -18 612 253 NA [9,] 676 819 864 725 162 NA [10,] -55 507 328 247 -15 NA [11,] 708 722 921 -254 183 NA [12,] -2674 -3590 -4421 -3531 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/18izg1258134827.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/2dbfu1258134827.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/387pd1258134827.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/4iga41258134827.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,] 112 304 794 901 1846 1240 2066 1145 1588 2264 2209 2819 [2,] 243 558 1238 1493 1846 2146 2066 2046 1952 2651 2636 2917 [3,] 410 999 1411 1502 2000 2400 2195 2236 2489 2771 3278 4000 [4,] 575 1107 1622 1986 2036 2899 2372 2856 2883 3747 4075 4186 [5,] 655 1453 1989 2209 2036 3005 2736 2901 3468 4193 4440 4996 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 175.4096 611.078 1139.667 1153.647 1865.746 1867.932 1978.781 1663.656 [2,] 644.5904 1386.922 1682.333 1850.353 2134.254 2932.068 2411.219 2808.344 [,9] [,10] [,11] [,12] [1,] 1831.158 1996.569 2261.206 3103.328 [2,] 3146.842 3545.431 4294.794 4896.672 $out [1] 1232 2667 1032 $group [1] 5 5 7 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(112, 243, 410, 575, 655, 304, 558, 999, 1107, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5jmn11258134827.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,] 192 490 82 331 8 -810 -20 -94 676 -55 -254 -4421.0 [2,] 315 490 107 331 146 -527 41 -18 676 -15 183 -4005.5 [3,] 424 515 220 353 338 -208 113 253 725 247 708 -3560.5 [4,] 697 536 264 458 364 -80 165 443 819 328 722 -3102.5 [5,] 798 536 364 498 364 336 165 612 864 507 921 -2674.0 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 154.0798 482.4965 109.0642 263.2621 183.9617 -523.8491 25.38191 -72.74144 [2,] 693.9202 547.5035 330.9358 442.7379 492.0383 107.8491 200.61809 578.74144 [,9] [,10] [,11] [,12] [1,] 623.9566 4.637064 327.1440 -4273.87 [2,] 826.0434 489.362936 1088.8560 -2847.13 $out [1] 680 412 50 1053 484 162 $group [1] 2 2 4 5 7 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(192, 315, 424, 697, 798, 490, 490, 515, 536, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/69p8j1258134827.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,] 112.0 243.0 410 575 1453.0 NA [2,] 847.5 1370.0 1804 1452 2092.0 NA [3,] 1188.5 2023.0 2568 2614 2362.5 NA [4,] 1898.5 2458.5 3324 3827 2659.0 NA [5,] 2917.0 4000.0 4996 4440 3005.0 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 709.1318 1526.528 1874.718 1530.747 2103.887 NA [2,] 1667.8682 2519.472 3261.282 3697.253 2621.113 NA $out [1] 655 $group [1] 5 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(112, 847.5, 1188.5, 1898.5, 2917, 243, 1370, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7ib1v1258134827.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,] 399.0 410.0 409.00 [2,] 1514.5 1456.5 1584.75 [3,] 2158.5 2215.5 2318.25 [4,] 2800.6 2630.0 2860.75 [5,] 3783.6 4000.0 3551.50 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 1571.901 1680.259 1736.258 [2,] 2745.099 2750.741 2900.242 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(399, 1514.5, 2158.5, 2800.6, 3783.6, 410, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/18izg1258134827.ps tmp/18izg1258134827.png") > system("convert tmp/2dbfu1258134827.ps tmp/2dbfu1258134827.png") > system("convert tmp/387pd1258134827.ps tmp/387pd1258134827.png") > system("convert tmp/4iga41258134827.ps tmp/4iga41258134827.png") > system("convert tmp/5jmn11258134827.ps tmp/5jmn11258134827.png") > system("convert tmp/69p8j1258134827.ps tmp/69p8j1258134827.png") > system("convert tmp/7ib1v1258134827.ps tmp/7ib1v1258134827.png") > > > proc.time() user system elapsed 1.210 0.955 1.488