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(139.72,139.91,139.97,139.98,140.03,140.03,140.26,142.15,143.54,144.5,145.65,146.47,147.36,147.89,149.23,149.93,150.24,150.15,150.31,150.31,150.37,107.59,107.59,107.59,107.59,107.59,107.58,108.28,109.71,110.21,110.27,110.32,110.33,110.33,113.38,119.37,123.37,123.75,124.13,124.59,124.59,124.68,124.7,124.7,124.7,124.7,124.71,125.55,127.41,127.73,127.8,127.91,127.94,128.01,128.01,128.01,128.01,128.01,128.86,124.74) > 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,] 139.72 147.36 107.59 123.37 127.41 NA [2,] 139.91 147.89 107.59 123.75 127.73 NA [3,] 139.97 149.23 107.58 124.13 127.80 NA [4,] 139.98 149.93 108.28 124.59 127.91 NA [5,] 140.03 150.24 109.71 124.59 127.94 NA [6,] 140.03 150.15 110.21 124.68 128.01 NA [7,] 140.26 150.31 110.27 124.70 128.01 NA [8,] 142.15 150.31 110.32 124.70 128.01 NA [9,] 143.54 150.37 110.33 124.70 128.01 NA [10,] 144.50 107.59 110.33 124.70 128.01 NA [11,] 145.65 107.59 113.38 124.71 128.86 NA [12,] 146.47 107.59 119.37 125.55 124.74 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.19 0.53 0.00 0.38 0.32 NA [2,] 0.06 1.34 -0.01 0.38 0.07 NA [3,] 0.01 0.70 0.70 0.46 0.11 NA [4,] 0.05 0.31 1.43 0.00 0.03 NA [5,] 0.00 -0.09 0.50 0.09 0.07 NA [6,] 0.23 0.16 0.06 0.02 0.00 NA [7,] 1.89 0.00 0.05 0.00 0.00 NA [8,] 1.39 0.06 0.01 0.00 0.00 NA [9,] 0.96 -42.78 0.00 0.00 0.00 NA [10,] 1.15 0.00 3.05 0.01 0.85 NA [11,] 0.82 0.00 5.99 0.84 -4.12 NA [12,] 0.89 0.00 4.00 1.86 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/1gk391258161674.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/28bcn1258161674.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/3fu001258161674.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/4u6xx1258161674.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] [1,] 107.59 107.59 107.58 108.28 109.71 110.21 110.27 110.32 110.33 107.59 [2,] 123.37 123.75 124.13 124.59 124.59 124.68 124.70 124.70 124.70 110.33 [3,] 127.41 127.73 127.80 127.91 127.94 128.01 128.01 128.01 128.01 124.70 [4,] 139.72 139.91 139.97 139.98 140.03 140.03 140.26 142.15 143.54 128.01 [5,] 147.36 147.89 149.23 149.93 150.24 150.15 150.31 150.31 150.37 144.50 [,11] [,12] [1,] 107.59 119.37 [2,] 113.38 119.37 [3,] 124.71 124.74 [4,] 128.86 125.55 [5,] 145.65 125.55 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 115.8571 116.3114 116.6075 117.0355 117.0301 117.1637 117.0153 115.6799 [2,] 138.9629 139.1486 138.9925 138.7845 138.8499 138.8563 139.0047 140.3401 [,9] [,10] [,11] [,12] [1,] 114.6977 112.2074 113.7719 120.3732 [2,] 141.3223 137.1926 135.6481 129.1068 $out [1] 146.47 107.59 $group [1] 12 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(107.59, 123.37, 127.41, 139.72, 147.36, 107.59, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/552tm1258161674.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,] 0.00 -0.01 0.01 0.00 -0.09 0.00 0.00 0.00 0 0.00 0.00 0.000 [2,] 0.19 0.06 0.11 0.03 0.00 0.02 0.00 0.00 0 0.01 0.00 0.445 [3,] 0.32 0.07 0.46 0.05 0.07 0.06 0.00 0.01 0 0.85 0.82 1.375 [4,] 0.38 0.38 0.70 0.31 0.09 0.16 0.05 0.06 0 1.15 0.84 2.930 [5,] 0.53 0.38 0.70 0.31 0.09 0.23 0.05 0.06 0 1.15 0.84 4.000 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.1857465 -0.1561112 0.04310749 -0.1478473 0.006406227 -0.03892365 [2,] 0.4542535 0.2961112 0.87689251 0.2478473 0.133593773 0.15892365 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.03532987 -0.03239585 0 0.04447887 0.2264581 -0.58815 [2,] 0.03532987 0.05239585 0 1.65552113 1.4135419 3.33815 $out [1] 1.34 1.43 0.50 1.89 1.39 0.96 -42.78 3.05 5.99 -4.12 $group [1] 2 4 5 7 8 9 9 10 11 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0, 0.189999999999998, 0.320000000000007, 0.379999999999995, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6fbki1258161674.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,] 139.720 107.590 107.580 124.13 127.410 NA [2,] 139.975 127.475 107.935 124.36 127.765 NA [3,] 140.145 149.580 110.240 124.69 127.975 NA [4,] 144.020 150.275 110.330 124.70 128.010 NA [5,] 146.470 150.370 113.380 124.71 128.010 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 138.3000 139.1808 109.1476 124.5349 127.8633 NA [2,] 141.9900 159.9792 111.3324 124.8451 128.0867 NA $out [1] 119.37 123.37 123.75 125.55 128.86 124.74 $group [1] 3 4 4 4 5 5 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(139.72, 139.975, 140.145, 144.02, 146.47, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/752wi1258161674.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,] 123.026 124.700 119.1700 [2,] 126.917 126.075 127.0025 [3,] 129.940 127.855 132.1675 [4,] 130.663 128.010 132.4175 [5,] 131.390 128.010 134.1200 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 128.2314 126.9724 129.6977 [2,] 131.6486 128.7376 134.6373 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(123.026, 126.917, 129.94, 130.663, 131.39, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1gk391258161674.ps tmp/1gk391258161674.png") > system("convert tmp/28bcn1258161674.ps tmp/28bcn1258161674.png") > system("convert tmp/3fu001258161674.ps tmp/3fu001258161674.png") > system("convert tmp/4u6xx1258161674.ps tmp/4u6xx1258161674.png") > system("convert tmp/552tm1258161674.ps tmp/552tm1258161674.png") > system("convert tmp/6fbki1258161674.ps tmp/6fbki1258161674.png") > system("convert tmp/752wi1258161674.ps tmp/752wi1258161674.png") > > > proc.time() user system elapsed 1.197 0.957 1.505