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(101,101,98.7,96.4,95.6,95.4,98.7,98.7,98.7,99.3,99.5,99.6,100.8,100.8,100.8,101,101.6,102.3,102.3,102.3,102.3,102.4,102.4,102.4,102.4,102.4,102.4,102.4,101.6,102.2,102.2,102.2,102.2,102.2,102.2,102.2,102.2,102.2,102.2,102.2,102.2,102.2,102.2,102.2,102.2,102.2,102.2,102.2,102.1,102.1,102.1,102.1,100.7,100.7,100.7,100.7,100.7,100.7,100.7,100.7) > 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,] 101.0 100.8 102.4 102.2 102.1 NA [2,] 101.0 100.8 102.4 102.2 102.1 NA [3,] 98.7 100.8 102.4 102.2 102.1 NA [4,] 96.4 101.0 102.4 102.2 102.1 NA [5,] 95.6 101.6 101.6 102.2 100.7 NA [6,] 95.4 102.3 102.2 102.2 100.7 NA [7,] 98.7 102.3 102.2 102.2 100.7 NA [8,] 98.7 102.3 102.2 102.2 100.7 NA [9,] 98.7 102.3 102.2 102.2 100.7 NA [10,] 99.3 102.4 102.2 102.2 100.7 NA [11,] 99.5 102.4 102.2 102.2 100.7 NA [12,] 99.6 102.4 102.2 102.2 100.7 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.0 0.0 0.0 0.0 0.0 NA [2,] -2.3 0.0 0.0 0.0 0.0 NA [3,] -2.3 0.2 0.0 0.0 0.0 NA [4,] -0.8 0.6 -0.8 0.0 -1.4 NA [5,] -0.2 0.7 0.6 0.0 0.0 NA [6,] 3.3 0.0 0.0 0.0 0.0 NA [7,] 0.0 0.0 0.0 0.0 0.0 NA [8,] 0.0 0.0 0.0 0.0 0.0 NA [9,] 0.6 0.1 0.0 0.0 0.0 NA [10,] 0.2 0.0 0.0 0.0 0.0 NA [11,] 0.1 0.0 0.0 0.0 0.0 NA [12,] 1.2 0.0 0.0 -0.1 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/18xvp1257939190.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/26gjw1257939190.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/3gzyw1257939190.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/4carw1257939190.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,] 100.8 100.8 98.7 101.0 100.7 100.7 98.7 98.7 98.7 99.3 99.5 99.6 [2,] 101.0 101.0 100.8 101.0 100.7 100.7 100.7 100.7 100.7 100.7 100.7 100.7 [3,] 102.1 102.1 102.1 102.1 101.6 102.2 102.2 102.2 102.2 102.2 102.2 102.2 [4,] 102.2 102.2 102.2 102.2 101.6 102.2 102.2 102.2 102.2 102.2 102.2 102.2 [5,] 102.4 102.4 102.4 102.4 102.2 102.3 102.3 102.3 102.3 102.4 102.4 102.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,] 101.2521 101.2521 101.1108 101.2521 100.9641 101.1401 101.1401 101.1401 [2,] 102.9479 102.9479 103.0892 102.9479 102.2359 103.2599 103.2599 103.2599 [,9] [,10] [,11] [,12] [1,] 101.1401 101.1401 101.1401 101.1401 [2,] 103.2599 103.2599 103.2599 103.2599 $out [1] 96.4 95.6 95.4 $group [1] 4 5 6 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(100.8, 101, 102.1, 102.2, 102.4, 100.8, 101, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/53gx41257939190.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 0 0 -1.4 -0.2 0 0 0 0.0 0 0 -0.10 [2,] 0 0 0 -0.8 0.0 0 0 0 0.0 0 0 -0.05 [3,] 0 0 0 -0.8 0.0 0 0 0 0.0 0 0 0.00 [4,] 0 0 0 0.0 0.6 0 0 0 0.1 0 0 0.60 [5,] 0 0 0 0.6 0.7 0 0 0 0.1 0 0 1.20 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] 0 0 0 -1.365278 -0.4239585 0 0 0 -0.07065975 0 0 [2,] 0 0 0 -0.234722 0.4239585 0 0 0 0.07065975 0 0 [,12] [1,] -0.5135 [2,] 0.5135 $out [1] -2.3 -2.3 0.2 3.3 0.6 0.2 0.1 $group [1] 2 3 3 6 9 10 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/6u4nf1257939190.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,] 95.40 100.80 102.2 102.2 100.7 NA [2,] 97.55 100.90 102.2 102.2 100.7 NA [3,] 98.70 102.30 102.2 102.2 100.7 NA [4,] 99.55 102.35 102.4 102.2 102.1 NA [5,] 101.00 102.40 102.4 102.2 102.1 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 97.78779 101.6386 102.1088 102.2 100.0615 NA [2,] 99.61221 102.9614 102.2912 102.2 101.3385 NA $out [1] 101.6 $group [1] 3 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(95.4, 97.55, 98.7, 99.55, 101, 100.8, 100.9, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/77u7c1257939190.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,] 100.56 102.1 101.45 [2,] 101.02 102.1 101.45 [3,] 101.23 102.2 101.45 [4,] 101.41 102.2 101.55 [5,] 101.70 102.2 101.60 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 101.0521 102.1544 101.4044 [2,] 101.4079 102.2456 101.4956 $out [1] 100.34 101.60 101.15 $group [1] 1 2 3 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(100.56, 101.02, 101.23, 101.41, 101.7, 102.1, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/18xvp1257939190.ps tmp/18xvp1257939190.png") > system("convert tmp/26gjw1257939190.ps tmp/26gjw1257939190.png") > system("convert tmp/3gzyw1257939190.ps tmp/3gzyw1257939190.png") > system("convert tmp/4carw1257939190.ps tmp/4carw1257939190.png") > system("convert tmp/53gx41257939190.ps tmp/53gx41257939190.png") > system("convert tmp/6u4nf1257939190.ps tmp/6u4nf1257939190.png") > system("convert tmp/77u7c1257939190.ps tmp/77u7c1257939190.png") > > > proc.time() user system elapsed 1.49 1.41 2.79