R version 2.9.0 (2009-04-17) Copyright (C) 2009 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.7,24.7,24.2,23.6,24.4,22.5,19.4,18.1,18.1,20.7,19.1,18.3,16.9,17.9,20.2,21.2,23.8,24,26.6,25.3,27.6,24.7,26.6,24.4,24.6,26,24.8,24,22.7,23,24.1,24,22.7,22.6,23.1,24.4,23,22,21.3,21.5,21.3,23.2,21.8,23.3,21,22.4,20.4,19.9,21.3,18.9,15.6,12.5,7.8,5.5,4,3.3,3.7,3.1,5,6.3) > 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] 60 > (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] 5 5 5 5 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 25.7 16.9 24.6 23.0 21.3 NA [2,] 24.7 17.9 26.0 22.0 18.9 NA [3,] 24.2 20.2 24.8 21.3 15.6 NA [4,] 23.6 21.2 24.0 21.5 12.5 NA [5,] 24.4 23.8 22.7 21.3 7.8 NA [6,] 22.5 24.0 23.0 23.2 5.5 NA [7,] 19.4 26.6 24.1 21.8 4.0 NA [8,] 18.1 25.3 24.0 23.3 3.3 NA [9,] 18.1 27.6 22.7 21.0 3.7 NA [10,] 20.7 24.7 22.6 22.4 3.1 NA [11,] 19.1 26.6 23.1 20.4 5.0 NA [12,] 18.3 24.4 24.4 19.9 6.3 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -1.0 1.0 1.4 -1.0 -2.4 NA [2,] -0.5 2.3 -1.2 -0.7 -3.3 NA [3,] -0.6 1.0 -0.8 0.2 -3.1 NA [4,] 0.8 2.6 -1.3 -0.2 -4.7 NA [5,] -1.9 0.2 0.3 1.9 -2.3 NA [6,] -3.1 2.6 1.1 -1.4 -1.5 NA [7,] -1.3 -1.3 -0.1 1.5 -0.7 NA [8,] 0.0 2.3 -1.3 -2.3 0.4 NA [9,] 2.6 -2.9 -0.1 1.4 -0.6 NA [10,] -1.6 1.9 0.5 -2.0 1.9 NA [11,] -0.8 -2.2 1.3 -0.5 1.3 NA [12,] -1.4 0.2 -1.4 1.4 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/html/rcomp/tmp/1vft91258125878.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/2nfid1258125878.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/3t6zp1258125878.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/4htg21258125878.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,] 16.9 17.9 15.6 21.2 21.3 22.5 19.4 18.1 18.1 20.7 19.1 18.3 [2,] 21.3 18.9 20.2 21.2 21.3 22.5 19.4 18.1 18.1 20.7 19.1 18.3 [3,] 23.0 22.0 21.3 21.5 22.7 23.0 21.8 23.3 21.0 22.4 20.4 19.9 [4,] 24.6 24.7 24.2 23.6 23.8 23.2 24.1 24.0 22.7 22.6 23.1 24.4 [5,] 25.7 26.0 24.8 24.0 24.4 24.0 26.6 25.3 27.6 24.7 26.6 24.4 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 20.66823 17.90173 18.47361 19.80417 20.93351 22.50538 18.47899 19.13107 [2,] 25.33177 26.09827 24.12639 23.19583 24.46649 23.49462 25.12101 27.46893 [,9] [,10] [,11] [,12] [1,] 17.74965 21.05746 17.57361 15.58976 [2,] 24.25035 23.74254 23.22639 24.21024 $out [1] 12.5 7.8 5.5 4.0 3.3 3.7 3.1 5.0 6.3 $group [1] 4 5 6 7 8 9 10 11 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(16.9, 21.3, 23, 24.6, 25.7, 17.9, 18.9, 22, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/59leo1258125878.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.4 -1.2 -0.8 -1.3 -2.3 -3.1 -1.3 -2.3 -2.9 -2.0 -2.2 -1.4 [2,] -1.0 -1.2 -0.8 -1.3 -1.9 -1.5 -1.3 -1.3 -0.6 -1.6 -0.8 -1.4 [3,] -1.0 -0.7 -0.6 -0.2 0.2 -1.4 -0.7 0.0 -0.1 0.5 -0.5 -0.6 [4,] 1.0 -0.5 0.2 0.8 0.3 1.1 -0.1 0.4 1.4 1.9 1.3 0.8 [5,] 1.4 -0.5 1.0 2.6 1.9 2.6 1.5 2.3 2.6 1.9 1.3 1.4 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -2.413195 -1.1946182 -1.3065975 -1.683855 -1.354514 -3.2371535 -1.5479170 [2,] 0.413195 -0.2053818 0.1065975 1.283855 1.754514 0.4371535 0.1479170 [,8] [,9] [,10] [,11] [,12] [1,] -1.201216 -1.513195 -1.973091 -1.9838547 -2.338 [2,] 1.201216 1.313195 2.973091 0.9838547 1.138 $out [1] 2.3 -3.3 -3.1 -4.7 $group [1] 2 2 3 4 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-2.4, -1, -1, 1, 1.400, -1.2, -1.2, -0.700, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6vika1258125878.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.1 16.90 22.60 19.90 3.10 NA [2,] 18.7 20.70 22.85 21.15 3.85 NA [3,] 21.6 24.20 24.00 21.65 5.90 NA [4,] 24.3 25.95 24.50 22.70 14.05 NA [5,] 25.7 27.60 26.00 23.30 21.30 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 19.04580 21.80544 23.24742 20.94303 1.247712 NA [2,] 24.15420 26.59456 24.75258 22.35697 10.552288 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(18.1, 18.7, 21.6, 24.3, 25.7, 16.9, 20.7, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7nbbo1258125878.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,] 18.62 19.90 20.400 [2,] 18.75 21.15 21.225 [3,] 19.41 21.90 21.775 [4,] 20.89 22.85 22.475 [5,] 22.30 23.30 22.950 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 18.43393 21.12462 21.20487 [2,] 20.38607 22.67538 22.34513 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(18.62, 18.75, 19.41, 20.89, 22.3, 19.9, 21.15, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1vft91258125878.ps tmp/1vft91258125878.png") > system("convert tmp/2nfid1258125878.ps tmp/2nfid1258125878.png") > system("convert tmp/3t6zp1258125878.ps tmp/3t6zp1258125878.png") > system("convert tmp/4htg21258125878.ps tmp/4htg21258125878.png") > system("convert tmp/59leo1258125878.ps tmp/59leo1258125878.png") > system("convert tmp/6vika1258125878.ps tmp/6vika1258125878.png") > system("convert tmp/7nbbo1258125878.ps tmp/7nbbo1258125878.png") > > > proc.time() user system elapsed 1.228 0.964 2.058