R version 2.8.0 (2008-10-20) Copyright (C) 2008 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. Natural language support but running in an English locale 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(55,20,80,52,75,30,90,68,24,60,65,60,80,65,90,65,76,70,38,60,10,5,93,70,61,72,40,75,100,29,70,25,70,82,40,50,70,91,10,25,56,30,74,60,80,80,60,64,40,80,71,65,90,68,76,25,79,40,61,27,70,40,13,15,38,47,65,62,50,80,87,40,80,20,60,48,70,91,10,50,70,45,20,10,90,80,74,71,40,29,60,31,67,82,40,30,70,63,35,35,70,60,80,70,71) > 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] 105 > (np <- floor(n / par1)) [1] 8 > 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] 9 9 9 9 9 9 9 9 9 8 8 8 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 55 80 61 70 40 70 80 90 70 [2,] 20 65 72 91 80 40 20 80 63 [3,] 80 90 40 10 71 13 60 74 35 [4,] 52 65 75 25 65 15 48 71 35 [5,] 75 76 100 56 90 38 70 40 70 [6,] 30 70 29 30 68 47 91 29 60 [7,] 90 38 70 74 76 65 10 60 80 [8,] 68 60 25 60 25 62 50 31 70 [9,] 24 10 70 80 79 50 70 67 71 [10,] 60 5 82 80 40 80 45 82 NA [11,] 65 93 40 60 61 87 20 40 NA [12,] 60 70 50 64 27 40 10 30 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] -35 -15 11 21 40 -30 -60 -10 -7 [2,] 60 25 -32 -81 -9 -27 40 -6 -28 [3,] -28 -25 35 15 -6 2 -12 -3 0 [4,] 23 11 25 31 25 23 22 -31 35 [5,] -45 -6 -71 -26 -22 9 21 -11 -10 [6,] 60 -32 41 44 8 18 -81 31 20 [7,] -22 22 -45 -14 -51 -3 40 -29 -10 [8,] -44 -50 45 20 54 -12 20 36 1 [9,] 36 -5 12 0 -39 30 -25 15 NA [10,] 5 88 -42 -20 21 7 -25 -42 NA [11,] -5 -23 10 4 -34 -47 -10 -10 NA [12,] 20 -9 20 -24 43 40 80 40 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/freestat/rcomp/tmp/1zfch1290510570.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/freestat/rcomp/tmp/2zfch1290510570.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/freestat/rcomp/tmp/3s6bj1290510570.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/freestat/rcomp/tmp/4s6bj1290510570.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,] 40 20 10 15 38 29 38 25 24 5.0 20.0 10.0 [2,] 61 40 35 35 56 30 60 31 50 42.5 40.0 28.5 [3,] 70 65 60 52 70 47 70 60 70 70.0 60.5 45.0 [4,] 80 80 74 65 76 68 76 62 71 81.0 76.0 62.0 [5,] 90 91 90 75 100 91 90 70 80 82.0 93.0 70.0 $n [1] 9 9 9 9 9 9 9 9 9 8 8 8 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 59.99333 43.93333 39.46 36.2 59.46667 26.98667 61.57333 43.67333 58.94 [2,] 80.00667 86.06667 80.54 67.8 80.53333 67.01333 78.42667 76.32667 81.06 [,10] [,11] [,12] [1,] 48.49335 40.38988 26.28642 [2,] 91.50665 80.61012 63.71358 $out [1] 10 10 $group [1] 7 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(40, 61, 70, 80, 90, 20, 40, 65, 80, 91, 10, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/5s6bj1290510570.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,] -60 -81 -28 22 -45 -32 -51 -50 -39.0 -42.0 -47.0 -24.0 [2,] -30 -28 -12 22 -26 8 -29 -12 -15.0 -33.5 -28.5 5.5 [3,] -10 -9 -3 23 -11 20 -14 20 6.0 -7.5 -10.0 30.0 [4,] 11 25 2 25 -6 41 -3 36 22.5 14.0 -0.5 41.5 [5,] 40 60 15 25 21 60 22 54 36.0 21.0 10.0 80.0 $n [1] 9 9 9 9 9 9 9 9 8 8 8 8 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] -31.59333 -36.91333 -10.373333 21.42 -21.5333333 2.62 -27.6933333 -5.28 [2,] 11.59333 18.91333 4.373333 24.58 -0.4666667 37.38 -0.3066667 45.28 [,9] [,10] [,11] [,12] [1,] -14.94804 -34.03418 -25.641202 9.889883 [2,] 26.94804 19.03418 5.641202 50.110117 $out [1] 35 11 31 -31 35 -71 -81 40 88 $group [1] 3 4 4 4 4 5 6 7 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-60, -30, -10, 11, 40, -81, -28, -9, 25, 60, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/63xtn1290510570.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] [1,] 20.0 10.0 25.0 10 25.0 13.0 10 29.0 60 [2,] 41.0 49.0 40.0 43 40.0 39.0 20 35.5 60 [3,] 60.0 67.5 65.5 62 66.5 48.5 49 63.5 70 [4,] 71.5 78.0 73.5 77 77.5 67.5 70 77.0 70 [5,] 90.0 93.0 100.0 91 90.0 87.0 91 90.0 80 $n [1] 12 12 12 12 12 12 12 12 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 46.08875 54.2729 50.22043 46.49237 49.396 35.50096 26.19466 44.57157 [2,] 73.91125 80.7271 80.77957 77.50763 83.604 61.49904 71.80534 82.42843 [,9] [1,] 64.73333 [2,] 75.26667 $out [1] 5 35 35 $group [1] 2 9 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" NA Warning message: In bxp(list(stats = c(20, 41, 60, 71.5, 90, 10, 49, 67.5, 78, 93, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/73xtn1290510570.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,] 43.87500 45.00 45.1250 [2,] 50.27778 56.00 49.5000 [3,] 58.06944 62.75 57.6250 [4,] 60.90278 70.00 64.0625 [5,] 68.44444 70.00 70.5000 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 53.22331 56.36451 50.98295 [2,] 62.91558 69.13549 64.26705 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(43.875, 50.2777777777778, 58.0694444444444, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1zfch1290510570.ps tmp/1zfch1290510570.png",intern=TRUE)) character(0) > try(system("convert tmp/2zfch1290510570.ps tmp/2zfch1290510570.png",intern=TRUE)) character(0) > try(system("convert tmp/3s6bj1290510570.ps tmp/3s6bj1290510570.png",intern=TRUE)) character(0) > try(system("convert tmp/4s6bj1290510570.ps tmp/4s6bj1290510570.png",intern=TRUE)) character(0) > try(system("convert tmp/5s6bj1290510570.ps tmp/5s6bj1290510570.png",intern=TRUE)) character(0) > try(system("convert tmp/63xtn1290510570.ps tmp/63xtn1290510570.png",intern=TRUE)) character(0) > try(system("convert tmp/73xtn1290510570.ps tmp/73xtn1290510570.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.973 1.486 2.475