R version 2.8.1 (2008-12-22) 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(79.8,83.4,113.6,112.9,104,109.9,99,106.3,128.9,111.1,102.9,130,87,87.5,117.6,103.4,110.8,112.6,102.5,112.4,135.6,105.1,127.7,137,91,90.5,122.4,123.3,124.3,120,118.1,119,142.7,123.6,129.6,151.6,110.4,99.2,130.5,136.2,129.7,128,121.6,135.8,143.8,147.5,136.2,156.6,123.3,104.5,139.8,136.5,112.1,118.5,94.4,102.3,111.4,99.2,87.8,115.8) > 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,] 79.8 87.0 91.0 110.4 123.3 NA [2,] 83.4 87.5 90.5 99.2 104.5 NA [3,] 113.6 117.6 122.4 130.5 139.8 NA [4,] 112.9 103.4 123.3 136.2 136.5 NA [5,] 104.0 110.8 124.3 129.7 112.1 NA [6,] 109.9 112.6 120.0 128.0 118.5 NA [7,] 99.0 102.5 118.1 121.6 94.4 NA [8,] 106.3 112.4 119.0 135.8 102.3 NA [9,] 128.9 135.6 142.7 143.8 111.4 NA [10,] 111.1 105.1 123.6 147.5 99.2 NA [11,] 102.9 127.7 129.6 136.2 87.8 NA [12,] 130.0 137.0 151.6 156.6 115.8 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 3.6 0.5 -0.5 -11.2 -18.8 NA [2,] 30.2 30.1 31.9 31.3 35.3 NA [3,] -0.7 -14.2 0.9 5.7 -3.3 NA [4,] -8.9 7.4 1.0 -6.5 -24.4 NA [5,] 5.9 1.8 -4.3 -1.7 6.4 NA [6,] -10.9 -10.1 -1.9 -6.4 -24.1 NA [7,] 7.3 9.9 0.9 14.2 7.9 NA [8,] 22.6 23.2 23.7 8.0 9.1 NA [9,] -17.8 -30.5 -19.1 3.7 -12.2 NA [10,] -8.2 22.6 6.0 -11.3 -11.4 NA [11,] 27.1 9.3 22.0 20.4 28.0 NA [12,] -43.0 -46.0 -41.2 -33.3 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/rcomp/tmp/12x5v1257682643.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/rcomp/tmp/2pbzj1257682643.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/rcomp/tmp/3mzol1257682643.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/rcomp/tmp/4mw831257682643.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,] 79.8 83.4 113.6 103.4 104.0 109.9 94.4 102.3 111.4 99.2 87.8 115.8 [2,] 87.0 87.5 117.6 112.9 110.8 112.6 99.0 106.3 128.9 105.1 102.9 130.0 [3,] 91.0 90.5 122.4 123.3 112.1 118.5 102.5 112.4 135.6 111.1 127.7 137.0 [4,] 110.4 99.2 130.5 136.2 124.3 120.0 118.1 119.0 142.7 123.6 129.6 151.6 [5,] 123.3 104.5 139.8 136.5 129.7 128.0 121.6 135.8 143.8 147.5 136.2 156.6 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 74.46562 82.23281 113.2849 106.8363 102.5609 113.2712 89.00399 103.4262 [2,] 107.53438 98.76719 131.5151 139.7637 121.6391 123.7288 115.99601 121.3738 [,9] [,10] [,11] [,12] [1,] 125.8490 98.02795 108.8338 121.7375 [2,] 145.3510 124.17205 146.5662 152.2625 $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(79.8, 87, 91, 110.4, 123.3, 83.4, 87.5, 90.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/5ndb21257682643.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,] -18.8 30.1 -3.3 -8.9 -4.3 -10.9 7.3 8.0 -19.1 -11.4 20.4 -46.00 [2,] -11.2 30.2 -3.3 -8.9 -1.7 -10.9 7.3 9.1 -19.1 -11.3 20.4 -44.50 [3,] -0.5 31.3 -0.7 -6.5 1.8 -10.1 7.9 22.6 -17.8 -8.2 22.0 -42.10 [4,] 0.5 31.9 0.9 1.0 5.9 -6.4 9.9 23.2 -12.2 6.0 27.1 -37.25 [5,] 3.6 31.9 5.7 7.4 6.4 -1.9 9.9 23.7 -12.2 22.6 28.0 -33.30 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -8.76719 30.09878 -3.667709 -13.4953151 -3.570141 -13.279689 6.062847 [2,] 7.76719 32.50122 2.267709 0.4953151 7.170141 -6.920311 9.737153 [,8] [,9] [,10] [,11] [,12] [1,] 12.63698 -22.67552 -20.424136 17.26580 -47.8275 [2,] 32.56302 -12.92448 4.024136 26.73420 -36.3725 $out [1] 35.3 -14.2 -24.4 -24.1 0.9 14.2 -30.5 3.7 9.3 $group [1] 2 3 4 6 7 7 9 9 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-18.8, -11.2, -0.5, 0.5, 3.60000000000001, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/6gbrk1257682643.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,] 83.40 87.00 118.10 110.40 87.80 NA [2,] 100.95 102.95 118.55 124.80 100.75 NA [3,] 108.10 111.60 122.85 133.15 111.75 NA [4,] 113.25 122.65 126.95 140.00 120.90 NA [5,] 130.00 137.00 129.60 156.60 139.80 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 102.4899 102.6147 119.0187 126.2172 102.5594 NA [2,] 113.7101 120.5853 126.6813 140.0828 120.9406 NA $out [1] 79.8 91.0 90.5 142.7 151.6 99.2 $group [1] 1 3 3 3 3 4 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(83.4, 100.95, 108.1, 113.25, 130, 87, 102.95, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/7nr5e1257682643.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,] 93.02 90.50 93.350 [2,] 111.14 106.80 110.600 [3,] 117.07 115.45 116.275 [4,] 123.62 125.50 124.300 [5,] 138.20 137.00 140.800 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 111.3778 106.9208 110.0263 [2,] 122.7622 123.9792 122.5237 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(93.02, 111.14, 117.07, 123.62, 138.2, 90.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/12x5v1257682643.ps tmp/12x5v1257682643.png") > system("convert tmp/2pbzj1257682643.ps tmp/2pbzj1257682643.png") > system("convert tmp/3mzol1257682643.ps tmp/3mzol1257682643.png") > system("convert tmp/4mw831257682643.ps tmp/4mw831257682643.png") > system("convert tmp/5ndb21257682643.ps tmp/5ndb21257682643.png") > system("convert tmp/6gbrk1257682643.ps tmp/6gbrk1257682643.png") > system("convert tmp/7nr5e1257682643.ps tmp/7nr5e1257682643.png") > > > proc.time() user system elapsed 1.64 1.52 2.79