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(102.1,102.86,102.99,103.73,105.02,104.43,104.63,104.93,105.87,105.66,106.76,106,107.22,107.33,107.11,108.86,107.72,107.88,108.38,107.72,108.41,109.9,111.45,112.18,113.34,113.46,114.06,115.54,116.39,115.94,116.97,115.94,115.91,116.43,116.26,116.35,117.9,117.7,117.53,117.86,117.65,116.51,115.93,115.31,115) > 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] 45 > (np <- floor(n / par1)) [1] 3 > 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] 4 4 4 4 4 4 4 4 4 3 3 3 > arr [,1] [,2] [,3] [,4] [1,] 102.10 107.22 113.34 117.90 [2,] 102.86 107.33 113.46 117.70 [3,] 102.99 107.11 114.06 117.53 [4,] 103.73 108.86 115.54 117.86 [5,] 105.02 107.72 116.39 117.65 [6,] 104.43 107.88 115.94 116.51 [7,] 104.63 108.38 116.97 115.93 [8,] 104.93 107.72 115.94 115.31 [9,] 105.87 108.41 115.91 115.00 [10,] 105.66 109.90 116.43 NA [11,] 106.76 111.45 116.26 NA [12,] 106.00 112.18 116.35 NA > darr [,1] [,2] [,3] [,4] [1,] 0.76 0.11 0.12 -0.20 [2,] 0.13 -0.22 0.60 -0.17 [3,] 0.74 1.75 1.48 0.33 [4,] 1.29 -1.14 0.85 -0.21 [5,] -0.59 0.16 -0.45 -1.14 [6,] 0.20 0.50 1.03 -0.58 [7,] 0.30 -0.66 -1.03 -0.62 [8,] 0.94 0.69 -0.03 -0.31 [9,] -0.21 1.49 0.52 NA [10,] 1.10 1.55 -0.17 NA [11,] -0.76 0.73 0.09 NA [12,] 1.22 1.16 1.55 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/1mf0x1257432200.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/2rwqr1257432200.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/3p2z31257432200.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/4nlab1257432200.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] [1,] 102.10 102.860 102.990 103.730 105.020 104.430 104.630 104.930 105.870 [2,] 104.66 105.095 105.050 106.295 106.370 106.155 106.505 106.325 107.140 [3,] 110.28 110.395 110.585 112.200 112.055 111.910 112.155 111.515 111.705 [4,] 115.62 115.580 115.795 116.700 117.020 116.225 116.450 115.625 115.455 [5,] 117.90 117.700 117.530 117.860 117.650 116.510 116.970 115.940 115.910 [,10] [,11] [,12] [1,] 105.660 106.760 106.000 [2,] 107.780 109.105 109.090 [3,] 109.900 111.450 112.180 [4,] 113.165 113.855 114.265 [5,] 116.430 116.260 116.350 $n [1] 4 4 4 4 4 4 4 4 4 3 3 3 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 101.6216 102.1119 102.0965 103.9801 103.6415 103.9547 104.2984 104.168 [2,] 118.9384 118.6781 119.0736 120.4200 120.4685 119.8653 120.0116 118.862 [,9] [,10] [,11] [,12] [1,] 105.1362 104.9877 107.1170 107.4593 [2,] 118.2738 114.8123 115.7830 116.9007 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(102.1, 104.66, 110.28, 115.62, 117.9, 102.86, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/5xgxv1257432200.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] [1,] -0.200 -0.220 0.330 -1.140 -1.140 -0.580 -1.030 -0.310 -0.210 -0.170 [2,] -0.045 -0.195 0.535 -0.675 -0.865 -0.190 -0.845 -0.170 0.155 0.465 [3,] 0.115 -0.020 1.110 0.320 -0.520 0.350 -0.640 0.330 0.520 1.100 [4,] 0.440 0.365 1.615 1.070 -0.145 0.765 -0.160 0.815 1.005 1.325 [5,] 0.760 0.600 1.750 1.290 0.160 1.030 0.300 0.940 1.490 1.550 [,11] [,12] [1,] -0.760 1.160 [2,] -0.335 1.190 [3,] 0.090 1.220 [4,] 0.410 1.385 [5,] 0.730 1.550 $n [1] 4 4 4 4 4 4 4 4 3 3 3 3 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] -0.26815 -0.4624 0.2568 -1.05855 -1.0888 -0.40445 -1.18115 -0.44815 [2,] 0.49815 0.4224 1.9632 1.69855 0.0488 1.10445 -0.09885 1.10815 [,9] [,10] [,11] [,12] [1,] -0.2553814 0.3154965 -0.589599 1.042118 [2,] 1.2953814 1.8845035 0.769599 1.397882 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-0.200000000000003, -0.0450000000000017, 0.114999999999995, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/67kth1257432200.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] [1,] 102.100 107.110 113.34 115.00 [2,] 103.360 107.525 114.80 115.93 [3,] 104.780 108.130 115.94 117.53 [4,] 105.765 109.380 116.37 117.70 [5,] 106.760 111.450 116.97 117.90 $n [1] 12 12 12 9 $conf [,1] [,2] [,3] [,4] [1,] 103.6831 107.2839 115.2239 116.5978 [2,] 105.8769 108.9761 116.6561 118.4622 $out [1] 112.18 $group [1] 2 $names [1] "1" "2" "3" NA Warning message: In bxp(list(stats = c(102.1, 103.36, 104.78, 105.765, 106.76, 107.11, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/7gja71257432200.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,] 110.1400 109.900 110.2100 [2,] 110.5429 110.490 110.4881 [3,] 111.2438 111.610 111.4906 [4,] 111.4938 112.105 111.7469 [5,] 111.6950 112.200 111.8750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 110.8101 110.8734 110.9165 [2,] 111.6774 112.3466 112.0647 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(110.14, 110.542916666667, 111.24375, 111.49375, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1mf0x1257432200.ps tmp/1mf0x1257432200.png") > system("convert tmp/2rwqr1257432200.ps tmp/2rwqr1257432200.png") > system("convert tmp/3p2z31257432200.ps tmp/3p2z31257432200.png") > system("convert tmp/4nlab1257432200.ps tmp/4nlab1257432200.png") > system("convert tmp/5xgxv1257432200.ps tmp/5xgxv1257432200.png") > system("convert tmp/67kth1257432200.ps tmp/67kth1257432200.png") > system("convert tmp/7gja71257432200.ps tmp/7gja71257432200.png") > > > proc.time() user system elapsed 1.640 1.560 2.356