R version 2.8.1 (2008-12-22) 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. 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(151.7,121.3,133.0,119.6,122.2,117.4,106.7,87.5,81.0,110.3,87.0,55.7,146.0,137.5,138.5,135.6,107.3,99.0,91.4,68.4,82.6,98.4,71.3,47.6,130.8,113.6,125.7,113.6,97.1,104.4,91.8,75.1,89.2,110.2,78.4,68.4,122.8,129.7,159.1,139.0,102.2,113.6,81.5,77.4,87.6,101.2,87.2,64.9,133.1,118.0,135.9,125.7,108.0,128.3,84.7,86.4,92.2,95.8,92.3,54.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,] 151.7 146.0 130.8 122.8 133.1 NA [2,] 121.3 137.5 113.6 129.7 118.0 NA [3,] 133.0 138.5 125.7 159.1 135.9 NA [4,] 119.6 135.6 113.6 139.0 125.7 NA [5,] 122.2 107.3 97.1 102.2 108.0 NA [6,] 117.4 99.0 104.4 113.6 128.3 NA [7,] 106.7 91.4 91.8 81.5 84.7 NA [8,] 87.5 68.4 75.1 77.4 86.4 NA [9,] 81.0 82.6 89.2 87.6 92.2 NA [10,] 110.3 98.4 110.2 101.2 95.8 NA [11,] 87.0 71.3 78.4 87.2 92.3 NA [12,] 55.7 47.6 68.4 64.9 54.3 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -30.4 -8.5 -17.2 6.9 -15.1 NA [2,] 11.7 1.0 12.1 29.4 17.9 NA [3,] -13.4 -2.9 -12.1 -20.1 -10.2 NA [4,] 2.6 -28.3 -16.5 -36.8 -17.7 NA [5,] -4.8 -8.3 7.3 11.4 20.3 NA [6,] -10.7 -7.6 -12.6 -32.1 -43.6 NA [7,] -19.2 -23.0 -16.7 -4.1 1.7 NA [8,] -6.5 14.2 14.1 10.2 5.8 NA [9,] 29.3 15.8 21.0 13.6 3.6 NA [10,] -23.3 -27.1 -31.8 -14.0 -3.5 NA [11,] -31.3 -23.7 -10.0 -22.3 -38.0 NA [12,] 90.3 83.2 54.4 68.2 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/rcomp/tmp/16kzh1257951351.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/2nmfy1257951351.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/373k91257951351.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/458g71257951351.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,] 122.8 113.6 125.7 113.6 97.1 99.0 81.5 68.4 81.0 95.8 71.3 47.6 [2,] 130.8 118.0 133.0 119.6 102.2 104.4 84.7 75.1 82.6 98.4 78.4 54.3 [3,] 133.1 121.3 135.9 125.7 107.3 113.6 91.4 77.4 87.6 101.2 87.0 55.7 [4,] 146.0 129.7 138.5 135.6 108.0 117.4 91.8 86.4 89.2 110.2 87.2 64.9 [5,] 151.7 137.5 138.5 139.0 108.0 128.3 91.8 87.5 92.2 110.3 92.3 68.4 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 122.3597 113.0328 132.0137 114.3944 103.2017 104.4142 86.38316 69.41545 [2,] 143.8403 129.5672 139.7863 137.0056 111.3983 122.7858 96.41684 85.38455 [,9] [,10] [,11] [,12] [1,] 82.93646 92.86215 80.78194 48.21007 [2,] 92.26354 109.53785 93.21806 63.18993 $out [1] 159.1 122.2 106.7 $group [1] 3 5 7 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(122.8, 130.8, 133.1, 146, 151.7, 113.6, 118, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/5jifb1257951351.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,] -17.2 11.7 -13.4 -36.8 -8.3 -43.6 -23.0 -6.5 3.6 -31.8 -38.0 54.40 [2,] -17.2 11.7 -13.4 -28.3 -4.8 -32.1 -19.2 5.8 13.6 -27.1 -31.3 61.30 [3,] -15.1 12.1 -12.1 -17.7 7.3 -12.6 -16.7 10.2 15.8 -23.3 -23.7 75.70 [4,] -8.5 17.9 -10.2 -16.5 11.4 -10.7 -4.1 14.1 21.0 -14.0 -22.3 86.75 [5,] -8.5 17.9 -10.2 -16.5 20.3 -7.6 1.7 14.2 29.3 -3.5 -10.0 90.30 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -21.247398 7.719096 -14.361112 -26.03785 -4.146879 -27.721186 -27.369622 [2,] -8.952602 16.480904 -9.838888 -9.36215 18.746879 2.521186 -6.030378 [,8] [,9] [,10] [,11] [,12] [1,] 4.335241 10.57118 -32.55643 -30.05938 55.5945 [2,] 16.064759 21.02882 -14.04357 -17.34062 95.8055 $out [1] -30.4 6.9 1.0 29.4 -2.9 -20.1 2.6 $group [1] 1 1 2 2 3 3 4 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-17.2, -17.2, -15.1, -8.5, -8.5, 11.7, 11.7, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/6j0gx1257951351.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,] 55.70 47.60 68.40 64.90 54.3 NA [2,] 87.25 76.95 83.80 84.35 89.3 NA [3,] 113.85 98.70 100.75 101.70 101.9 NA [4,] 121.75 136.55 113.60 126.25 127.0 NA [5,] 151.70 146.00 130.80 159.10 135.9 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 98.11432 71.51604 87.15802 82.58913 84.70478 NA [2,] 129.58568 125.88396 114.34198 120.81087 119.09522 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(55.7, 87.25, 113.85, 121.75, 151.7, 47.6, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/79esy1257951351.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,] 58.18 55.70 59.600 [2,] 84.88 87.30 84.350 [3,] 105.27 104.25 104.700 [4,] 125.36 123.50 125.725 [5,] 138.44 135.90 138.400 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 86.8068 87.73894 85.82858 [2,] 123.7332 120.76106 123.57142 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" > dev.off() null device 1 > > system("convert tmp/16kzh1257951351.ps tmp/16kzh1257951351.png") > system("convert tmp/2nmfy1257951351.ps tmp/2nmfy1257951351.png") > system("convert tmp/373k91257951351.ps tmp/373k91257951351.png") > system("convert tmp/458g71257951351.ps tmp/458g71257951351.png") > system("convert tmp/5jifb1257951351.ps tmp/5jifb1257951351.png") > system("convert tmp/6j0gx1257951351.ps tmp/6j0gx1257951351.png") > system("convert tmp/79esy1257951351.ps tmp/79esy1257951351.png") > > > proc.time() user system elapsed 1.540 1.460 2.792