R version 2.11.1 (2010-05-31) Copyright (C) 2010 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(5,3,0,7,4,1,6,3,12,0,5,6,6,6,2,1,5,7,3,3,3,7,8,6,3,5,5,10,2,6,4,6,8,4,5,10,6,7,4,10,4,3,3,3,3,7,15,0,0,4,5,5,2,3,0,9,2,7,7,0,0,10,2,1,8,6,11,3,8,6,9,9,8,8,7,6,5,4,6,3,2,12,8,5,9,6,5,2,4,7,5,6,7,8,6,0,1,5,5,5,7,7,1,3,4,8,6,6,2,2,3,3,0,2,8,8,0,5,9,6,6,3,9,7,8,0,7,0,5,0,14,5,2,8,4,2,6,3,5,9,3,3,0,10,4,2,3,10,7,0,6,8,0,4,10,5) > 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] 156 > (np <- floor(n / par1)) [1] 13 > 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] 13 13 13 13 13 13 13 13 13 13 13 13 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 5 6 3 6 0 0 8 9 1 2 6 2 4 [2,] 3 6 5 7 4 10 8 6 5 2 3 8 2 [3,] 0 2 5 4 5 2 7 5 5 3 9 4 3 [4,] 7 1 10 10 5 1 6 2 5 3 7 2 10 [5,] 4 5 2 4 2 8 5 4 7 0 8 6 7 [6,] 1 7 6 3 3 6 4 7 7 2 0 3 0 [7,] 6 3 4 3 0 11 6 5 1 8 7 5 6 [8,] 3 3 6 3 9 3 3 6 3 8 0 9 8 [9,] 12 3 8 3 2 8 2 7 4 0 5 3 0 [10,] 0 7 4 7 7 6 12 8 8 5 0 3 4 [11,] 5 8 5 15 7 9 8 6 6 9 14 0 10 [12,] 6 6 10 0 0 9 5 0 6 6 5 10 5 [,14] [1,] NA [2,] NA [3,] NA [4,] NA [5,] NA [6,] NA [7,] NA [8,] NA [9,] NA [10,] NA [11,] NA [12,] NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] -2 0 2 1 4 10 0 -3 4 0 -3 6 -2 [2,] -3 -4 0 -3 1 -8 -1 -1 0 1 6 -4 1 [3,] 7 -1 5 6 0 -1 -1 -3 0 0 -2 -2 7 [4,] -3 4 -8 -6 -3 7 -1 2 2 -3 1 4 -3 [5,] -3 2 4 -1 1 -2 -1 3 0 2 -8 -3 -7 [6,] 5 -4 -2 0 -3 5 2 -2 -6 6 7 2 6 [7,] -3 0 2 0 9 -8 -3 1 2 0 -7 4 2 [8,] 9 0 2 0 -7 5 -1 1 1 -8 5 -6 -8 [9,] -12 4 -4 4 5 -2 10 1 4 5 -5 0 4 [10,] 5 1 1 8 0 3 -4 -2 -2 4 14 -3 6 [11,] 1 -2 5 -15 -7 0 -3 -6 0 -3 -9 10 -5 [12,] 0 -3 -4 0 0 -1 4 1 -4 0 -3 -6 NA [,14] [1,] NA [2,] NA [3,] NA [4,] NA [5,] NA [6,] NA [7,] NA [8,] NA [9,] NA [10,] NA [11,] NA [12,] 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/150j11289860712.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/250j11289860712.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/350j11289860712.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/4yr1m1289860712.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 2 0 1 0 0 0 0 0 0 5 5 [2,] 2 3 3 2 4 2 3 3 2 4 6 5 [3,] 4 5 4 5 5 3 5 3 3 6 8 6 [4,] 6 7 5 7 7 6 6 8 7 7 9 6 [5,] 9 10 7 10 8 7 8 9 12 8 10 6 $n [1] 13 13 13 13 13 13 13 13 13 13 13 13 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 2.247147 3.247147 3.123574 2.808934 3.685361 1.247147 3.685361 0.8089342 [2,] 5.752853 6.752853 4.876426 7.191066 6.314639 4.752853 6.314639 5.1910658 [,9] [,10] [,11] [,12] [1,] 0.8089342 4.685361 6.68536 5.561787 [2,] 5.1910658 7.314639 9.31464 6.438213 $out [1] 9 11 12 15 14 0 10 0 0 9 0 10 $group [1] 3 7 10 11 11 11 12 12 12 12 12 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0, 2, 4, 6, 9, 2, 3, 5, 7, 10, 0, 3, 4, 5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/5yr1m1289860712.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 -8 -3 -8 -8 -6 -8 -8 -5 -4 -15 -6.0 [2,] -2 -3 -1 -3 -3 -2 -3 -6 -2 -2 -6 -3.5 [3,] 0 -1 0 -1 -1 2 0 0 4 1 -3 -0.5 [4,] 4 1 5 2 2 5 2 2 4 5 0 0.0 [5,] 10 6 7 7 4 7 9 9 10 14 5 4.0 $n [1] 13 13 13 13 13 13 13 13 13 13 13 12 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -2.629279 -2.7528526 -2.629279 -3.191066 -3.191066 -1.067492 -2.191066 [2,] 2.629279 0.7528526 2.629279 1.191066 1.191066 5.067492 2.191066 [,8] [,9] [,10] [,11] [,12] [1,] -3.505705 1.370721 -2.067492 -5.6292789 -2.096373 [2,] 3.505705 6.629279 4.067492 -0.3707211 1.096373 $out [1] -12 10 $group [1] 9 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-3, -2, 0, 4, 10, -8, -3, -1, 1, 6, -3, -1, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/6yr1m1289860712.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] [,12] [,13] [,14] [1,] 0.0 1.0 2 0 0.0 0.0 2.0 2.0 1.0 0 0.0 0.0 0.0 NA [2,] 2.0 3.0 4 3 1.0 2.5 4.5 4.5 3.5 2 1.5 2.5 2.5 NA [3,] 4.5 5.5 5 4 3.5 7.0 6.0 6.0 5.0 3 5.5 3.5 4.5 NA [4,] 6.0 6.5 7 7 6.0 9.0 8.0 7.0 6.5 7 7.5 7.0 7.5 NA [5,] 12.0 8.0 10 10 9.0 11.0 12.0 9.0 8.0 9 14.0 10.0 10.0 NA $n [1] 12 12 12 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 2.675573 3.903627 3.63168 2.175573 1.219466 4.035306 4.403627 4.859733 [2,] 6.324427 7.096373 6.36832 5.824427 5.780534 9.964694 7.596373 7.140267 [,9] [,10] [,11] [,12] [,13] [,14] [1,] 3.63168 0.7194664 2.76336 1.447520 2.219466 NA [2,] 6.36832 5.2805336 8.23664 5.552480 6.780534 NA $out [1] 15 0 $group [1] 4 8 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" NA Warning message: In bxp(list(stats = c(0, 2, 4.5, 6, 12, 1, 3, 5.5, 6.5, 8, 2, 4, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/7900p1289860712.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,] 3.769231 3.0 4.00 [2,] 4.269231 3.5 4.25 [3,] 4.961538 5.0 4.75 [4,] 5.307692 5.5 5.50 [5,] 5.461538 8.0 5.50 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 4.487889 4.087787 4.179867 [2,] 5.435188 5.912213 5.320133 $out [1] 7.846154 7.500000 $group [1] 1 3 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(3.76923076923077, 4.26923076923077, 4.96153846153846, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > try(system("convert tmp/150j11289860712.ps tmp/150j11289860712.png",intern=TRUE)) character(0) > try(system("convert tmp/250j11289860712.ps tmp/250j11289860712.png",intern=TRUE)) character(0) > try(system("convert tmp/350j11289860712.ps tmp/350j11289860712.png",intern=TRUE)) character(0) > try(system("convert tmp/4yr1m1289860712.ps tmp/4yr1m1289860712.png",intern=TRUE)) character(0) > try(system("convert tmp/5yr1m1289860712.ps tmp/5yr1m1289860712.png",intern=TRUE)) character(0) > try(system("convert tmp/6yr1m1289860712.ps tmp/6yr1m1289860712.png",intern=TRUE)) character(0) > try(system("convert tmp/7900p1289860712.ps tmp/7900p1289860712.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.020 1.320 3.308