R version 2.8.1 (2008-12-22) 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(13.9,15.9,18.2,19.7,20.1,19.9,20,22.6,20.6,20.1,20.2,21.8,22,19.5,17.5,18.2,18.8,19.7,18.8,18.5,18.7,18.5,19.3,18.9,21.4,22.5,25,22.9,22.9,21.3,22.3,20.9,19.9,20.2,19.8,17.7,18.1,17.6,18.2,16,16.3,17.3,19,18.6,18,17.9,17.8,18.5,17.4,19,17.4,20.6,18.5,20,18.8,18.8,19.7,15.3,10.6,6.1,0.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] 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,] 13.9 22.0 21.4 18.1 17.4 0.9 [2,] 15.9 19.5 22.5 17.6 19.0 NA [3,] 18.2 17.5 25.0 18.2 17.4 NA [4,] 19.7 18.2 22.9 16.0 20.6 NA [5,] 20.1 18.8 22.9 16.3 18.5 NA [6,] 19.9 19.7 21.3 17.3 20.0 NA [7,] 20.0 18.8 22.3 19.0 18.8 NA [8,] 22.6 18.5 20.9 18.6 18.8 NA [9,] 20.6 18.7 19.9 18.0 19.7 NA [10,] 20.1 18.5 20.2 17.9 15.3 NA [11,] 20.2 19.3 19.8 17.8 10.6 NA [12,] 21.8 18.9 17.7 18.5 6.1 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 2.0 -2.5 1.1 -0.5 1.6 NA [2,] 2.3 -2.0 2.5 0.6 -1.6 NA [3,] 1.5 0.7 -2.1 -2.2 3.2 NA [4,] 0.4 0.6 0.0 0.3 -2.1 NA [5,] -0.2 0.9 -1.6 1.0 1.5 NA [6,] 0.1 -0.9 1.0 1.7 -1.2 NA [7,] 2.6 -0.3 -1.4 -0.4 0.0 NA [8,] -2.0 0.2 -1.0 -0.6 0.9 NA [9,] -0.5 -0.2 0.3 -0.1 -4.4 NA [10,] 0.1 0.8 -0.4 -0.1 -4.7 NA [11,] 1.6 -0.4 -2.1 0.7 -4.5 NA [12,] 0.2 2.5 0.4 -1.1 -5.2 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/14bmu1257957367.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/rcomp/tmp/2q01x1257957367.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/rcomp/tmp/35opz1257957367.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/rcomp/tmp/4rfup1257957367.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,] 13.90 15.9 17.4 16.0 16.3 19.7 18.8 18.5 18.0 15.3 17.8 17.7 [2,] 13.90 17.6 17.5 18.2 18.5 19.7 18.8 18.6 18.7 17.9 17.8 17.7 [3,] 17.75 19.0 18.2 19.7 18.8 19.9 19.0 18.8 19.7 18.5 19.3 18.5 [4,] 21.40 19.5 18.2 20.6 20.1 20.0 20.0 20.9 19.9 20.1 19.8 18.9 [5,] 22.00 19.5 18.2 22.9 20.1 20.0 20.0 22.6 20.6 20.2 20.2 18.9 $n [1] 6 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 12.91226 17.65746 17.70538 18.00417 17.66944 19.68802 18.15208 17.17483 [2,] 22.58774 20.34254 18.69462 21.39583 19.93056 20.11198 19.84792 20.42517 [,9] [,10] [,11] [,12] [1,] 18.85208 16.94549 17.88681 17.65208 [2,] 20.54792 20.05451 20.71319 19.34792 $out [1] 0.9 22.5 25.0 22.9 21.3 17.3 22.3 10.6 21.8 6.1 $group [1] 1 2 3 5 6 6 7 11 12 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(13.9, 13.9, 17.75, 21.4, 22, 15.9, 17.6, 19, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/51kkp1257957367.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.5 -2.0 -2.2 0.0 -1.6 -1.2 -0.4 -2.0 -0.5 -0.4 -4.5 -1.1 [2,] -0.5 -1.6 -2.1 0.0 -0.2 -0.9 -0.4 -1.0 -0.5 -0.4 -2.1 -1.1 [3,] 1.1 0.6 0.7 0.3 0.9 0.1 -0.3 -0.6 -0.2 -0.1 -0.4 0.2 [4,] 1.6 2.3 1.5 0.4 1.0 1.0 0.0 0.2 -0.1 0.1 0.7 0.4 [5,] 2.0 2.5 3.2 0.6 1.5 1.7 0.0 0.9 0.3 0.8 1.6 2.5 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.3838547 -2.15573 -1.843751 0.01736101 0.05208302 -1.242535 -0.58263899 [2,] 2.5838547 3.35573 3.243751 0.58263899 1.74791698 1.442535 -0.01736101 [,8] [,9] [,10] [,11] [,12] [1,] -1.447917 -0.482639 -0.4532987 -2.378473 -0.8598962 [2,] 0.247917 0.082639 0.2532987 1.578473 1.2598962 $out [1] -2.1 2.6 -1.4 -4.4 -4.7 -5.2 $group [1] 4 7 7 9 10 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-2.5, -0.5, 1.10000000000000, 1.6, 2, -2, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/6c8ga1257957367.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,] 18.20 17.5 17.70 16.30 15.30 0.9 [2,] 18.95 18.5 20.05 17.45 16.35 0.9 [3,] 20.05 18.8 21.35 17.95 18.65 0.9 [4,] 20.40 19.4 22.70 18.35 19.35 0.9 [5,] 21.80 19.7 25.00 19.00 20.60 0.9 $n [1] 12 12 12 12 12 1 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 19.38865 18.38950 20.14132 17.53950 17.28168 0.9 [2,] 20.71135 19.21050 22.55868 18.36050 20.01832 0.9 $out [1] 13.9 15.9 22.6 22.0 16.0 10.6 6.1 $group [1] 1 1 1 2 4 5 5 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(18.2, 18.95, 20.05, 20.4, 21.8, 17.5, 18.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/73x841257957367.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,] 15.61667 17.75 17.675 [2,] 17.97000 18.50 18.425 [3,] 19.29000 18.90 19.150 [4,] 19.56000 19.50 19.400 [5,] 19.88000 19.90 19.850 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 18.56479 18.44389 18.70530 [2,] 20.01521 19.35611 19.59470 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(15.6166666666667, 17.97, 19.29, 19.56, 19.88, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/14bmu1257957367.ps tmp/14bmu1257957367.png") > system("convert tmp/2q01x1257957367.ps tmp/2q01x1257957367.png") > system("convert tmp/35opz1257957367.ps tmp/35opz1257957367.png") > system("convert tmp/4rfup1257957367.ps tmp/4rfup1257957367.png") > system("convert tmp/51kkp1257957367.ps tmp/51kkp1257957367.png") > system("convert tmp/6c8ga1257957367.ps tmp/6c8ga1257957367.png") > system("convert tmp/73x841257957367.ps tmp/73x841257957367.png") > > > proc.time() user system elapsed 1.480 1.350 2.834