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(6,5,2,3,-2,-4,0,1,4,-3,-3,0,6,-1,0,-1,1,-4,-1,-1,0,3,0,8,8,8,8,11,13,5,12,13,9,11,7,12,11,10,13,14,10,13,12,13,17,15,6,9,6,11,12,13,11,16,16,19,14,15,12,14,16,13,13,15,12,13,12,15,10,8,11,8) > 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] 72 > (np <- floor(n / par1)) [1] 6 > 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 6 6 6 6 6 6 6 6 6 6 6 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 6 6 8 11 6 16 NA [2,] 5 -1 8 10 11 13 NA [3,] 2 0 8 13 12 13 NA [4,] 3 -1 11 14 13 15 NA [5,] -2 1 13 10 11 12 NA [6,] -4 -4 5 13 16 13 NA [7,] 0 -1 12 12 16 12 NA [8,] 1 -1 13 13 19 15 NA [9,] 4 0 9 17 14 10 NA [10,] -3 3 11 15 15 8 NA [11,] -3 0 7 6 12 11 NA [12,] 0 8 12 9 14 8 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -1 -7 0 -1 5 -3 NA [2,] -3 1 0 3 1 0 NA [3,] 1 -1 3 1 1 2 NA [4,] -5 2 2 -4 -2 -3 NA [5,] -2 -5 -8 3 5 1 NA [6,] 4 3 7 -1 0 -1 NA [7,] 1 0 1 1 3 3 NA [8,] 3 1 -4 4 -5 -5 NA [9,] -7 3 2 -2 1 -2 NA [10,] 0 -3 -4 -9 -3 3 NA [11,] 3 8 5 3 2 -3 NA [12,] 6 0 -1 -3 2 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/1ew911259607226.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/2tgkb1259607226.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/35e6v1259607226.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/49d8n1259607226.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,] 6 -1 0 -1 -2.0 -4 -1 -1 0.0 -3.0 -3.0 8.0 [2,] 6 5 2 3 1.0 -4 0 1 4.0 3.0 0.0 8.0 [3,] 7 9 10 12 10.5 9 12 13 9.5 9.5 6.5 8.5 [4,] 11 11 13 14 12.0 13 12 15 14.0 15.0 11.0 12.0 [5,] 16 13 13 15 13.0 16 16 19 17.0 15.0 12.0 14.0 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 3.774839 5.129806 2.904645 4.904645 3.404645 -1.965549 4.259612 [2,] 10.225161 12.870194 17.095355 19.095355 17.595355 19.965549 19.740388 [,8] [,9] [,10] [,11] [,12] [1,] 3.969548 3.049677 1.759612 -0.5953553 5.919871 [2,] 22.030452 15.950323 17.240388 13.5953553 11.080129 $out [1] 0 $group [1] 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(6, 6, 7, 11, 16, -1, 5, 9, 11, 13, 0, 2, 10, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/59wgz1259607226.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,] -7 0.0 1 -5.0 -8.0 -1.0 0 -5.0 -7.0 -9 2 -3 [2,] -3 0.0 1 -4.0 -5.0 -1.0 1 -5.0 -2.0 -4 2 -1 [3,] -1 0.5 1 -2.5 -0.5 1.5 1 -1.5 -0.5 -3 3 0 [4,] 0 1.0 2 2.0 3.0 4.0 3 3.0 2.0 0 5 2 [5,] 0 1.0 3 2.0 5.0 7.0 3 4.0 3.0 3 8 6 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -2.9350969 -0.1450323 0.3549677 -6.370194 -5.660258 -1.725161 -0.2900646 [2,] 0.9350969 1.1450323 1.6450323 1.370194 4.660258 4.725161 2.2900646 [,8] [,9] [,10] [,11] [,12] [1,] -6.660258 -3.080129 -5.5801292 1.064903 -2.119792 [2,] 3.660258 2.080129 -0.4198708 4.935097 2.119792 $out [1] 5 -3 3 -1 -3 $group [1] 1 2 2 3 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-7, -3, -1, 0, 0, 0, 0, 0.5, 1, 1, 1, 1, 1, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6w7t41259607226.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] [,7] [1,] -4.0 -4 5 6.0 6.0 8.0 NA [2,] -2.5 -1 8 10.0 11.5 10.5 NA [3,] 0.5 0 10 12.5 13.5 12.5 NA [4,] 3.5 2 12 13.5 15.5 14.0 NA [5,] 6.0 6 13 17.0 19.0 16.0 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -2.236640 -1.368320 8.175573 10.90363 11.67557 10.90363 NA [2,] 3.236640 1.368320 11.824427 14.09637 15.32443 14.09637 NA $out [1] 8 $group [1] 2 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(-4, -2.5, 0.5, 3.5, 6, -4, -1, 0, 2, 6, 5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/76cj41259607226.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,] 6.500000 6.50 5.6250 [2,] 7.583333 8.75 7.5000 [3,] 8.333333 9.50 8.1875 [4,] 8.916667 11.25 9.1875 [5,] 10.000000 13.00 9.6250 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 7.725191 8.359733 7.41782 [2,] 8.941476 10.640267 8.95718 $out [1] 5.5 $group [1] 1 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(6.5, 7.58333333333333, 8.33333333333333, 8.91666666666667, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1ew911259607226.ps tmp/1ew911259607226.png") > system("convert tmp/2tgkb1259607226.ps tmp/2tgkb1259607226.png") > system("convert tmp/35e6v1259607226.ps tmp/35e6v1259607226.png") > system("convert tmp/49d8n1259607226.ps tmp/49d8n1259607226.png") > system("convert tmp/59wgz1259607226.ps tmp/59wgz1259607226.png") > system("convert tmp/6w7t41259607226.ps tmp/6w7t41259607226.png") > system("convert tmp/76cj41259607226.ps tmp/76cj41259607226.png") > > > proc.time() user system elapsed 1.194 0.953 1.807