R version 2.8.0 (2008-10-20) Copyright (C) 2008 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(25,23.6,22.3,21.8,20.8,19.7,18.3,17.4,17,18.1,23.9,25.6,25.3,23.6,21.9,21.4,20.6,20.5,20.2,20.6,19.7,19.3,22.8,23.5,23.8,22.6,22,21.7,20.7,20.2,19.1,19.5,18.7,18.6,22.2,23.2,23.5,21.3,20,18.7,18.9,18.3,18.4,19.9,19.2,18.5,20.9,20.5,19.4,18.1,17,17,17.3,16.7,15.5,15.3,13.7,14.1,17.3,18.1,18.1) > 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] 61 > (np <- floor(n / par1)) [1] 5 > 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] 6 5 5 5 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 25.0 25.3 23.8 23.5 19.4 18.1 [2,] 23.6 23.6 22.6 21.3 18.1 NA [3,] 22.3 21.9 22.0 20.0 17.0 NA [4,] 21.8 21.4 21.7 18.7 17.0 NA [5,] 20.8 20.6 20.7 18.9 17.3 NA [6,] 19.7 20.5 20.2 18.3 16.7 NA [7,] 18.3 20.2 19.1 18.4 15.5 NA [8,] 17.4 20.6 19.5 19.9 15.3 NA [9,] 17.0 19.7 18.7 19.2 13.7 NA [10,] 18.1 19.3 18.6 18.5 14.1 NA [11,] 23.9 22.8 22.2 20.9 17.3 NA [12,] 25.6 23.5 23.2 20.5 18.1 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -1.4 -1.7 -1.2 -2.2 -1.3 NA [2,] -1.3 -1.7 -0.6 -1.3 -1.1 NA [3,] -0.5 -0.5 -0.3 -1.3 0.0 NA [4,] -1.0 -0.8 -1.0 0.2 0.3 NA [5,] -1.1 -0.1 -0.5 -0.6 -0.6 NA [6,] -1.4 -0.3 -1.1 0.1 -1.2 NA [7,] -0.9 0.4 0.4 1.5 -0.2 NA [8,] -0.4 -0.9 -0.8 -0.7 -1.6 NA [9,] 1.1 -0.4 -0.1 -0.7 0.4 NA [10,] 5.8 3.5 3.6 2.4 3.2 NA [11,] 1.7 0.7 1.0 -0.4 0.8 NA [12,] -0.3 0.3 0.3 -1.1 0.0 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/html/rcomp/tmp/1g5x41229440636.ps",horizontal=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/html/rcomp/tmp/2tm731229440636.ps",horizontal=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/html/rcomp/tmp/3rlpr1229440636.ps",horizontal=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/html/rcomp/tmp/4hnm31229440636.ps",horizontal=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,] 18.10 18.1 17.0 17.0 17.3 16.7 18.3 15.3 17.0 18.1 20.9 18.1 [2,] 19.40 21.3 20.0 18.7 18.9 18.3 18.3 17.4 17.0 18.1 20.9 20.5 [3,] 23.65 22.6 21.9 21.4 20.6 19.7 18.4 19.5 18.7 18.5 22.2 23.2 [4,] 25.00 23.6 22.0 21.7 20.7 20.2 19.1 19.9 19.2 18.6 22.8 23.5 [5,] 25.30 23.6 22.3 21.8 20.8 20.5 20.2 20.6 19.7 19.3 23.9 25.6 $n [1] 6 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 20.03782 20.97483 20.48681 19.28021 19.32812 18.35746 17.83472 17.73351 [2,] 27.26218 24.22517 23.31319 23.51979 21.87188 21.04254 18.96528 21.26649 [,9] [,10] [,11] [,12] [1,] 17.14549 18.1467 20.85746 21.08021 [2,] 20.25451 18.8533 23.54254 25.31979 $out [1] 15.5 13.7 14.1 17.3 $group [1] 7 9 10 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(18.1, 19.4, 23.65, 25, 25.3, 18.1, 21.3, 22.6, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5h6ay1229440637.ps",horizontal=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.2 -1.3 -0.5 -1.0 -0.6 -1.4 -0.9 -0.9 -0.7 3.2 0.7 -1.1 [2,] -1.7 -1.3 -0.5 -1.0 -0.6 -1.2 -0.2 -0.9 -0.4 3.2 0.7 -0.3 [3,] -1.4 -1.3 -0.5 -0.8 -0.6 -1.1 0.4 -0.8 -0.1 3.5 0.8 0.0 [4,] -1.3 -1.1 -0.3 0.2 -0.5 -0.3 0.4 -0.7 0.4 3.6 1.0 0.3 [5,] -1.2 -1.1 -0.3 0.3 -0.5 0.1 0.4 -0.4 1.1 3.6 1.0 0.3 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] -1.682639 -1.441319 -0.6413195 -1.64791698 -0.6706597 -1.7359377 [2,] -1.117361 -1.158681 -0.3586805 0.04791698 -0.5293403 -0.4640623 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.02395849 -0.9413195 -0.665278 3.217361 0.5880208 -0.4239585 [2,] 0.82395849 -0.6586805 0.465278 3.782639 1.0119792 0.4239585 $out [1] -1.7 -0.6 -1.3 0.0 -1.1 -0.1 1.5 -1.6 5.8 2.4 1.7 -0.4 $group [1] 2 2 3 3 5 5 7 8 10 10 11 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-2.2, -1.7, -1.400, -1.30000000000000, -1.2, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6qbbg1229440637.ps",horizontal=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] [1,] 17.00 19.30 18.6 18.30 13.7 18.1 [2,] 18.20 20.35 19.3 18.60 15.4 18.1 [3,] 21.30 21.00 21.2 19.55 17.0 18.1 [4,] 23.75 23.15 22.4 20.70 17.7 18.1 [5,] 25.60 25.30 23.8 23.50 19.4 18.1 $n [1] 12 12 12 12 12 1 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 18.76861 19.7229 19.78607 18.59218 15.95095 18.1 [2,] 23.83139 22.2771 22.61393 20.50782 18.04905 18.1 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(17, 18.2, 21.3, 23.75, 25.6, 19.3, 20.35, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/701og1229440637.ps",horizontal=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,] 17.66000 18.40 18.1000 [2,] 18.42000 19.10 18.6750 [3,] 19.89000 21.00 20.0000 [4,] 21.63000 22.40 21.9250 [5,] 22.51667 23.65 22.5625 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 18.42590 19.49485 18.51765 [2,] 21.35410 22.50515 21.48235 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(17.66, 18.42, 19.89, 21.63, 22.5166666666667, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1g5x41229440636.ps tmp/1g5x41229440636.png") > system("convert tmp/2tm731229440636.ps tmp/2tm731229440636.png") > system("convert tmp/3rlpr1229440636.ps tmp/3rlpr1229440636.png") > system("convert tmp/4hnm31229440636.ps tmp/4hnm31229440636.png") > system("convert tmp/5h6ay1229440637.ps tmp/5h6ay1229440637.png") > system("convert tmp/6qbbg1229440637.ps tmp/6qbbg1229440637.png") > system("convert tmp/701og1229440637.ps tmp/701og1229440637.png") > > > proc.time() user system elapsed 1.209 0.941 1.440