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(21,19,25,21,23,23,19,18,19,19,22,23,20,14,14,14,15,11,17,16,20,24,23,20,21,19,23,23,23,23,27,26,17,24,26,24,27,27,26,24,23,23,24,17,21,19,22,22,18,16,14,12,14,16,8,3,0,5,1,1,3) > 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,] 21 20 21 27 18 3 [2,] 19 14 19 27 16 NA [3,] 25 14 23 26 14 NA [4,] 21 14 23 24 12 NA [5,] 23 15 23 23 14 NA [6,] 23 11 23 23 16 NA [7,] 19 17 27 24 8 NA [8,] 18 16 26 17 3 NA [9,] 19 20 17 21 0 NA [10,] 19 24 24 19 5 NA [11,] 22 23 26 22 1 NA [12,] 23 20 24 22 1 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -2 -6 -2 0 -2 NA [2,] 6 0 4 -1 -2 NA [3,] -4 0 0 -2 -2 NA [4,] 2 1 0 -1 2 NA [5,] 0 -4 0 0 2 NA [6,] -4 6 4 1 -8 NA [7,] -1 -1 -1 -7 -5 NA [8,] 1 4 -9 4 -3 NA [9,] 0 4 7 -2 5 NA [10,] 3 -1 2 3 -4 NA [11,] 1 -3 -2 0 0 NA [12,] -3 1 3 -4 2 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/16dgq1257586301.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/2o26i1257586301.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/3tc3t1257586301.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/4bac31257586301.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,] 18.0 14 14 12 14 11 8 16 17 19 22 20 [2,] 18.0 16 14 14 15 16 17 16 17 19 22 20 [3,] 20.5 19 23 21 23 23 19 17 19 19 22 22 [4,] 21.0 19 25 23 23 23 24 18 20 24 23 23 [5,] 21.0 19 26 24 23 23 27 18 21 24 23 24 $n [1] 6 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 18.56490 16.88021 15.22743 14.64062 17.34722 18.05382 14.05382 15.58681 [2,] 22.43510 21.11979 30.77257 27.35938 28.65278 27.94618 23.94618 18.41319 [,9] [,10] [,11] [,12] [1,] 16.88021 15.46701 21.29340 19.88021 [2,] 21.11979 22.53299 22.70660 24.11979 $out [1] 27 3 27 26 3 0 5 26 1 1 $group [1] 1 1 2 8 8 9 10 11 11 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(18, 18, 20.5, 21, 21, 14, 16, 19, 19, 19, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/5l9vx1257586301.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,] -2 -2 -4 -1 0 -8 -7 -9 -2 -4 -3 -4 [2,] -2 -1 -2 0 0 -4 -5 -3 0 -1 -2 -3 [3,] -2 0 -2 1 0 1 -1 1 4 2 0 1 [4,] -2 4 0 2 0 4 -1 4 5 3 0 2 [5,] -2 6 0 2 0 6 -1 4 7 3 1 3 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] -2 -3.532987 -3.413195 -0.413195 0 -4.65278 -3.82639 -3.946182 [2,] -2 3.532987 -0.586805 2.413195 0 6.65278 1.82639 5.946182 [,9] [,10] [,11] [,12] [1,] 0.4670126 -0.82639 -1.413195 -2.532987 [2,] 7.5329874 4.82639 1.413195 4.532987 $out [1] -6 0 -4 2 $group [1] 1 1 5 5 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-2, -2, -2, -2, -2, -2, -1, 0, 4, 6, -4, -2, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/600s41257586301.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,] 18 11.0 19 17.0 0 3 [2,] 19 14.0 22 21.5 2 3 [3,] 21 16.5 23 23.0 10 3 [4,] 23 20.0 25 25.0 15 3 [5,] 25 24.0 27 27.0 18 3 $n [1] 12 12 12 12 12 1 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 19.17557 13.76336 21.63168 21.40363 4.070613 3 [2,] 22.82443 19.23664 24.36832 24.59637 15.929387 3 $out [1] 17 $group [1] 3 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(18, 19, 21, 23, 25, 11, 14, 16.5, 20, 24, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/7w47c1257586301.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,] 18.0 17.00 17.0 [2,] 18.1 19.00 18.5 [3,] 18.8 20.75 19.5 [4,] 19.1 22.50 21.0 [5,] 20.4 23.00 22.5 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 18.34389 19.15363 18.35973 [2,] 19.25611 22.34637 20.64027 $out [1] 16.0 15.4 $group [1] 1 1 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(18, 18.1, 18.8, 19.1, 20.4, 17, 19, 20.75, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/16dgq1257586301.ps tmp/16dgq1257586301.png") > system("convert tmp/2o26i1257586301.ps tmp/2o26i1257586301.png") > system("convert tmp/3tc3t1257586301.ps tmp/3tc3t1257586301.png") > system("convert tmp/4bac31257586301.ps tmp/4bac31257586301.png") > system("convert tmp/5l9vx1257586301.ps tmp/5l9vx1257586301.png") > system("convert tmp/600s41257586301.ps tmp/600s41257586301.png") > system("convert tmp/7w47c1257586301.ps tmp/7w47c1257586301.png") > > > proc.time() user system elapsed 1.590 1.450 2.314