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(1258,1199,1158,1427,934,709,1186,986,1033,1257,1105,1179,1092,1092,1087,2028,2039,2010,754,760,715,855,971,815,915,843,761,1858,2968,4061,3661,3269,2857,2568,2274,1987,683,381,71,1772,3485,5181,4479,3782,3067,2489,1903,1330,736,483,242,1334,2423,3523,2986,2462,1908,1575,1237,904) > 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,] 1258 1092 915 683 736 NA [2,] 1199 1092 843 381 483 NA [3,] 1158 1087 761 71 242 NA [4,] 1427 2028 1858 1772 1334 NA [5,] 934 2039 2968 3485 2423 NA [6,] 709 2010 4061 5181 3523 NA [7,] 1186 754 3661 4479 2986 NA [8,] 986 760 3269 3782 2462 NA [9,] 1033 715 2857 3067 1908 NA [10,] 1257 855 2568 2489 1575 NA [11,] 1105 971 2274 1903 1237 NA [12,] 1179 815 1987 1330 904 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -59 0 -72 -302 -253 NA [2,] -41 -5 -82 -310 -241 NA [3,] 269 941 1097 1701 1092 NA [4,] -493 11 1110 1713 1089 NA [5,] -225 -29 1093 1696 1100 NA [6,] 477 -1256 -400 -702 -537 NA [7,] -200 6 -392 -697 -524 NA [8,] 47 -45 -412 -715 -554 NA [9,] 224 140 -289 -578 -333 NA [10,] -152 116 -294 -586 -338 NA [11,] 74 -156 -287 -573 -333 NA [12,] -87 100 -1304 -594 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/1ybb61258127621.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/2hm5v1258127621.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/35qmn1258127621.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/4di3v1258127621.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,] 683 381 71 1334 934 709 754 760 715 855 971 815 [2,] 736 483 242 1427 2039 2010 1186 986 1033 1257 1105 904 [3,] 915 843 761 1772 2423 3523 2986 2462 1908 1575 1237 1179 [4,] 1092 1092 1087 1858 2968 4061 3661 3269 2857 2489 1903 1330 [5,] 1258 1199 1158 2028 3485 5181 4479 3782 3067 2568 2274 1330 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 663.4513 412.6821 163.9251 1467.456 1766.571 2073.769 1237.171 848.838 [2,] 1166.5487 1273.3179 1358.0749 2076.544 3079.429 4972.231 4734.829 4075.162 [,9] [,10] [,11] [,12] [1,] 619.1662 704.4719 673.1352 877.9895 [2,] 3196.8338 2445.5281 1800.8648 1480.0105 $out [1] 1987 $group [1] 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(683, 736, 915, 1092, 1258, 381, 483, 843, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5jqts1258127621.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,] -302 -310 941 -493 -225 -702 -697 -715 -578 -586 -573 -1304.0 [2,] -253 -241 941 11 -29 -702 -524 -554 -333 -338 -333 -949.0 [3,] -72 -82 1092 1089 1093 -537 -392 -412 -289 -294 -287 -340.5 [4,] -59 -41 1097 1110 1100 -400 -200 -45 140 -152 -156 6.5 [5,] 0 -5 1097 1713 1696 -400 6 47 224 116 74 100.0 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -209.07991 -223.3195 981.7708 312.4494 295.2514 -750.3924 -620.9376 [2,] 65.07991 59.3195 1202.2292 1865.5506 1890.7486 -323.6076 -163.0624 [,8] [,9] [,10] [,11] [,12] [1,] -771.65812 -623.22061 -425.4271 -412.0678 -1095.345 [2,] -52.34188 45.22061 -162.5729 -161.9322 414.345 $out [1] 269 1701 477 -1256 $group [1] 3 3 6 6 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-302, -253, -72, -59, 0, -310, -241, -82, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6gtpl1258127621.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,] 709.0 715.0 761.0 71.0 242.0 NA [2,] 1009.5 787.5 1386.5 1006.5 820.0 NA [3,] 1168.5 1029.0 2421.0 2196.0 1454.5 NA [4,] 1228.0 1551.0 3118.5 3633.5 2442.5 NA [5,] 1427.0 2039.0 4061.0 5181.0 3523.0 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1068.841 680.7625 1631.023 997.8077 714.4669 NA [2,] 1268.159 1377.2375 3210.977 3394.1923 2194.5331 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(709, 1009.5, 1168.5, 1228, 1427, 715, 787.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7rbks1258127621.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,] 663.8 761.0 664.50 [2,] 1089.9 1047.0 1015.50 [3,] 1716.3 1673.5 1757.75 [4,] 2310.8 2442.5 2275.50 [5,] 3096.8 3523.0 3035.50 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 1159.439 1037.003 1183.056 [2,] 2273.161 2309.997 2332.444 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(663.8, 1089.9, 1716.3, 2310.8, 3096.8, 761, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1ybb61258127621.ps tmp/1ybb61258127621.png") > system("convert tmp/2hm5v1258127621.ps tmp/2hm5v1258127621.png") > system("convert tmp/35qmn1258127621.ps tmp/35qmn1258127621.png") > system("convert tmp/4di3v1258127621.ps tmp/4di3v1258127621.png") > system("convert tmp/5jqts1258127621.ps tmp/5jqts1258127621.png") > system("convert tmp/6gtpl1258127621.ps tmp/6gtpl1258127621.png") > system("convert tmp/7rbks1258127621.ps tmp/7rbks1258127621.png") > > > proc.time() user system elapsed 1.210 0.952 1.509