R version 2.7.2 (2008-08-25) 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(60.9,61.1,60.2,60.1,59.7,60.5,59.5,59.5,59.7,60.4,60.0,59.0,59.3,59.7,60.4,59.9,60.5,60.4,60.6,60.9,61.0,61.2,61.2,60.3,60.4,61.2,62.1,61.7,61.6,62.1,62.7,62.6,62.0) > 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] 33 > (np <- floor(n / par1)) [1] 2 > 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] 3 3 3 3 3 3 3 3 3 2 2 2 > arr [,1] [,2] [,3] [1,] 60.9 59.3 60.4 [2,] 61.1 59.7 61.2 [3,] 60.2 60.4 62.1 [4,] 60.1 59.9 61.7 [5,] 59.7 60.5 61.6 [6,] 60.5 60.4 62.1 [7,] 59.5 60.6 62.7 [8,] 59.5 60.9 62.6 [9,] 59.7 61.0 62.0 [10,] 60.4 61.2 NA [11,] 60.0 61.2 NA [12,] 59.0 60.3 NA > darr [,1] [,2] [,3] [1,] 0.2 0.4 0.8 [2,] -0.9 0.7 0.9 [3,] -0.1 -0.5 -0.4 [4,] -0.4 0.6 -0.1 [5,] 0.8 -0.1 0.5 [6,] -1.0 0.2 0.6 [7,] 0.0 0.3 -0.1 [8,] 0.2 0.1 -0.6 [9,] 0.7 0.2 NA [10,] -0.4 0.0 NA [11,] -1.0 -0.9 NA [12,] 0.3 0.1 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/freestat/rcomp/tmp/1ncrm1226001336.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/freestat/rcomp/tmp/2tlz81226001336.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/freestat/rcomp/tmp/3lcje1226001336.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/freestat/rcomp/tmp/42mh51226001336.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,] 59.30 59.70 60.20 59.9 59.70 60.40 59.50 59.50 59.70 60.4 60.0 59.00 [2,] 59.85 60.40 60.30 60.0 60.10 60.45 60.05 60.20 60.35 60.4 60.0 59.00 [3,] 60.40 61.10 60.40 60.1 60.50 60.50 60.60 60.90 61.00 60.8 60.6 59.65 [4,] 60.65 61.15 61.25 60.9 61.05 61.30 61.65 61.75 61.50 61.2 61.2 60.30 [5,] 60.90 61.20 62.10 61.7 61.60 62.10 62.70 62.60 62.00 61.2 61.2 60.30 $n [1] 3 3 3 3 3 3 3 3 3 2 2 2 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 59.67023 60.41584 59.5334 59.27901 59.6334 59.72462 59.14046 59.48607 [2,] 61.12977 61.78416 61.2666 60.92099 61.3666 61.27538 62.05954 62.31393 [,9] [,10] [,11] [,12] [1,] 59.95095 59.90622 59.25933 58.1976 [2,] 62.04905 61.69378 61.94067 61.1024 $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(59.3, 59.85, 60.4, 60.65, 60.9, 59.7, 60.4, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/5sfg41226001336.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,] 0.2 -0.9 -0.50 -0.40 -0.10 -1.0 -0.10 -0.60 0.20 -0.4 -1.00 0.1 [2,] 0.3 -0.1 -0.45 -0.25 0.20 -0.4 -0.05 -0.25 0.20 -0.4 -1.00 0.1 [3,] 0.4 0.7 -0.40 -0.10 0.50 0.2 0.00 0.10 0.45 -0.2 -0.95 0.2 [4,] 0.6 0.8 -0.25 0.25 0.65 0.4 0.15 0.15 0.70 0.0 -0.90 0.3 [5,] 0.8 0.9 -0.10 0.60 0.80 0.6 0.30 0.20 0.70 0.0 -0.90 0.3 $n [1] 3 3 3 3 3 3 3 3 2 2 2 2 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.1263360 -0.1209921 -0.5824427 -0.5561067 0.08950396 -0.5297707 [2,] 0.6736640 1.5209921 -0.2175573 0.3561067 0.91049604 0.9297707 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.1824427 -0.2648854 -0.1086144 -0.6468915 -1.0617229 -0.02344574 [2,] 0.1824427 0.4648854 1.0086144 0.2468915 -0.8382771 0.42344574 $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(0.200000000000003, 0.300000000000004, 0.400000000000006, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/6p0fp1226001336.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] [1,] 59.00 59.30 61.2 [2,] 59.60 60.10 61.6 [3,] 60.05 60.45 62.0 [4,] 60.45 60.95 62.1 [5,] 61.10 61.20 62.7 $n [1] 12 12 9 $conf [,1] [,2] [,3] [1,] 59.66231 60.06231 61.73667 [2,] 60.43769 60.83769 62.26333 $out [1] 60.4 $group [1] 3 $names [1] "1" "2" NA Warning message: In bxp(list(stats = c(59, 59.6, 60.05, 60.45, 61.1, 59.3, 60.1, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/73n7v1226001336.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,] 60.20000 60.10 60.2500 [2,] 60.58333 60.40 60.5125 [3,] 60.73333 60.55 60.7750 [4,] 60.91667 60.85 60.8625 [5,] 61.00000 61.10 60.9750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 60.58130 60.34475 60.61536 [2,] 60.88537 60.75525 60.93464 $out [1] 59.65 59.65 59.65 $group [1] 1 2 3 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(60.2, 60.5833333333333, 60.7333333333333, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1ncrm1226001336.ps tmp/1ncrm1226001336.png") > system("convert tmp/2tlz81226001336.ps tmp/2tlz81226001336.png") > system("convert tmp/3lcje1226001336.ps tmp/3lcje1226001336.png") > system("convert tmp/42mh51226001336.ps tmp/42mh51226001336.png") > system("convert tmp/5sfg41226001336.ps tmp/5sfg41226001336.png") > system("convert tmp/6p0fp1226001336.ps tmp/6p0fp1226001336.png") > system("convert tmp/73n7v1226001336.ps tmp/73n7v1226001336.png") > > > proc.time() user system elapsed 2.153 1.473 2.543