R version 2.7.2 (2008-08-25) 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(14,18,18,12,16,12,19,13,12,13,11,10,16,12,6,8,6,8,8,9,13,8,11,8,10,15,12,13,12,15,13,13,16,14,12,15,14,19,16,16,11,13,12,11,6,9,6,15,17,13,12,13,10,14,13,10,11,12,7,11,9) > 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,] 14 16 10 14 17 9 [2,] 18 12 15 19 13 NA [3,] 18 6 12 16 12 NA [4,] 12 8 13 16 13 NA [5,] 16 6 12 11 10 NA [6,] 12 8 15 13 14 NA [7,] 19 8 13 12 13 NA [8,] 13 9 13 11 10 NA [9,] 12 13 16 6 11 NA [10,] 13 8 14 9 12 NA [11,] 11 11 12 6 7 NA [12,] 10 8 15 15 11 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 4 -4 5 5 -4 NA [2,] 0 -6 -3 -3 -1 NA [3,] -6 2 1 0 1 NA [4,] 4 -2 -1 -5 -3 NA [5,] -4 2 3 2 4 NA [6,] 7 0 -2 -1 -1 NA [7,] -6 1 0 -1 -3 NA [8,] -1 4 3 -5 1 NA [9,] 1 -5 -2 3 1 NA [10,] -2 3 -2 -3 -5 NA [11,] -1 -3 3 9 4 NA [12,] 6 2 -1 2 -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/html/freestat/rcomp/tmp/1a0rb1225702996.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/freestat/rcomp/tmp/2rd7p1225702996.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/freestat/rcomp/tmp/3hy8c1225702996.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/freestat/rcomp/tmp/4q1zw1225702996.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,] 9 12 6 12 10 12 12 9 11 8 6 8 [2,] 10 13 12 12 10 12 12 10 11 9 7 10 [3,] 14 15 12 13 11 13 13 11 12 12 11 11 [4,] 16 18 16 13 12 14 13 13 13 13 11 15 [5,] 17 19 18 13 12 15 13 13 16 14 12 15 $n [1] 6 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 10.12981 11.46701 9.17361 12.29340 9.586805 11.58681 12.29340 8.880208 [2,] 17.87019 18.53299 14.82639 13.70660 12.413195 14.41319 13.70660 13.119792 [,9] [,10] [,11] [,12] [1,] 10.58681 9.17361 8.17361 7.467013 [2,] 13.41319 14.82639 13.82639 14.532987 $out [1] 8 16 16 6 8 19 8 6 $group [1] 4 4 5 5 6 7 7 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(9, 10, 14, 16, 17, 12, 13, 15, 18, 19, 6, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/5t1gz1225702996.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,] -4 -6 0 -5 2 -2 -6 -5 -5 -3 -3 -2 [2,] -4 -3 0 -3 2 -1 -3 -1 -2 -3 -1 -1 [3,] 4 -3 1 -2 2 -1 -1 1 1 -2 3 2 [4,] 5 -1 1 -1 3 0 0 3 1 -2 4 2 [5,] 5 0 2 -1 4 0 1 4 3 -2 9 6 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -2.359377 -4.413195 0.2934025 -3.413195 1.293403 -1.7065975 -3.119792 [2,] 10.359377 -1.586805 1.7065975 -0.586805 2.706597 -0.2934025 1.119792 [,8] [,9] [,10] [,11] [,12] [1,] -1.82639 -1.119792 -2.706597 -0.5329874 -0.1197924 [2,] 3.82639 3.119792 -1.293403 6.5329874 4.1197924 $out [1] -6 4 -4 7 3 -5 $group [1] 3 4 5 6 10 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-4, -4, 4, 5, 5, -6, -3, -3, -1, 0, 0, 0, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/6sir41225702996.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,] 10 6.0 10 6.0 7.0 9 [2,] 12 8.0 12 10.0 10.5 9 [3,] 13 8.0 13 12.5 12.0 9 [4,] 17 11.5 15 15.5 13.0 9 [5,] 19 16.0 16 19.0 14.0 9 $n [1] 12 12 12 12 12 1 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 10.71947 6.403627 11.63168 9.991413 10.85973 9 [2,] 15.28053 9.596373 14.36832 15.008587 13.14027 9 $out [1] 17 $group [1] 5 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(10, 12, 13, 17, 19, 6, 8, 8, 11.5, 16, 10, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/7olcl1225702996.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,] 9.4 11 9.000 [2,] 11.2 11 11.250 [3,] 12.1 12 12.500 [4,] 12.9 13 13.125 [5,] 15.4 15 15.500 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 11.32462 11.08779 11.6448 [2,] 12.87538 12.91221 13.3552 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(9.4, 11.2, 12.1, 12.9, 15.4, 11, 11, 12, 13, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1a0rb1225702996.ps tmp/1a0rb1225702996.png") > system("convert tmp/2rd7p1225702996.ps tmp/2rd7p1225702996.png") > system("convert tmp/3hy8c1225702996.ps tmp/3hy8c1225702996.png") > system("convert tmp/4q1zw1225702996.ps tmp/4q1zw1225702996.png") > system("convert tmp/5t1gz1225702996.ps tmp/5t1gz1225702996.png") > system("convert tmp/6sir41225702996.ps tmp/6sir41225702996.png") > system("convert tmp/7olcl1225702996.ps tmp/7olcl1225702996.png") > > > proc.time() user system elapsed 2.150 1.467 2.390