R version 2.10.1 (2009-12-14) 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(5.7,5.6,5.8,5.6,5.6,5.6,5.5,5.4,5.4,5.5,5.4,5.4,5.3,5.4,5.2,5.2,5.1,5,5,4.9,5,5,5,4.9,4.7,4.8,4.7,4.7,4.6,4.6,4.7,4.7,4.5,4.4,4.5,4.4,4.6,4.5,4.4,4.5,4.4,4.6,4.7,4.6,4.7,4.7,4.7,5,5,4.8,5.1,4.9,5.4,5.6,5.8,6.1,6.2,6.6,6.8,7.3,7.8,8.2,8.6,8.9,9.4,9.5,9.5,9.7,9.8,10.1,9.9,9.9,9.7,9.7,9.7,9.8,9.6,9.6,9.5,9.6,9.6,9.7,9.8,9.4,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] 85 > (np <- floor(n / par1)) [1] 7 > 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] 8 7 7 7 7 7 7 7 7 7 7 7 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 5.7 5.3 4.7 4.6 5.0 7.8 9.7 9 [2,] 5.6 5.4 4.8 4.5 4.8 8.2 9.7 NA [3,] 5.8 5.2 4.7 4.4 5.1 8.6 9.7 NA [4,] 5.6 5.2 4.7 4.5 4.9 8.9 9.8 NA [5,] 5.6 5.1 4.6 4.4 5.4 9.4 9.6 NA [6,] 5.6 5.0 4.6 4.6 5.6 9.5 9.6 NA [7,] 5.5 5.0 4.7 4.7 5.8 9.5 9.5 NA [8,] 5.4 4.9 4.7 4.6 6.1 9.7 9.6 NA [9,] 5.4 5.0 4.5 4.7 6.2 9.8 9.6 NA [10,] 5.5 5.0 4.4 4.7 6.6 10.1 9.7 NA [11,] 5.4 5.0 4.5 4.7 6.8 9.9 9.8 NA [12,] 5.4 4.9 4.4 5.0 7.3 9.9 9.4 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] -0.1 0.1 0.1 -0.1 -0.2 0.4 0.0 NA [2,] 0.2 -0.2 -0.1 -0.1 0.3 0.4 0.0 NA [3,] -0.2 0.0 0.0 0.1 -0.2 0.3 0.1 NA [4,] 0.0 -0.1 -0.1 -0.1 0.5 0.5 -0.2 NA [5,] 0.0 -0.1 0.0 0.2 0.2 0.1 0.0 NA [6,] -0.1 0.0 0.1 0.1 0.2 0.0 -0.1 NA [7,] -0.1 -0.1 0.0 -0.1 0.3 0.2 0.1 NA [8,] 0.0 0.1 -0.2 0.1 0.1 0.1 0.0 NA [9,] 0.1 0.0 -0.1 0.0 0.4 0.3 0.1 NA [10,] -0.1 0.0 0.1 0.0 0.2 -0.2 0.1 NA [11,] 0.0 -0.1 -0.1 0.3 0.5 0.0 -0.4 NA [12,] -0.1 -0.2 0.2 0.0 0.5 -0.2 -0.4 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/yougetitorg/rcomp/tmp/1fyy31301941297.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/yougetitorg/rcomp/tmp/2h6i71301941297.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/yougetitorg/rcomp/tmp/3royy1301941297.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/yougetitorg/rcomp/tmp/4qoh21301941297.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,] 4.60 4.5 4.4 4.50 4.40 4.60 4.70 4.60 4.50 4.40 4.50 4.40 [2,] 4.85 4.8 4.9 4.80 4.85 4.80 4.85 4.80 4.85 4.85 4.85 4.95 [3,] 5.50 5.4 5.2 5.20 5.40 5.60 5.50 5.40 5.40 5.50 5.40 5.40 [4,] 8.40 6.9 7.2 7.25 7.50 7.55 7.65 7.85 7.90 8.15 8.30 8.35 [5,] 9.70 9.7 9.7 9.80 9.60 9.60 9.50 9.70 9.80 10.10 9.90 9.90 $n [1] 8 7 7 7 7 7 7 7 7 7 7 7 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 3.516919 4.145914 3.826477 3.736900 3.817463 3.957744 3.827885 3.578589 [2,] 7.483081 6.654086 6.573523 6.663100 6.982537 7.242256 7.172115 7.221411 [,9] [,10] [,11] [,12] [1,] 3.578589 3.529293 3.339716 3.369575 [2,] 7.221411 7.470707 7.460284 7.430425 $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(4.6, 4.85, 5.5, 8.4, 9.7, 4.5, 4.8, 5.4, 6.9, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/yougetitorg/rcomp/tmp/5mjjr1301941297.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,] -0.2 -0.20 -0.2 -0.20 -0.10 -0.10 -0.10 0.0 -0.1 -0.20 -0.40 -0.4 [2,] -0.1 -0.10 -0.1 -0.10 0.00 -0.05 -0.10 0.0 0.0 -0.05 -0.10 -0.2 [3,] 0.0 0.00 0.0 -0.10 0.00 0.00 0.00 0.1 0.1 0.00 0.00 -0.1 [4,] 0.1 0.25 0.1 0.25 0.15 0.10 0.15 0.1 0.2 0.10 0.15 0.1 [5,] 0.4 0.40 0.3 0.50 0.20 0.20 0.30 0.1 0.4 0.20 0.50 0.5 $n [1] 7 7 7 7 7 7 7 7 7 7 7 7 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.1194368 -0.2090144 -0.1194368 -0.3090144 -0.08957758 -0.08957758 [2,] 0.1194368 0.2090144 0.1194368 0.1090144 0.08957758 0.08957758 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.1492960 0.04028161 -0.01943677 -0.08957758 -0.1492960 -0.27915516 [2,] 0.1492960 0.15971839 0.21943677 0.08957758 0.1492960 0.07915516 $out [1] -0.2 $group [1] 8 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-0.2, -0.1, 0, 0.1, 0.399999999999999, -0.2, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/yougetitorg/rcomp/tmp/69ap11301941297.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] [1,] 5.40 4.9 4.40 4.4 4.80 7.80 9.50 9 [2,] 5.40 5.0 4.50 4.5 5.05 8.75 9.60 9 [3,] 5.55 5.0 4.65 4.6 5.70 9.50 9.65 9 [4,] 5.60 5.2 4.70 4.7 6.40 9.85 9.70 9 [5,] 5.80 5.4 4.80 5.0 7.30 10.10 9.80 9 $n [1] 12 12 12 12 12 12 12 1 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 5.458779 4.908779 4.558779 4.508779 5.084256 8.998283 9.60439 9 [2,] 5.641221 5.091221 4.741221 4.691221 6.315744 10.001717 9.69561 9 $out [1] 9.4 $group [1] 7 $names [1] "1" "2" "3" "4" "5" "6" "7" NA Warning message: In bxp(list(stats = c(5.4, 5.4, 5.55, 5.6, 5.8, 4.9, 5, 5, 5.2, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/yougetitorg/rcomp/tmp/7wzmf1301941297.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,] 6.142857 5.4 5.85000 [2,] 6.264286 5.4 6.11250 [3,] 6.407143 5.4 6.28750 [4,] 6.523214 5.5 6.50625 [5,] 6.614286 5.6 6.65000 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 6.289044 5.354389 6.107908 [2,] 6.525242 5.445611 6.467092 $out [1] 5.2 5.2 $group [1] 2 2 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(6.14285714285714, 6.26428571428571, 6.40714285714286, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1fyy31301941297.ps tmp/1fyy31301941297.png",intern=TRUE)) character(0) > try(system("convert tmp/2h6i71301941297.ps tmp/2h6i71301941297.png",intern=TRUE)) character(0) > try(system("convert tmp/3royy1301941297.ps tmp/3royy1301941297.png",intern=TRUE)) character(0) > try(system("convert tmp/4qoh21301941297.ps tmp/4qoh21301941297.png",intern=TRUE)) character(0) > try(system("convert tmp/5mjjr1301941297.ps tmp/5mjjr1301941297.png",intern=TRUE)) character(0) > try(system("convert tmp/69ap11301941297.ps tmp/69ap11301941297.png",intern=TRUE)) character(0) > try(system("convert tmp/7wzmf1301941297.ps tmp/7wzmf1301941297.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.450 1.210 2.093