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(108.01,101.21,119.93,94.76,95.26,117.96,115.86,111.44,108.16,108.77,109.45,124.83,115.31,109.49,124.24,92.85,98.42,120.88,111.72,116.1,109.37,111.65,114.29,133.68,114.27,126.49,131,104,108.88,128.48,132.44,128.04,116.35,120.93,118.59,133.1,121.05,127.62,135.44,114.88,114.34,128.85,138.9,129.44,114.96,127.98,127.03,128.75,137.91,128.37,135.9,122.19,113.08,136.2,138,115.24,110.95,99.23,102.39,112.67) > 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,] 108.01 115.31 114.27 121.05 137.91 NA [2,] 101.21 109.49 126.49 127.62 128.37 NA [3,] 119.93 124.24 131.00 135.44 135.90 NA [4,] 94.76 92.85 104.00 114.88 122.19 NA [5,] 95.26 98.42 108.88 114.34 113.08 NA [6,] 117.96 120.88 128.48 128.85 136.20 NA [7,] 115.86 111.72 132.44 138.90 138.00 NA [8,] 111.44 116.10 128.04 129.44 115.24 NA [9,] 108.16 109.37 116.35 114.96 110.95 NA [10,] 108.77 111.65 120.93 127.98 99.23 NA [11,] 109.45 114.29 118.59 127.03 102.39 NA [12,] 124.83 133.68 133.10 128.75 112.67 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -6.80 -5.82 12.22 6.57 -9.54 NA [2,] 18.72 14.75 4.51 7.82 7.53 NA [3,] -25.17 -31.39 -27.00 -20.56 -13.71 NA [4,] 0.50 5.57 4.88 -0.54 -9.11 NA [5,] 22.70 22.46 19.60 14.51 23.12 NA [6,] -2.10 -9.16 3.96 10.05 1.80 NA [7,] -4.42 4.38 -4.40 -9.46 -22.76 NA [8,] -3.28 -6.73 -11.69 -14.48 -4.29 NA [9,] 0.61 2.28 4.58 13.02 -11.72 NA [10,] 0.68 2.64 -2.34 -0.95 3.16 NA [11,] 15.38 19.39 14.51 1.72 10.28 NA [12,] -9.52 -19.41 -12.05 9.16 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/13nh31257762819.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/25h3g1257762819.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/3z3hf1257762819.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/4pp571257762819.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,] 108.01 101.21 119.93 92.85 95.26 117.96 111.72 111.44 108.16 99.23 [2,] 114.27 109.49 124.24 94.76 98.42 120.88 115.86 115.24 109.37 108.77 [3,] 115.31 126.49 131.00 104.00 108.88 128.48 132.44 116.10 110.95 111.65 [4,] 121.05 127.62 135.44 114.88 113.08 128.85 138.00 128.04 114.96 120.93 [5,] 121.05 128.37 135.90 122.19 114.34 136.20 138.90 129.44 116.35 127.98 [,11] [,12] [1,] 102.39 112.67 [2,] 109.45 124.83 [3,] 114.29 128.75 [4,] 118.59 133.10 [5,] 127.03 133.68 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 110.5193 113.6794 123.0861 89.78326 98.52128 122.8484 116.7959 107.0556 [2,] 120.1007 139.3006 138.9139 118.21674 119.23872 134.1116 148.0841 125.1444 [,9] [,10] [,11] [,12] [1,] 107.0001 103.0578 107.8317 122.9064 [2,] 114.8999 120.2422 120.7483 134.5936 $out [1] 137.91 $group [1] 1 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(108.01, 114.27, 115.31, 121.05, 121.05, 101.21, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/5f0301257762819.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,] -9.54 4.51 -31.39 -0.54 19.60 -9.16 -9.46 -14.48 0.61 -2.34 10.28 -19.410 [2,] -6.80 7.53 -27.00 -0.54 19.60 -2.10 -9.46 -11.69 0.61 -0.95 10.28 -15.730 [3,] -5.82 7.82 -25.17 0.50 22.46 1.80 -4.42 -6.73 2.28 0.68 14.51 -10.785 [4,] 6.57 14.75 -20.56 4.88 22.70 3.96 -4.40 -4.29 4.58 2.64 15.38 -0.180 [5,] 12.22 18.72 -13.71 5.57 23.12 10.05 -4.40 -3.28 4.58 3.16 19.39 9.160 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -15.267208 2.718366 -29.72049 -3.329758 20.26955 -2.481981 -7.9953833 [2,] 3.627208 12.921634 -20.61951 4.329758 24.65045 6.081981 -0.8446167 [,8] [,9] [,10] [,11] [,12] [1,] -11.958821 -0.525192 -1.856685 10.90635 -23.0695 [2,] -1.501179 5.085192 3.216685 18.11365 1.4995 $out [1] -9.11 14.51 4.38 -22.76 13.02 -11.72 1.72 $group [1] 4 5 7 7 9 9 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-9.54, -6.80000000000001, -5.82000000000001, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/63yvm1257762819.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,] 94.76 98.420 104.00 114.340 99.230 NA [2,] 104.61 109.430 115.31 118.005 111.810 NA [3,] 109.11 113.005 123.71 127.800 118.715 NA [4,] 116.91 118.490 129.74 129.145 136.050 NA [5,] 124.83 124.240 133.10 138.900 138.000 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 103.4999 108.8727 117.1284 122.7190 107.6590 NA [2,] 114.7201 117.1373 130.2916 132.8810 129.7710 NA $out [1] 92.85 133.68 $group [1] 2 2 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(94.76, 104.61, 109.11, 116.91, 124.83, 98.42, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/70j6w1257762819.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.736 104.000 104.8200 [2,] 112.835 111.300 113.0925 [3,] 118.973 115.705 118.1075 [4,] 126.540 128.615 125.8975 [5,] 129.302 132.440 129.8400 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 112.7221 107.8075 112.2671 [2,] 125.2239 123.6025 123.9479 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(105.736, 112.835, 118.973, 126.54, 129.302, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/13nh31257762819.ps tmp/13nh31257762819.png") > system("convert tmp/25h3g1257762819.ps tmp/25h3g1257762819.png") > system("convert tmp/3z3hf1257762819.ps tmp/3z3hf1257762819.png") > system("convert tmp/4pp571257762819.ps tmp/4pp571257762819.png") > system("convert tmp/5f0301257762819.ps tmp/5f0301257762819.png") > system("convert tmp/63yvm1257762819.ps tmp/63yvm1257762819.png") > system("convert tmp/70j6w1257762819.ps tmp/70j6w1257762819.png") > > > proc.time() user system elapsed 1.500 1.530 2.814