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(53,43,33,45,46,55,41,55,36,45,55,50,49,47,69,51,48,62,45,37,50,50,50,58,53,57,53,61,47,47,56,44,46,58,48,38,74,60,32,51,50,40,61,63,56,45,61,70,59,57,69,44,56,50,56,43,48,52,62,48) > 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,] 53 49 53 74 59 NA [2,] 43 47 57 60 57 NA [3,] 33 69 53 32 69 NA [4,] 45 51 61 51 44 NA [5,] 46 48 47 50 56 NA [6,] 55 62 47 40 50 NA [7,] 41 45 56 61 56 NA [8,] 55 37 44 63 43 NA [9,] 36 50 46 56 48 NA [10,] 45 50 58 45 52 NA [11,] 55 50 48 61 62 NA [12,] 50 58 38 70 48 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -10 -2 4 -14 -2 NA [2,] -10 22 -4 -28 12 NA [3,] 12 -18 8 19 -25 NA [4,] 1 -3 -14 -1 12 NA [5,] 9 14 0 -10 -6 NA [6,] -14 -17 9 21 6 NA [7,] 14 -8 -12 2 -13 NA [8,] -19 13 2 -7 5 NA [9,] 9 0 12 -11 4 NA [10,] 10 0 -10 16 10 NA [11,] -5 8 -10 9 -14 NA [12,] -1 -5 36 -11 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/1nm8h1290446392.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/2ge7k1290446392.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/3ge7k1290446392.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/4ge7k1290446392.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,] 49 43 32 44 46 40 41 37 46 45 48 38 [2,] 53 47 33 45 47 47 45 43 46 45 50 48 [3,] 53 57 53 51 48 50 56 44 48 50 55 50 [4,] 59 57 69 51 50 55 56 55 50 52 61 58 [5,] 59 60 69 51 50 62 61 63 56 58 62 70 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 48.76042 49.93403 27.56249 46.76042 45.88021 44.34722 48.22743 35.52083 [2,] 57.23958 64.06597 78.43751 55.23958 50.11979 55.65278 63.77257 52.47917 [,9] [,10] [,11] [,12] [1,] 45.17361 45.05382 47.22743 42.93403 [2,] 50.82639 54.94618 62.77257 57.06597 $out [1] 74 61 56 36 $group [1] 1 4 5 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(49, 53, 53, 59, 59, 43, 47, 57, 57, 60, 32, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5q5o51290446392.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,] -14 -28 -25 -3 -10 -17 -13 -19 -11 -10 -14 -11.0 [2,] -10 -10 -18 -3 -6 -14 -12 -7 0 0 -10 -8.0 [3,] -2 -4 8 -1 0 6 -8 2 4 10 -5 -3.0 [4,] -2 12 12 1 9 9 2 5 9 10 8 17.5 [5,] 4 22 19 1 14 21 14 13 12 16 9 36.0 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -7.65278 -19.54514 -13.19792 -3.82639 -10.59896 -10.25174 -17.892365 [2,] 3.65278 11.54514 29.19792 1.82639 10.59896 22.25174 1.892365 [,8] [,9] [,10] [,11] [,12] [1,] -6.47917 -2.359377 2.934025 -17.718755 -23.145 [2,] 10.47917 10.359377 17.065975 7.718755 17.145 $out [1] -14 12 $group [1] 4 4 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-14, -10, -2, -2, 4, -28, -10, -4, 12, 22, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6q5o51290446392.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,] 33.0 37.0 38.0 32.0 43 NA [2,] 42.0 47.5 46.5 47.5 48 NA [3,] 45.5 50.0 50.5 58.0 54 NA [4,] 54.0 54.5 56.5 62.0 58 NA [5,] 55.0 62.0 61.0 74.0 69 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 40.02672 46.80725 45.93893 51.38645 49.43893 NA [2,] 50.97328 53.19275 55.06107 64.61355 58.56107 NA $out [1] 69 $group [1] 2 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(33, 42, 45.5, 54, 55, 37, 47.5, 50, 54.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7jw681290446392.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,] 47.2 44.0 48.00 [2,] 49.7 49.0 48.50 [3,] 51.0 50.5 50.75 [4,] 52.8 54.0 52.50 [5,] 55.2 57.0 56.00 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 49.58607 48.21947 48.92557 [2,] 52.41393 52.78053 52.57443 $out [1] 57.6 $group [1] 1 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(47.2, 49.7, 51, 52.8, 55.2, 44, 49, 50.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1nm8h1290446392.ps tmp/1nm8h1290446392.png",intern=TRUE)) character(0) > try(system("convert tmp/2ge7k1290446392.ps tmp/2ge7k1290446392.png",intern=TRUE)) character(0) > try(system("convert tmp/3ge7k1290446392.ps tmp/3ge7k1290446392.png",intern=TRUE)) character(0) > try(system("convert tmp/4ge7k1290446392.ps tmp/4ge7k1290446392.png",intern=TRUE)) character(0) > try(system("convert tmp/5q5o51290446392.ps tmp/5q5o51290446392.png",intern=TRUE)) character(0) > try(system("convert tmp/6q5o51290446392.ps tmp/6q5o51290446392.png",intern=TRUE)) character(0) > try(system("convert tmp/7jw681290446392.ps tmp/7jw681290446392.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.186 0.939 3.180