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(10,15,12,13,12,15,13,13,16,14,12,15,14,19,16,16,11,13,12,11,6,9,6,15,17,13,12,13,10,14,13,10,11,12,7,11,9,13,12,5,13,11,8,8,8,8,0,3,0,-1,-1,-4,1,-1,0,-1,6,0,-3,-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,] 10 14 17 9 0 NA [2,] 15 19 13 13 -1 NA [3,] 12 16 12 12 -1 NA [4,] 13 16 13 5 -4 NA [5,] 12 11 10 13 1 NA [6,] 15 13 14 11 -1 NA [7,] 13 12 13 8 0 NA [8,] 13 11 10 8 -1 NA [9,] 16 6 11 8 6 NA [10,] 14 9 12 8 0 NA [11,] 12 6 7 0 -3 NA [12,] 15 15 11 3 -3 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 5 5 -4 4 -1 NA [2,] -3 -3 -1 -1 0 NA [3,] 1 0 1 -7 -3 NA [4,] -1 -5 -3 8 5 NA [5,] 3 2 4 -2 -2 NA [6,] -2 -1 -1 -3 1 NA [7,] 0 -1 -3 0 -1 NA [8,] 3 -5 1 0 7 NA [9,] -2 3 1 0 -6 NA [10,] -2 -3 -5 -8 -3 NA [11,] 3 9 4 3 0 NA [12,] -1 2 -2 -3 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/1velb1263074482.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/2gf2f1263074482.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/3hyyb1263074482.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/4epvh1263074482.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,] 9 13 12 -4 10 11 8 8 6 8 -3 -3 [2,] 9 13 12 5 10 11 8 8 6 8 0 3 [3,] 10 13 12 13 11 13 12 10 8 9 6 11 [4,] 14 15 12 13 12 14 13 11 11 12 7 15 [5,] 17 15 12 16 13 15 13 13 16 14 12 15 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 6.467013 11.58681 12 7.34722 9.586805 10.88021 8.467013 7.880208 [2,] 13.532987 14.41319 12 18.65278 12.413195 15.11979 15.532987 12.119792 [,9] [,10] [,11] [,12] [1,] 4.467013 6.17361 1.053818 2.52083 [2,] 11.532987 11.82639 10.946182 19.47917 $out [1] 0 19 -1 16 -1 1 -1 0 -1 0 $group [1] 1 2 2 3 3 5 6 7 8 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(9, 9, 10, 14, 17, 13, 13, 13, 15, 15, 12, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5ixbf1263074482.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,] -4 -3 -7 -5 -2 -3 -1 0 -6 -8 3 -3.0 [2,] -1 -3 -3 -3 -2 -2 -1 0 -2 -5 3 -2.5 [3,] 4 -1 0 -1 2 -1 -1 1 0 -3 3 -1.5 [4,] 5 -1 1 5 3 -1 0 3 1 -3 4 0.5 [5,] 5 0 1 8 4 -1 0 7 3 -2 4 2.0 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.2395849 -2.413195 -2.82639 -6.65278 -1.532987 -1.7065975 -1.7065975 [2,] 8.2395849 0.413195 2.82639 4.65278 5.532987 -0.2934025 -0.2934025 [,8] [,9] [,10] [,11] [,12] [1,] -1.119792 -2.119792 -4.413195 2.293403 -3.87 [2,] 3.119792 2.119792 -1.586805 3.706597 0.87 $out [1] 1 -3 -5 9 0 $group [1] 6 7 8 11 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-4, -1, 4, 5, 5, -3, -3, -1, -1, 0, -7, -3, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6nsk81263074482.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,] 10 6.0 7.0 0.0 -4 NA [2,] 12 10.0 10.5 6.5 -2 NA [3,] 13 12.5 12.0 8.0 -1 NA [4,] 15 15.5 13.0 11.5 0 NA [5,] 16 19.0 14.0 13.0 1 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 11.63168 9.991413 10.85973 5.719466 -1.91221343 NA [2,] 14.36832 15.008587 13.14027 10.280534 -0.08778657 NA $out [1] 17 6 $group [1] 3 5 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(10, 12, 13, 15, 16, 6, 10, 12.5, 15.5, 19, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7dftc1263074482.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,] 8.2 6.0 8.50 [2,] 8.4 9.5 9.00 [3,] 9.3 11.0 10.25 [4,] 10.1 12.5 11.75 [5,] 11.8 13.0 14.00 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 8.524619 9.63168 8.995707 [2,] 10.075381 12.36832 11.504293 $out [1] 4.4 3.5 $group [1] 1 3 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(8.2, 8.4, 9.3, 10.1, 11.8, 6, 9.5, 11, 12.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1velb1263074482.ps tmp/1velb1263074482.png",intern=TRUE)) character(0) > try(system("convert tmp/2gf2f1263074482.ps tmp/2gf2f1263074482.png",intern=TRUE)) character(0) > try(system("convert tmp/3hyyb1263074482.ps tmp/3hyyb1263074482.png",intern=TRUE)) character(0) > try(system("convert tmp/4epvh1263074482.ps tmp/4epvh1263074482.png",intern=TRUE)) character(0) > try(system("convert tmp/5ixbf1263074482.ps tmp/5ixbf1263074482.png",intern=TRUE)) character(0) > try(system("convert tmp/6nsk81263074482.ps tmp/6nsk81263074482.png",intern=TRUE)) character(0) > try(system("convert tmp/7dftc1263074482.ps tmp/7dftc1263074482.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.225 0.959 1.600