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(152,148,148,157,157,162,174,158,166,161,147,160,157,147,144,151,154,143,144,137,127,122,124,121,122,112,114,109,117,123,126,127,117,109,105,107,106,111,106,79,112,103,106,123,118,125,122,126,126,132,134,135,135,133,133,127,129,123,121,122,122,120,118,117,121,116,118,115,115,114,114,111) > 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] 72 > (np <- floor(n / par1)) [1] 6 > 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] 6 6 6 6 6 6 6 6 6 6 6 6 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 152 157 122 106 126 122 NA [2,] 148 147 112 111 132 120 NA [3,] 148 144 114 106 134 118 NA [4,] 157 151 109 79 135 117 NA [5,] 157 154 117 112 135 121 NA [6,] 162 143 123 103 133 116 NA [7,] 174 144 126 106 133 118 NA [8,] 158 137 127 123 127 115 NA [9,] 166 127 117 118 129 115 NA [10,] 161 122 109 125 123 114 NA [11,] 147 124 105 122 121 114 NA [12,] 160 121 107 126 122 111 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -4 -10 -10 5 6 -2 NA [2,] 0 -3 2 -5 2 -2 NA [3,] 9 7 -5 -27 1 -1 NA [4,] 0 3 8 33 0 4 NA [5,] 5 -11 6 -9 -2 -5 NA [6,] 12 1 3 3 0 2 NA [7,] -16 -7 1 17 -6 -3 NA [8,] 8 -10 -10 -5 2 0 NA [9,] -5 -5 -8 7 -6 -1 NA [10,] -14 2 -4 -3 -2 0 NA [11,] 13 -3 2 4 1 -3 NA [12,] -3 1 -1 0 0 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/1i19o1258124419.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/26rsr1258124419.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/37v5q1258124419.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/4kbqn1258124419.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,] 106 111 106 79 112 103 106.0 115 115.0 109.0 105.0 107.0 [2,] 122 112 114 109 117 116 118.0 123 117.0 114.0 114.0 111.0 [3,] 124 126 126 126 128 128 129.5 127 122.5 122.5 121.5 121.5 [4,] 152 147 144 151 154 143 144.0 137 129.0 125.0 124.0 126.0 [5,] 157 148 148 157 157 162 174.0 158 129.0 125.0 124.0 126.0 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 104.6490 103.4239 106.6490 98.90864 104.1338 110.5841 112.7292 117.9695 [2,] 143.3510 148.5761 145.3510 153.09136 151.8662 145.4159 146.2708 136.0305 [,9] [,10] [,11] [,12] [1,] 114.7596 115.4046 115.0497 111.8245 [2,] 130.2404 129.5954 127.9503 131.1755 $out [1] 166 161 147 160 $group [1] 9 10 11 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(106, 122, 124, 152, 157, 111, 112, 126, 147, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5uv041258124419.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,] -10 -5 -5 0.0 -11.0 0.0 -16.0 -10.0 -8 -4.0 -3.0 -1 [2,] -10 -3 -5 0.0 -9.0 1.0 -7.0 -10.0 -6 -4.0 -3.0 -1 [3,] -3 -1 0 3.5 -3.5 2.5 -4.5 -2.5 -5 -2.5 1.5 0 [4,] 5 2 7 8.0 5.0 3.0 1.0 2.0 -1 0.0 4.0 0 [5,] 6 2 9 8.0 6.0 3.0 1.0 8.0 -1 2.0 13.0 1 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -12.675484 -4.225161 -7.740388 -1.660258 -12.530452 1.209935 -9.6602584 [2,] 6.675484 2.225161 7.740388 8.660258 5.530452 3.790065 0.6602584 [,8] [,9] [,10] [,11] [,12] [1,] -10.240388 -8.225161 -5.0801292 -3.015226 -0.7065975 [2,] 5.240388 -1.774839 0.0801292 6.015226 0.7065975 $out [1] -27 33 12 17 7 -14 -3 $group [1] 3 4 6 7 9 10 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-10, -10, -3, 5, 6, -5, -3, -1, 2, 2, -5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6tetu1258124419.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] [1,] 147.0 121.0 105.0 103.0 121.0 111.0 NA [2,] 150.0 125.5 109.0 106.0 124.5 114.5 NA [3,] 157.5 143.5 115.5 111.5 130.5 116.5 NA [4,] 161.5 149.0 122.5 122.5 133.5 119.0 NA [5,] 174.0 157.0 127.0 126.0 135.0 122.0 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 152.2548 132.7815 109.3426 103.9742 126.3950 114.4475 NA [2,] 162.7452 154.2185 121.6574 119.0258 134.6050 118.5525 NA $out [1] 79 $group [1] 4 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(147, 150, 157.5, 161.5, 174, 121, 125.5, 143.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7cgqw1258124419.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,] 122.1667 121.5 119.2500 [2,] 125.1667 122.5 121.5625 [3,] 128.5000 126.0 128.8125 [4,] 131.0000 127.5 129.9375 [5,] 133.5000 129.5 133.7500 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 125.8394 123.7195 124.9926 [2,] 131.1606 128.2805 132.6324 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(122.166666666667, 125.166666666667, 128.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1i19o1258124419.ps tmp/1i19o1258124419.png") > system("convert tmp/26rsr1258124419.ps tmp/26rsr1258124419.png") > system("convert tmp/37v5q1258124419.ps tmp/37v5q1258124419.png") > system("convert tmp/4kbqn1258124419.ps tmp/4kbqn1258124419.png") > system("convert tmp/5uv041258124419.ps tmp/5uv041258124419.png") > system("convert tmp/6tetu1258124419.ps tmp/6tetu1258124419.png") > system("convert tmp/7cgqw1258124419.ps tmp/7cgqw1258124419.png") > > > proc.time() user system elapsed 1.201 0.944 1.487