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.00,102.83,109.50,115.91,107.94,110.86,118.89,123.38,113.33,116.38,122.04,125.47,115.62,117.91,122.40,125.05,114.18,114.74,120.63,123.68,112.84,115.64,122.32,124.59,116.33,117.45,125.64,128.38,119.87,121.22,128.98,131.35,121.35,123.72,131.06,134.55,125.93,128.90,136.19,140.34,130.48,134.68,141.05,145.44,136.21,139.85,147.13,151.44,143.62,148.55,153.54,159.79,152.55,155.84,160.38,164.22,156.40,160.05,165.60,171.15,161.90,167.21,171.34,176.83,166.27,172.30,176.71,182.99,172.07,178.17,182.20,188.49,176.88,182.13,185.32,192.86,180.27,184.92,187.82,194.94,184.36,188.80,193.42,199.76,188.78,191.49,194.87,198.28,183.24,204.87) > par1 = '4' > #'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] 90 > (np <- floor(n / par1)) [1] 22 > 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] 23 23 22 22 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 100.00 107.94 113.33 115.62 114.18 112.84 116.33 119.87 121.35 125.93 [2,] 102.83 110.86 116.38 117.91 114.74 115.64 117.45 121.22 123.72 128.90 [3,] 109.50 118.89 122.04 122.40 120.63 122.32 125.64 128.98 131.06 136.19 [4,] 115.91 123.38 125.47 125.05 123.68 124.59 128.38 131.35 134.55 140.34 [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 130.48 136.21 143.62 152.55 156.40 161.90 166.27 172.07 176.88 180.27 [2,] 134.68 139.85 148.55 155.84 160.05 167.21 172.30 178.17 182.13 184.92 [3,] 141.05 147.13 153.54 160.38 165.60 171.34 176.71 182.20 185.32 187.82 [4,] 145.44 151.44 159.79 164.22 171.15 176.83 182.99 188.49 192.86 194.94 [,21] [,22] [,23] [1,] 184.36 188.78 183.24 [2,] 188.80 191.49 204.87 [3,] 193.42 194.87 NA [4,] 199.76 198.28 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] 2.83 2.92 3.05 2.29 0.56 2.80 1.12 1.35 2.37 2.97 4.20 [2,] 6.67 8.03 5.66 4.49 5.89 6.68 8.19 7.76 7.34 7.29 6.37 [3,] 6.41 4.49 3.43 2.65 3.05 2.27 2.74 2.37 3.49 4.15 4.39 [4,] -7.97 -10.05 -9.85 -10.87 -10.84 -8.26 -8.51 -10.00 -8.62 -9.86 -9.23 [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [1,] 3.64 4.93 3.29 3.65 5.31 6.03 6.10 5.25 4.65 4.44 2.71 [2,] 7.28 4.99 4.54 5.55 4.13 4.41 4.03 3.19 2.90 4.62 3.38 [3,] 4.31 6.25 3.84 5.55 5.49 6.28 6.29 7.54 7.12 6.34 3.41 [4,] -7.82 -7.24 -7.82 -9.25 -10.56 -10.92 -11.61 -12.59 -10.58 -10.98 -15.04 [,23] [1,] 21.63 [2,] NA [3,] NA [4,] 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/152h51257976006.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/25za41257976006.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/3t88y1257976006.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/4jrlt1257976006.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] [1,] 100.000 102.830 109.50 115.91 [2,] 115.975 117.680 122.40 125.47 [3,] 136.210 139.850 144.09 148.44 [4,] 169.170 175.235 176.71 182.99 [5,] 188.780 204.870 194.87 199.76 $n [1] 23 23 22 22 $conf [,1] [,2] [,3] [,4] [1,] 118.6848 120.8883 125.7953 129.0640 [2,] 153.7352 158.8117 162.3847 167.8160 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5o5wy1257976006.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] [1,] 0.560 2.900 2.27 -12.59 [2,] 2.755 4.410 3.41 -10.87 [3,] 3.290 5.605 4.35 -9.93 [4,] 4.790 7.280 6.28 -8.51 [5,] 6.100 8.190 7.54 -7.24 $n [1] 23 22 22 22 $conf [,1] [,2] [,3] [,4] [1,] 2.619564 4.63822 3.38322 -10.724983 [2,] 3.960436 6.57178 5.31678 -9.135017 $out [1] 21.63 -15.04 $group [1] 1 4 $names [1] "1" "2" "3" "4" Warning message: In bxp(list(stats = c(0.559999999999988, 2.755, 3.28999999999999, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6zm401257976006.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] [1,] 100.000 107.940 113.330 115.620 114.180 112.840 116.330 119.870 121.350 [2,] 101.415 109.400 114.855 116.765 114.460 114.240 116.890 120.545 122.535 [3,] 106.165 114.875 119.210 120.155 117.685 118.980 121.545 125.100 127.390 [4,] 112.705 121.135 123.755 123.725 122.155 123.455 127.010 130.165 132.805 [5,] 115.910 123.380 125.470 125.050 123.680 124.590 128.380 131.350 134.550 [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [1,] 125.930 130.480 136.210 143.620 152.550 156.400 161.900 166.270 172.070 [2,] 127.415 132.580 138.030 146.085 154.195 158.225 164.555 169.285 175.120 [3,] 132.545 137.865 143.490 151.045 158.110 162.825 169.275 174.505 180.185 [4,] 138.265 143.245 149.285 156.665 162.300 168.375 174.085 179.850 185.345 [5,] 140.340 145.440 151.440 159.790 164.220 171.150 176.830 182.990 188.490 [,19] [,20] [,21] [,22] [,23] [1,] 176.880 180.270 184.36 188.780 183.240 [2,] 179.505 182.595 186.58 190.135 183.240 [3,] 183.725 186.370 191.11 193.180 194.055 [4,] 189.090 191.380 196.59 196.575 204.870 [5,] 192.860 194.940 199.76 198.280 204.870 $n [1] 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 2 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 97.2459 105.6044 112.179 114.6566 111.6060 111.7001 113.5502 117.5002 [2,] 115.0841 124.1456 126.241 125.6534 123.7640 126.2598 129.5398 132.6998 [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [1,] 119.2767 123.9735 129.4397 134.5986 142.6868 151.7071 154.8065 161.7463 [2,] 135.5033 141.1165 146.2904 152.3815 159.4032 164.5130 170.8435 176.8037 [,17] [,18] [,19] [,20] [,21] [,22] [,23] [1,] 166.1586 172.1072 176.1529 179.4299 183.2021 188.0924 169.8893 [2,] 182.8513 188.2628 191.2971 193.3101 199.0179 198.2676 218.2207 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" [16] "16" "17" "18" "19" "20" "21" "22" NA Warning message: In bxp(list(stats = c(100, 101.415, 106.165, 112.705, 115.91, 107.94, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7c73p1257976006.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,] 142.6270 136.210 142.5725 [2,] 144.7593 138.030 144.5150 [3,] 148.3784 141.970 147.8731 [4,] 152.1800 146.265 151.5563 [5,] 154.4950 148.440 153.8238 $n [1] 4 4 4 $conf [,1] [,2] [,3] [1,] 142.5161 135.4644 142.3105 [2,] 154.2407 148.4756 153.4357 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(142.626956521739, 144.759347826087, 148.378369565217, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/152h51257976006.ps tmp/152h51257976006.png") > system("convert tmp/25za41257976006.ps tmp/25za41257976006.png") > system("convert tmp/3t88y1257976006.ps tmp/3t88y1257976006.png") > system("convert tmp/4jrlt1257976006.ps tmp/4jrlt1257976006.png") > system("convert tmp/5o5wy1257976006.ps tmp/5o5wy1257976006.png") > system("convert tmp/6zm401257976006.ps tmp/6zm401257976006.png") > system("convert tmp/7c73p1257976006.ps tmp/7c73p1257976006.png") > > > proc.time() user system elapsed 1.252 0.994 1.634