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(100.7,105.9,115.4,113.9,121.5,119.5,115.8,116.3,113.5,110.7,116.9,141.1,101.8,102.9,119,112.8,120.9,123.1,121.9,119.4,110.9,116.8,120.6,143.3,106.4,106.9,125.6,110.9,127,124.3,121.3,124.4,113.2,120.2,122.6,143.3,106.5,105.9,114,121.6,119.7,122.5,126.5,118.2,115.5,120.1,115.3,146.5,107.7,106.3,121.8,115.8,115.4,124.3,121.7,118.7,113.5,113.4,115.1,144.2,100.9,103.2,121.3,111.9,117.3,124.2,122,119.6,114.9,112.2,115.3,143,104,105.3,124.3,114.1,124.8,131.9,125.8,125.2,119.8,116.2,120.2,148.6,109.4,109.6,135.2,115.2,129.1,138.8,126,130.7,120.5,126.5,128,151.7,114.8,118.9,131.5,124.8,137,137.1,137,131.3,126,129.7,125.1,157.8) > 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] 108 > (np <- floor(n / par1)) [1] 9 > 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 9 9 9 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 100.7 101.8 106.4 106.5 107.7 100.9 104.0 109.4 114.8 NA [2,] 105.9 102.9 106.9 105.9 106.3 103.2 105.3 109.6 118.9 NA [3,] 115.4 119.0 125.6 114.0 121.8 121.3 124.3 135.2 131.5 NA [4,] 113.9 112.8 110.9 121.6 115.8 111.9 114.1 115.2 124.8 NA [5,] 121.5 120.9 127.0 119.7 115.4 117.3 124.8 129.1 137.0 NA [6,] 119.5 123.1 124.3 122.5 124.3 124.2 131.9 138.8 137.1 NA [7,] 115.8 121.9 121.3 126.5 121.7 122.0 125.8 126.0 137.0 NA [8,] 116.3 119.4 124.4 118.2 118.7 119.6 125.2 130.7 131.3 NA [9,] 113.5 110.9 113.2 115.5 113.5 114.9 119.8 120.5 126.0 NA [10,] 110.7 116.8 120.2 120.1 113.4 112.2 116.2 126.5 129.7 NA [11,] 116.9 120.6 122.6 115.3 115.1 115.3 120.2 128.0 125.1 NA [12,] 141.1 143.3 143.3 146.5 144.2 143.0 148.6 151.7 157.8 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 5.2 1.1 0.5 -0.6 -1.4 2.3 1.3 0.2 4.1 NA [2,] 9.5 16.1 18.7 8.1 15.5 18.1 19.0 25.6 12.6 NA [3,] -1.5 -6.2 -14.7 7.6 -6.0 -9.4 -10.2 -20.0 -6.7 NA [4,] 7.6 8.1 16.1 -1.9 -0.4 5.4 10.7 13.9 12.2 NA [5,] -2.0 2.2 -2.7 2.8 8.9 6.9 7.1 9.7 0.1 NA [6,] -3.7 -1.2 -3.0 4.0 -2.6 -2.2 -6.1 -12.8 -0.1 NA [7,] 0.5 -2.5 3.1 -8.3 -3.0 -2.4 -0.6 4.7 -5.7 NA [8,] -2.8 -8.5 -11.2 -2.7 -5.2 -4.7 -5.4 -10.2 -5.3 NA [9,] -2.8 5.9 7.0 4.6 -0.1 -2.7 -3.6 6.0 3.7 NA [10,] 6.2 3.8 2.4 -4.8 1.7 3.1 4.0 1.5 -4.6 NA [11,] 24.2 22.7 20.7 31.2 29.1 27.7 28.4 23.7 32.7 NA [12,] -39.3 -36.9 -36.8 -38.8 -43.3 -39.0 -39.2 -36.9 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/15z2f1259675503.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/2rkmh1259675503.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/3wjs81259675503.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/4rhxb1259675503.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,] 100.7 102.9 114.0 110.9 115.4 119.5 115.8 116.3 110.9 110.7 115.1 141.1 [2,] 101.8 105.3 119.0 112.8 119.7 123.1 121.7 118.7 113.5 113.4 115.3 143.3 [3,] 106.4 105.9 121.8 114.1 121.5 124.3 122.0 119.6 114.9 116.8 120.2 144.2 [4,] 107.7 106.9 125.6 115.8 127.0 131.9 126.0 125.2 119.8 120.2 122.6 148.6 [5,] 114.8 106.9 135.2 115.8 137.0 138.8 126.5 131.3 126.0 129.7 128.0 151.7 $n [1] 9 9 9 9 9 9 9 9 9 9 9 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 103.2927 105.0573 118.324 112.52 117.6553 119.6653 119.7353 116.1767 [2,] 109.5073 106.7427 125.276 115.68 125.3447 128.9347 124.2647 123.0233 [,9] [,10] [,11] [,12] [1,] 111.582 113.2187 116.3553 141.4087 [2,] 118.218 120.3813 124.0447 146.9913 $out [1] 109.6 118.9 121.6 124.8 137.0 157.8 $group [1] 2 2 4 4 7 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(100.7, 101.8, 106.4, 107.7, 114.8, 102.9, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5548x1259675503.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,] -1.4 8.1 -14.7 -1.9 -2.7 -6.1 -5.7 -11.2 -3.6 1.5 20.7 -39.30 [2,] 0.2 12.6 -10.2 5.4 0.1 -3.7 -3.0 -8.5 -2.7 1.5 23.7 -39.25 [3,] 1.1 16.1 -6.7 8.1 2.8 -2.6 -2.4 -5.3 3.7 2.4 27.7 -38.90 [4,] 2.3 18.7 -6.0 12.2 7.1 -1.2 0.5 -4.7 5.9 3.8 29.1 -36.90 [5,] 5.2 25.6 -1.5 16.1 9.7 -0.1 4.7 -2.7 7.0 6.2 32.7 -36.80 $n [1] 9 9 9 9 9 9 9 9 9 9 9 8 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] -0.006 12.88733 -8.912 4.518667 -0.8866667 -3.916667 -4.2433333 -7.301333 [2,] 2.206 19.31267 -4.488 11.681333 6.4866667 -1.283333 -0.5566667 -3.298667 [,9] [,10] [,11] [,12] [1,] -0.8293333 1.188667 24.856 -40.21274 [2,] 8.2293333 3.611333 30.544 -37.58726 $out [1] 7.6 -20.0 4.0 -12.8 -8.3 -4.8 -4.6 -43.3 $group [1] 3 3 6 6 7 10 10 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-1.40000000000001, 0.199999999999989, 1.10000000000001, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/678x81259675503.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] [1,] 105.9 101.80 106.40 105.90 106.30 100.90 104.00 109.40 114.80 NA [2,] 112.1 111.85 112.05 114.65 113.45 112.05 115.15 117.85 124.95 NA [3,] 115.6 119.20 121.95 118.95 115.60 116.30 122.25 127.25 130.50 NA [4,] 118.2 121.40 125.00 122.05 121.75 121.65 125.50 132.95 137.00 NA [5,] 121.5 123.10 143.30 126.50 124.30 124.20 131.90 151.70 137.10 NA $n [1] 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 112.8177 114.8442 116.0434 115.5748 111.8143 111.9214 117.5293 120.3628 [2,] 118.3823 123.5558 127.8566 122.3252 119.3857 120.6786 126.9707 134.1372 [,9] [,10] [1,] 125.0039 NA [2,] 135.9961 NA $out [1] 100.7 141.1 143.3 146.5 144.2 143.0 148.6 157.8 $group [1] 1 1 2 4 5 6 7 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" NA Warning message: In bxp(list(stats = c(105.9, 112.1, 115.6, 118.2, 121.5, 101.8, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7yu811259675503.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,] 105.8000 105.9 104.750 [2,] 116.0444 114.5 115.475 [3,] 121.2722 119.9 120.450 [4,] 123.9278 121.9 123.600 [5,] 127.3000 124.3 127.500 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 117.6766 116.5248 116.7441 [2,] 124.8679 123.2752 124.1559 $out [1] 146.6111 144.2000 145.9500 $group [1] 1 2 3 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(105.8, 116.044444444444, 121.272222222222, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/15z2f1259675503.ps tmp/15z2f1259675503.png") > system("convert tmp/2rkmh1259675503.ps tmp/2rkmh1259675503.png") > system("convert tmp/3wjs81259675503.ps tmp/3wjs81259675503.png") > system("convert tmp/4rhxb1259675503.ps tmp/4rhxb1259675503.png") > system("convert tmp/5548x1259675503.ps tmp/5548x1259675503.png") > system("convert tmp/678x81259675503.ps tmp/678x81259675503.png") > system("convert tmp/7yu811259675503.ps tmp/7yu811259675503.png") > > > proc.time() user system elapsed 1.197 0.925 1.545