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(0,1,0,0,1,3,9,2,3,5,3,5,2,2,0,1,0,1,3,3,2,1,1,5,0,3,1,0,1,4,0,0,1,6,14,1,1,0,0,1,1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,2,0,1,0,1,0,0,1,2,0,0,1,2,0,3,1,1,0,2,0,4,0,2,1,1,1,1,0,1,1,0,2,1,3,1,2,4,0,0,0,1,0,1,0,2,2,4,2,3,3,0,0,2,7,8,2,4,1,1,2,4) > 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] 120 > (np <- floor(n / par1)) [1] 10 > 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] 10 10 10 10 10 10 10 10 10 10 10 10 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] 0 2 0 1 1 0 0 1 0 3 NA [2,] 1 2 3 0 0 1 3 1 0 0 NA [3,] 0 0 1 0 1 0 1 0 0 0 NA [4,] 0 1 0 1 0 1 1 1 1 2 NA [5,] 1 0 1 1 1 0 0 1 0 7 NA [6,] 3 1 4 1 0 0 2 0 1 8 NA [7,] 9 3 0 1 1 1 0 2 0 2 NA [8,] 2 3 0 0 0 2 4 1 2 4 NA [9,] 3 2 1 1 1 0 0 3 2 1 NA [10,] 5 1 6 0 0 0 2 1 4 1 NA [11,] 3 1 14 1 0 1 1 2 2 2 NA [12,] 5 5 1 0 2 2 1 4 3 4 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] 1 0 3 -1 -1 1 3 0 0 -3 NA [2,] -1 -2 -2 0 1 -1 -2 -1 0 0 NA [3,] 0 1 -1 1 -1 1 0 1 1 2 NA [4,] 1 -1 1 0 1 -1 -1 0 -1 5 NA [5,] 2 1 3 0 -1 0 2 -1 1 1 NA [6,] 6 2 -4 0 1 1 -2 2 -1 -6 NA [7,] -7 0 0 -1 -1 1 4 -1 2 2 NA [8,] 1 -1 1 1 1 -2 -4 2 0 -3 NA [9,] 2 -1 5 -1 -1 0 2 -2 2 0 NA [10,] -2 0 8 1 0 1 -1 1 -2 1 NA [11,] 2 4 -13 -1 2 1 0 2 1 2 NA [12,] -3 -5 0 1 -2 -2 0 -4 0 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/17xvx1244116790.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/2ld531244116790.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/3olyg1244116790.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/4vip81244116790.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,] 0.0 0 0 0 0 0 0 0 0 0 0.0 0.0 [2,] 0.0 0 0 0 0 0 0 0 1 0 1.0 1.0 [3,] 0.5 1 0 1 1 1 1 2 1 1 1.5 2.5 [4,] 1.0 2 1 1 1 3 2 3 2 4 2.0 4.0 [5,] 2.0 3 1 2 1 4 3 4 3 6 3.0 5.0 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.0003601297 0.0007202594 -0.4996399 0.5003601 0.5003601 -0.4989196 [2,] 0.9996398703 1.9992797406 0.4996399 1.4996399 1.4996399 2.4989196 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0.0007202594 0.5010804 0.5003601 -0.9985595 1.000360 1.001080 [2,] 1.9992797406 3.4989196 1.4996399 2.9985595 1.999640 3.998920 $out [1] 3 7 8 9 14 $group [1] 1 5 6 7 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.5, 1, 2, 0, 0, 1, 2, 3, 0, 0, 0, 1, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5ehrp1244116790.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,] -3 -2 -1 -1 -1 -6.0 -1 -4.0 -2 -2.0 -1.0 -5 [2,] -1 -2 0 -1 0 -2.0 -1 -2.0 -1 -1.0 0.0 -3 [3,] 0 -1 1 0 1 0.5 0 0.5 0 0.5 1.5 -2 [4,] 1 0 1 1 2 2.0 2 1.0 2 1.0 2.0 0 [5,] 3 1 2 1 3 6.0 4 2.0 5 1.0 4.0 1 $n [1] 10 10 10 10 10 10 10 10 10 10 10 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.9992797 -1.9992797406 0.5003601 -0.9992797 0.0007202594 -1.498559 [2,] 0.9992797 -0.0007202594 1.4996399 0.9992797 1.9992797406 2.498559 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -1.498920 -0.9989196 -1.498920 -0.4992797 0.5007203 -3.58 [2,] 1.498920 1.9989196 1.498920 1.4992797 2.4992797 -0.42 $out [1] 5 -7 8 -13 $group [1] 4 7 10 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-3, -1, 0, 1, 3, -2, -2, -1, 0, 1, -1, 0, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6hl6u1244116790.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] [,8] [,9] [,10] [,11] [1,] 0.0 0.0 0.0 0 0.0 0.0 0 0 0 0 NA [2,] 0.5 1.0 0.0 0 0.0 0.0 0 1 0 1 NA [3,] 2.5 1.5 1.0 1 0.5 0.5 1 1 1 2 NA [4,] 4.0 2.5 3.5 1 1.0 1.0 2 2 2 4 NA [5,] 9.0 3.0 6.0 1 2.0 2.0 4 3 4 8 NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.9036265 0.81584 -0.5963735 0.5438933 0.04389329 0.04389329 0.08778657 [2,] 4.0963735 2.18416 2.5963735 1.4561067 0.95610671 0.95610671 1.91221343 [,8] [,9] [,10] [,11] [1,] 0.5438933 0.08778657 0.6316799 NA [2,] 1.4561067 1.91221343 3.3683201 NA $out [1] 5 14 4 $group [1] 2 3 8 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(0, 0.5, 2.5, 4, 9, 0, 1, 1.5, 2.5, 3, 0, 0, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7s05r1244116790.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,] 0.30 1.00 0.3750 [2,] 0.95 1.00 0.5625 [3,] 1.60 1.00 1.3125 [4,] 2.00 1.25 1.5000 [5,] 2.70 1.50 2.6250 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 1.121088 0.8859733 0.8849 [2,] 2.078912 1.1140267 1.7401 $out [1] 0.5 0.0 2.0 2.5 $group [1] 2 2 2 2 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(0.3, 0.95, 1.6, 2, 2.7, 1, 1, 1, 1.25, 1.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/17xvx1244116790.ps tmp/17xvx1244116790.png") > system("convert tmp/2ld531244116790.ps tmp/2ld531244116790.png") > system("convert tmp/3olyg1244116790.ps tmp/3olyg1244116790.png") > system("convert tmp/4vip81244116790.ps tmp/4vip81244116790.png") > system("convert tmp/5ehrp1244116790.ps tmp/5ehrp1244116790.png") > system("convert tmp/6hl6u1244116790.ps tmp/6hl6u1244116790.png") > system("convert tmp/7s05r1244116790.ps tmp/7s05r1244116790.png") > > > proc.time() user system elapsed 1.178 0.914 1.905