R version 2.12.0 (2010-10-15) Copyright (C) 2010 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(50,53,55,57,60,59,60,60,62,64,65,66,67,66,66,67,67,68,69,71,70,68,67,66,66,66,66,67,67,68,68,68,67,68,67,68,68,71,73,75,75,76,77,77,81,85,86,89) > 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,] 50 67 66 68 NA [2,] 53 66 66 71 NA [3,] 55 66 66 73 NA [4,] 57 67 67 75 NA [5,] 60 67 67 75 NA [6,] 59 68 68 76 NA [7,] 60 69 68 77 NA [8,] 60 71 68 77 NA [9,] 62 70 67 81 NA [10,] 64 68 68 85 NA [11,] 65 67 67 86 NA [12,] 66 66 68 89 NA > darr [,1] [,2] [,3] [,4] [,5] [1,] 3 -1 0 3 NA [2,] 2 0 0 2 NA [3,] 2 1 1 2 NA [4,] 3 0 0 0 NA [5,] -1 1 1 1 NA [6,] 1 1 0 1 NA [7,] 0 2 0 0 NA [8,] 2 -1 -1 4 NA [9,] 2 -2 1 4 NA [10,] 1 -1 -1 1 NA [11,] 1 -1 1 3 NA [12,] 1 0 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/www/rcomp/tmp/1xode1321379071.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/www/rcomp/tmp/2bvge1321379071.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/www/rcomp/tmp/3yl2j1321379071.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/www/rcomp/tmp/4fz0t1321379071.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,] 50.0 53.0 55.0 57 60.0 59.0 60.0 60.0 62.0 64.0 65.0 66.0 [2,] 58.0 59.5 60.5 62 63.5 63.5 64.0 64.0 64.5 66.0 66.0 66.0 [3,] 66.5 66.0 66.0 67 67.0 68.0 68.5 69.5 68.5 68.0 67.0 67.0 [4,] 67.5 68.5 69.5 71 71.0 72.0 73.0 74.0 75.5 76.5 76.5 78.5 [5,] 68.0 71.0 73.0 75 75.0 76.0 77.0 77.0 81.0 85.0 86.0 89.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] [,11] [1,] 58.995 58.89 58.89 59.89 61.075 61.285 61.39 61.6 59.81 59.705 58.705 [2,] 74.005 73.11 73.11 74.11 72.925 74.715 75.61 77.4 77.19 76.295 75.295 [,12] [1,] 57.125 [2,] 76.875 $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(50, 58, 66.5, 67.5, 68, 53, 59.5, 66, 68.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/5p1xc1321379071.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,] -1.0 0 1.0 0.0 -1 0.0 0 -1.0 -2.0 -1 -1 0.0 [2,] -0.5 0 1.0 0.0 0 0.5 0 -1.0 -0.5 -1 0 0.0 [3,] 1.5 1 1.5 0.0 1 1.0 0 0.5 1.5 0 1 0.0 [4,] 3.0 2 2.0 1.5 1 1.0 1 3.0 3.0 1 2 0.5 [5,] 3.0 2 2.0 3.0 1 1.0 2 4.0 4.0 1 3 1.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,] -1.265 -0.58 0.71 -1.185 0.21 0.605 -0.79 -2.66 -1.265 -1.58 -0.58 [2,] 4.265 2.58 2.29 1.185 1.79 1.395 0.79 3.66 4.265 1.58 2.58 [,12] [1,] -0.4561067 [2,] 0.4561067 $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(-1, -0.5, 1.5, 3, 3, 0, 0, 1, 2, 2, 1, 1, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/6z0c61321379071.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,] 50 66.0 66.0 68.0 NA [2,] 56 66.5 66.5 74.0 NA [3,] 60 67.0 67.0 76.5 NA [4,] 63 68.5 68.0 83.0 NA [5,] 66 71.0 68.0 89.0 NA $n [1] 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [1,] 56.80725 66.08779 66.31584 72.39504 NA [2,] 63.19275 67.91221 67.68416 80.60496 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" NA Warning message: In bxp(list(stats = c(50, 56, 60, 63, 66, 66, 66.5, 67, 68.5, 71, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/7omwp1321379071.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,] 62.750 66.00 64.6250 [2,] 65.750 66.75 66.1250 [3,] 68.125 67.00 68.1875 [4,] 70.625 68.25 69.2500 [5,] 72.250 69.50 69.6250 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 65.90148 66.31584 66.76217 [2,] 70.34852 67.68416 69.61283 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(62.75, 65.75, 68.125, 70.625, 72.25, 66, 66.75, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1xode1321379071.ps tmp/1xode1321379071.png",intern=TRUE)) character(0) > try(system("convert tmp/2bvge1321379071.ps tmp/2bvge1321379071.png",intern=TRUE)) character(0) > try(system("convert tmp/3yl2j1321379071.ps tmp/3yl2j1321379071.png",intern=TRUE)) character(0) > try(system("convert tmp/4fz0t1321379071.ps tmp/4fz0t1321379071.png",intern=TRUE)) character(0) > try(system("convert tmp/5p1xc1321379071.ps tmp/5p1xc1321379071.png",intern=TRUE)) character(0) > try(system("convert tmp/6z0c61321379071.ps tmp/6z0c61321379071.png",intern=TRUE)) character(0) > try(system("convert tmp/7omwp1321379071.ps tmp/7omwp1321379071.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.510 0.280 2.757