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(66,67,68,70,73,74,75,74,77,79,80,80,81,80,81,82,80,79,80,79,77,76,75,76,77,76,76,75,74,74,74,74,73,73,73,72,72,73,73,73,71,72,73,73,76,76,75,76) > 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,] 66 81 77 72 NA [2,] 67 80 76 73 NA [3,] 68 81 76 73 NA [4,] 70 82 75 73 NA [5,] 73 80 74 71 NA [6,] 74 79 74 72 NA [7,] 75 80 74 73 NA [8,] 74 79 74 73 NA [9,] 77 77 73 76 NA [10,] 79 76 73 76 NA [11,] 80 75 73 75 NA [12,] 80 76 72 76 NA > darr [,1] [,2] [,3] [,4] [,5] [1,] 1 -1 -1 1 NA [2,] 1 1 0 0 NA [3,] 2 1 -1 0 NA [4,] 3 -2 -1 -2 NA [5,] 1 -1 0 1 NA [6,] 1 1 0 1 NA [7,] -1 -1 0 0 NA [8,] 3 -2 -1 3 NA [9,] 2 -1 0 0 NA [10,] 1 -1 0 -1 NA [11,] 0 1 -1 1 NA [12,] 1 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/www/rcomp/tmp/1hbdi1321379130.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/2kqxg1321379130.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/3hynj1321379130.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/471001321379130.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,] 66.0 67.0 68.0 70.0 71.0 72.0 73.0 73.0 73.0 73.0 73.0 72 [2,] 69.0 70.0 70.5 71.5 72.0 73.0 73.5 73.5 74.5 74.5 74.0 74 [3,] 74.5 74.5 74.5 74.0 73.5 74.0 74.5 74.0 76.5 76.0 75.0 76 [4,] 79.0 78.0 78.5 78.5 77.0 76.5 77.5 76.5 77.0 77.5 77.5 78 [5,] 81.0 80.0 81.0 82.0 80.0 79.0 80.0 79.0 77.0 79.0 80.0 80 $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] [,12] [1,] 66.6 68.18 68.18 68.47 69.55 71.235 71.34 71.63 74.525 73.63 72.235 72.84 [2,] 82.4 80.82 80.82 79.53 77.45 76.765 77.66 76.37 78.475 78.37 77.765 79.16 $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(66, 69, 74.5, 79, 81, 67, 70, 74.5, 78, 80, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/5dipn1321379130.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 -2.0 -1.0 0.0 -1.0 -2.0 -1.0 -1.0 -1.0 0.0 [2,] -1 0.0 -0.5 -2.0 -0.5 0.5 -1.0 -1.5 -0.5 -1.0 -0.5 0.5 [3,] 0 0.5 0.5 -1.5 0.5 1.0 -0.5 1.0 0.0 -0.5 0.5 1.0 [4,] 1 1.0 1.5 1.0 1.0 1.0 0.0 3.0 1.0 0.5 1.0 1.0 [5,] 1 1.0 2.0 3.0 1.0 1.0 0.0 3.0 2.0 1.0 1.0 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.58 -0.29 -1.08 -3.87 -0.685 0.605 -1.29 -2.555 -1.185 -1.685 -0.685 [2,] 1.58 1.29 2.08 0.87 1.685 1.395 0.29 4.555 1.185 0.685 1.685 [,12] [1,] 0.5438933 [2,] 1.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, -1, 0, 1, 1, 0, 0, 0.5, 1, 1, -1, -0.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/6sr4k1321379130.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,] 66 75.0 72.0 71.0 NA [2,] 69 76.5 73.0 72.5 NA [3,] 74 79.5 74.0 73.0 NA [4,] 78 80.5 75.5 75.5 NA [5,] 80 82.0 77.0 76.0 NA $n [1] 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [1,] 69.89504 77.67557 72.85973 71.63168 NA [2,] 78.10496 81.32443 75.14027 74.36832 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" NA Warning message: In bxp(list(stats = c(66, 69, 74, 78, 80, 75, 76.5, 79.5, 80.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/70bnk1321379130.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,] 74.00 73.5 74.0000 [2,] 74.50 74.0 74.3125 [3,] 75.00 74.5 74.5000 [4,] 75.75 75.5 75.6875 [5,] 76.00 76.5 76.1250 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 74.42987 73.81584 73.87285 [2,] 75.57013 75.18416 75.12715 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(74, 74.5, 75, 75.75, 76, 73.5, 74, 74.5, 75.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1hbdi1321379130.ps tmp/1hbdi1321379130.png",intern=TRUE)) character(0) > try(system("convert tmp/2kqxg1321379130.ps tmp/2kqxg1321379130.png",intern=TRUE)) character(0) > try(system("convert tmp/3hynj1321379130.ps tmp/3hynj1321379130.png",intern=TRUE)) character(0) > try(system("convert tmp/471001321379130.ps tmp/471001321379130.png",intern=TRUE)) character(0) > try(system("convert tmp/5dipn1321379130.ps tmp/5dipn1321379130.png",intern=TRUE)) character(0) > try(system("convert tmp/6sr4k1321379130.ps tmp/6sr4k1321379130.png",intern=TRUE)) character(0) > try(system("convert tmp/70bnk1321379130.ps tmp/70bnk1321379130.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.660 0.280 2.913