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(145,151,155,162,169,171,173,174,179,185,187,189,191,189,190,192,189,188,189,189,187,182,179,180,179,179,179,177,178,182,182,183,182,182,181,180,180,185,187,189,185,186,190,190,197,201,202,209) > 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] 48 > (np <- floor(n / par1)) [1] 4 > 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] 4 4 4 4 4 4 4 4 4 4 4 4 > arr [,1] [,2] [,3] [,4] [,5] [1,] 145 191 179 180 NA [2,] 151 189 179 185 NA [3,] 155 190 179 187 NA [4,] 162 192 177 189 NA [5,] 169 189 178 185 NA [6,] 171 188 182 186 NA [7,] 173 189 182 190 NA [8,] 174 189 183 190 NA [9,] 179 187 182 197 NA [10,] 185 182 182 201 NA [11,] 187 179 181 202 NA [12,] 189 180 180 209 NA > darr [,1] [,2] [,3] [,4] [,5] [1,] 6 -2 0 5 NA [2,] 4 1 0 2 NA [3,] 7 2 -2 2 NA [4,] 7 -3 1 -4 NA [5,] 2 -1 4 1 NA [6,] 2 1 0 4 NA [7,] 1 0 1 0 NA [8,] 5 -2 -1 7 NA [9,] 6 -5 0 4 NA [10,] 2 -3 -1 1 NA [11,] 2 1 -1 7 NA [12,] 2 -1 0 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/wessaorg/rcomp/tmp/11qav1321378993.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/2ptrx1321378993.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/3djqt1321378993.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/4dkw31321378993.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,] 145.0 151 155.0 162.0 169.0 171.0 173.0 174.0 179.0 182.0 179.0 180.0 [2,] 162.0 165 167.0 169.5 173.5 176.5 177.5 178.5 180.5 182.0 180.0 180.0 [3,] 179.5 182 183.0 183.0 181.5 184.0 185.5 186.0 184.5 183.5 184.0 184.5 [4,] 185.5 187 188.5 190.5 187.0 187.0 189.5 189.5 192.0 193.0 194.5 199.0 [5,] 191.0 189 190.0 192.0 189.0 188.0 190.0 190.0 197.0 201.0 202.0 209.0 $n [1] 4 4 4 4 4 4 4 4 4 4 4 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 160.935 164.62 166.015 166.41 170.835 175.705 176.02 177.31 175.415 174.81 [2,] 198.065 199.38 199.985 199.59 192.165 192.295 194.98 194.69 193.585 192.19 [,11] [,12] [1,] 172.545 169.49 [2,] 195.455 199.51 $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(145, 162, 179.5, 185.5, 191, 151, 165, 182, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/52b801321378993.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,] -2.0 0.0 -2.0 -4.0 -1.0 0.0 0.0 -2.0 -5.0 -3.0 -1.0 -1.0 [2,] -1.0 0.5 0.0 -3.5 0.0 0.5 0.0 -1.5 -2.5 -2.0 0.0 -0.5 [3,] 2.5 1.5 2.0 -1.0 1.5 1.5 0.5 2.0 2.0 0.0 1.5 0.0 [4,] 5.5 3.0 4.5 4.0 3.0 3.0 1.0 6.0 5.0 1.5 4.5 1.0 [5,] 6.0 4.0 7.0 7.0 4.0 4.0 1.0 7.0 6.0 2.0 7.0 2.0 $n [1] 4 4 4 4 4 4 4 4 4 4 4 3 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] -2.635 -0.475 -1.555 -6.925 -0.87 -0.475 -0.29 -3.925 -3.925 -2.765 -2.055 [2,] 7.635 3.475 5.555 4.925 3.87 3.475 1.29 7.925 7.925 2.765 5.055 [,12] [1,] -1.36832 [2,] 1.36832 $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(-2, -1, 2.5, 5.5, 6, 0, 0.5, 1.5, 3, 4, -2, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6wrsg1321378993.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] [1,] 145.0 179.0 177.0 180.0 NA [2,] 158.5 184.5 179.0 185.5 NA [3,] 172.0 189.0 180.5 189.5 NA [4,] 182.0 189.5 182.0 199.0 NA [5,] 189.0 192.0 183.0 209.0 NA $n [1] 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [1,] 161.2815 186.7195 179.1317 183.3426 NA [2,] 182.7185 191.2805 181.8683 195.6574 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" NA Warning message: In bxp(list(stats = c(145, 158.5, 172, 182, 189, 179, 184.5, 189, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/768o51321378993.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,] 173.750 179.50 176.6250 [2,] 178.875 182.50 180.6250 [3,] 182.625 183.75 183.6875 [4,] 186.750 184.50 185.4375 [5,] 189.500 186.00 187.0000 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 179.0332 182.8378 181.4925 [2,] 186.2168 184.6622 185.8825 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(173.75, 178.875, 182.625, 186.75, 189.5, 179.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/11qav1321378993.ps tmp/11qav1321378993.png",intern=TRUE)) character(0) > try(system("convert tmp/2ptrx1321378993.ps tmp/2ptrx1321378993.png",intern=TRUE)) character(0) > try(system("convert tmp/3djqt1321378993.ps tmp/3djqt1321378993.png",intern=TRUE)) character(0) > try(system("convert tmp/4dkw31321378993.ps tmp/4dkw31321378993.png",intern=TRUE)) character(0) > try(system("convert tmp/52b801321378993.ps tmp/52b801321378993.png",intern=TRUE)) character(0) > try(system("convert tmp/6wrsg1321378993.ps tmp/6wrsg1321378993.png",intern=TRUE)) character(0) > try(system("convert tmp/768o51321378993.ps tmp/768o51321378993.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.650 0.350 2.006