R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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(12,11,14,12,21,12,22,11,10,13,10,8,15,14,10,14,14,11,10,13,7,14,12,14,11,9,11,15,14,13,9,15,10,11,13,8,20,12,10,10,9,14,8,14,11,13,9,11,15,11,10,14,18,14,11,12,13,9,10,15,20,12,12,14,13,11,17,12,13,14,13,15,13,10,11,19,13,17,13,9,11,10,9,12,12,13,13,12,15,22,13,15,13,15,10,11,16,11,11,10,10,16,12,11,16,19,11,16,15,24,14,15,11,15,12,10,14,13,9,15,15,14,11,8,11,11,8,10,11,13,11,20,10,15,12,14,23,14,16,11,12,10,14,12,12,11,12,13,11,19,12,17,9,12,19,18,15,14,11,9,18,16) > 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] 162 > (np <- floor(n / par1)) [1] 13 > 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] 14 14 14 14 14 14 13 13 13 13 13 13 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 12 15 11 20 15 20 13 12 16 15 15 10 12 [2,] 11 14 9 12 11 12 10 13 11 24 14 15 11 [3,] 14 10 11 10 10 12 11 13 11 14 11 12 12 [4,] 12 14 15 10 14 14 19 12 10 15 8 14 13 [5,] 21 14 14 9 18 13 13 15 10 11 11 23 11 [6,] 12 11 13 14 14 11 17 22 16 15 11 14 19 [7,] 22 10 9 8 11 17 13 13 12 12 8 16 12 [8,] 11 13 15 14 12 12 9 15 11 10 10 11 17 [9,] 10 7 10 11 13 13 11 13 16 14 11 12 9 [10,] 13 14 11 13 9 14 10 15 19 13 13 10 12 [11,] 10 12 13 9 10 13 9 10 11 9 11 14 19 [12,] 8 14 8 11 15 15 12 11 16 15 20 12 18 [,14] [1,] 15 [2,] 14 [3,] 11 [4,] 9 [5,] 18 [6,] 16 [7,] NA [8,] NA [9,] NA [10,] NA [11,] NA [12,] NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] -1 -1 -2 -8 -4 -8 -3 1 -5 9 -1 5 -1 [2,] 3 -4 2 -2 -1 0 1 0 0 -10 -3 -3 1 [3,] -2 4 4 0 4 2 8 -1 -1 1 -3 2 1 [4,] 9 0 -1 -1 4 -1 -6 3 0 -4 3 9 -2 [5,] -9 -3 -1 5 -4 -2 4 7 6 4 0 -9 8 [6,] 10 -1 -4 -6 -3 6 -4 -9 -4 -3 -3 2 -7 [7,] -11 3 6 6 1 -5 -4 2 -1 -2 2 -5 5 [8,] -1 -6 -5 -3 1 1 2 -2 5 4 1 1 -8 [9,] 3 7 1 2 -4 1 -1 2 3 -1 2 -2 3 [10,] -3 -2 2 -4 1 -1 -1 -5 -8 -4 -2 4 7 [11,] -2 2 -5 2 5 2 3 1 5 6 9 -2 -1 [12,] 7 -3 12 4 5 -2 0 5 -1 0 -10 0 -3 [,14] [1,] -1 [2,] -3 [3,] -2 [4,] 9 [5,] -2 [6,] NA [7,] NA [8,] NA [9,] NA [10,] NA [11,] NA [12,] 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/wessaorg/rcomp/tmp/1b9tf1321543063.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/2plzf1321543063.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/39go51321543063.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/43kpa1321543063.ps",horizontal=F,onefile=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,] 10 9 10 8.0 9.0 11 8 9 7 9 9 8 [2,] 12 11 11 10.0 11.0 12 10 11 10 11 10 11 [3,] 15 12 11 13.5 13.5 14 12 12 11 13 11 14 [4,] 15 14 12 14.0 18.0 16 13 14 13 14 13 15 [5,] 16 15 13 19.0 23.0 22 17 17 16 15 14 20 $n [1] 14 14 14 14 14 14 13 13 13 13 13 13 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 13.73318 10.73318 10.57773 11.81091 10.54409 12.31091 10.68536 10.68536 [2,] 16.26682 13.26682 11.42227 15.18909 16.45591 15.68909 13.31464 13.31464 [,9] [,10] [,11] [,12] [1,] 9.685361 11.68536 9.685361 12.24715 [2,] 12.314639 14.31464 12.314639 15.75285 $out [1] 20 20 24 14 14 22 19 19 $group [1] 1 1 2 3 3 7 10 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(10, 12, 15, 15, 16, 9, 11, 12, 14, 15, 10, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5zvcp1321543063.ps",horizontal=F,onefile=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,] -8 -4.0 -3 -6 -9.0 -7 -11 -8 -4 -8 -5 -10 [2,] -4 -3.0 -1 -1 -3.0 -4 -4 -3 -1 -4 -1 -2 [3,] -1 -0.5 1 0 -0.5 -3 1 1 2 -2 2 0 [4,] -1 1.0 4 4 5.0 -1 3 1 3 1 5 5 [5,] 1 3.0 8 9 8.0 2 6 5 7 7 9 12 $n [1] 14 14 14 14 14 13 13 13 13 13 13 13 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -2.2668183 -2.189091 -1.111364 -2.111364 -3.878182 -4.314639 -2.067492 [2,] 0.2668183 1.189091 3.111364 2.111364 2.878182 -1.685361 4.067492 [,8] [,9] [,10] [,11] [,12] [1,] -0.7528526 0.2471474 -4.1910658 -0.6292789 -3.067492 [2,] 2.7528526 3.7528526 0.1910658 4.6292789 3.067492 $out [1] 9 5 -10 10 6 -9 $group [1] 1 1 2 6 6 6 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-8, -4, -1, -1, 1, -4, -3, -0.5, 1, 3, -3, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/641ha1321543063.ps",horizontal=F,onefile=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] [,10] [,11] [,12] [,13] [,14] [1,] 8.0 7.0 8.0 8.0 9.0 11.0 9.0 10 10.0 9.0 8.0 10.0 9.0 9.0 [2,] 10.5 10.5 9.5 9.5 10.5 12.0 10.0 12 11.0 11.5 10.5 11.5 11.5 11.0 [3,] 12.0 13.5 11.0 11.0 12.5 13.0 11.5 13 11.5 14.0 11.0 13.0 12.0 14.5 [4,] 13.5 14.0 13.5 13.5 14.5 14.5 13.0 15 16.0 15.0 13.5 14.5 17.5 16.0 [5,] 14.0 15.0 15.0 14.0 18.0 17.0 17.0 15 19.0 15.0 15.0 16.0 19.0 18.0 $n [1] 12 12 12 12 12 12 12 12 12 12 12 12 12 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 10.63168 11.90363 9.175573 9.175573 10.67557 11.85973 10.13168 11.63168 [2,] 13.36832 15.09637 12.824427 12.824427 14.32443 14.14027 12.86832 14.36832 [,9] [,10] [,11] [,12] [,13] [,14] [1,] 9.219466 12.40363 9.63168 11.63168 9.26336 11.27484 [2,] 13.780534 15.59637 12.36832 14.36832 14.73664 17.72516 $out [1] 21 22 20 20 19 22 24 20 23 $group [1] 1 1 4 6 7 8 10 11 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" NA Warning message: In bxp(list(stats = c(8, 10.5, 12, 13.5, 14, 7, 10.5, 13.5, 14, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7gsue1321543063.ps",horizontal=F,onefile=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,] 11.53846 11.00 11.500 [2,] 11.93956 11.50 11.500 [3,] 12.77747 12.50 12.500 [4,] 13.90934 13.75 13.250 [5,] 14.64286 15.00 14.125 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 11.87904 11.47376 11.70181 [2,] 13.67590 13.52624 13.29819 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(11.5384615384615, 11.9395604395604, 12.7774725274725, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1b9tf1321543063.ps tmp/1b9tf1321543063.png",intern=TRUE)) character(0) > try(system("convert tmp/2plzf1321543063.ps tmp/2plzf1321543063.png",intern=TRUE)) character(0) > try(system("convert tmp/39go51321543063.ps tmp/39go51321543063.png",intern=TRUE)) character(0) > try(system("convert tmp/43kpa1321543063.ps tmp/43kpa1321543063.png",intern=TRUE)) character(0) > try(system("convert tmp/5zvcp1321543063.ps tmp/5zvcp1321543063.png",intern=TRUE)) character(0) > try(system("convert tmp/641ha1321543063.ps tmp/641ha1321543063.png",intern=TRUE)) character(0) > try(system("convert tmp/7gsue1321543063.ps tmp/7gsue1321543063.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.788 0.373 2.184