R version 2.6.2 (2008-02-08) 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. Natural language support but running in an English locale 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(138463,138529,138421,138674,138848,139174,139565,139585,139500,139756,140245,140138,140224,140354,140563,141244,141597,141708,142055,142457,142429,142613,142564,142778,143086,143362,143619,143791,144088,144369,144295,144671,144846,145395,145583,145949,145915,145888,146145,145713,145913,146087,146045,145753,146260,146016,146647,146211,146248) > 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] 49 > (np <- floor(n / par1)) [1] 4 > 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 4 4 4 4 4 4 4 4 4 4 4 > arr [,1] [,2] [,3] [,4] [,5] [1,] 138463 140224 143086 145915 146248 [2,] 138529 140354 143362 145888 NA [3,] 138421 140563 143619 146145 NA [4,] 138674 141244 143791 145713 NA [5,] 138848 141597 144088 145913 NA [6,] 139174 141708 144369 146087 NA [7,] 139565 142055 144295 146045 NA [8,] 139585 142457 144671 145753 NA [9,] 139500 142429 144846 146260 NA [10,] 139756 142613 145395 146016 NA [11,] 140245 142564 145583 146647 NA [12,] 140138 142778 145949 146211 NA > darr [,1] [,2] [,3] [,4] [,5] [1,] 66 130 276 -27 NA [2,] -108 209 257 257 NA [3,] 253 681 172 -432 NA [4,] 174 353 297 200 NA [5,] 326 111 281 174 NA [6,] 391 347 -74 -42 NA [7,] 20 402 376 -292 NA [8,] -85 -28 175 507 NA [9,] 256 184 549 -244 NA [10,] 489 -49 188 631 NA [11,] -107 214 366 -436 NA [12,] 86 308 -34 37 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/freestat/rcomp/tmp/1dc0r1209303853.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/freestat/rcomp/tmp/2rln31209303853.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/freestat/rcomp/tmp/3jb271209303853.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/freestat/rcomp/tmp/4izto1209303853.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,] 138463 138529.0 138421 138674.0 138848.0 139174.0 139565 139585 139500.0 [2,] 140224 139441.5 139492 139959.0 140222.5 140441.0 140810 141021 140964.5 [3,] 143086 141858.0 142091 142517.5 142842.5 143038.5 143175 143564 143637.5 [4,] 145915 144625.0 144882 144752.0 145000.5 145228.0 145170 145212 145553.0 [5,] 146248 145888.0 146145 145713.0 145913.0 146087.0 146045 145753 146260.0 [,10] [,11] [,12] [1,] 139756.0 140245.0 140138.0 [2,] 141184.5 141404.5 141458.0 [3,] 144004.0 144073.5 144363.5 [4,] 145705.5 146115.0 146080.0 [5,] 146016.0 146647.0 146211.0 $n [1] 5 4 4 4 4 4 4 4 4 4 4 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 139064.8 137763.0 137832.9 138731.0 139067.9 139256.8 139730.6 140253.1 [2,] 147107.2 145953.0 146349.1 146304.0 146617.1 146820.2 146619.4 146874.9 [,9] [,10] [,11] [,12] [1,] 140012.6 140432.4 140352.2 140712.1 [2,] 147262.4 147575.6 147794.8 148014.9 $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(138463, 140224, 143086, 145915, 146248, 138529, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/5g5km1209303853.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,] -27.0 -108.0 -432.0 174.0 111.0 -74.0 -292 -85.0 -244.0 -49.0 -436.0 -34.0 [2,] 19.5 50.5 -130.0 187.0 142.5 -58.0 -136 -56.5 -30.0 69.5 -271.5 1.5 [3,] 98.0 233.0 212.5 248.5 227.5 152.5 198 73.5 220.0 338.5 53.5 61.5 [4,] 203.0 257.0 467.0 325.0 303.5 369.0 389 341.0 402.5 560.0 290.0 197.0 [5,] 276.0 257.0 681.0 353.0 326.0 391.0 402 507.0 549.0 631.0 366.0 308.0 $n [1] 4 4 4 4 4 4 4 4 4 4 4 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] -46.965 69.865 -259.13 139.48 100.31 -184.83 -216.75 -240.525 -121.675 [2,] 242.965 396.135 684.13 357.52 354.69 489.83 612.75 387.525 561.675 [,10] [,11] [,12] [1,] -48.995 -390.085 -92.945 [2,] 725.995 497.085 215.945 $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(-27, 19.5, 98, 203, 276, -108, 50.5, 233, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/6cgiu1209303853.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] [1,] 138421.0 140224.0 143086.0 145713.0 146248 [2,] 138601.5 140903.5 143705.0 145900.5 146248 [3,] 139337.0 141881.5 144332.0 146030.5 146248 [4,] 139670.5 142510.5 145120.5 146178.0 146248 [5,] 140245.0 142778.0 145949.0 146260.0 146248 $n [1] 12 12 12 12 1 $conf [,1] [,2] [,3] [,4] [,5] [1,] 138849.4 141148.5 143686.4 145903.9 146248 [2,] 139824.6 142614.5 144977.6 146157.1 146248 $out [1] 146647 $group [1] 4 $names [1] "1" "2" "3" "4" NA Warning message: In bxp(list(stats = c(138421, 138601.5, 139337, 139670.5, 140245, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/7rgbb1209303853.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,] 142033.2 141858.0 141945.6 [2,] 142483.5 142680.0 142581.8 [3,] 142912.2 143130.5 143076.0 [4,] 143351.9 143820.8 143586.3 [5,] 143769.0 144363.5 144066.2 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 142516.2 142610.2 142617.8 [2,] 143308.3 143650.8 143534.2 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(142033.25, 142483.5, 142912.25, 143351.875, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1dc0r1209303853.ps tmp/1dc0r1209303853.png") > system("convert tmp/2rln31209303853.ps tmp/2rln31209303853.png") > system("convert tmp/3jb271209303853.ps tmp/3jb271209303853.png") > system("convert tmp/4izto1209303853.ps tmp/4izto1209303853.png") > system("convert tmp/5g5km1209303853.ps tmp/5g5km1209303853.png") > system("convert tmp/6cgiu1209303853.ps tmp/6cgiu1209303853.png") > system("convert tmp/7rgbb1209303853.ps tmp/7rgbb1209303853.png") > > > proc.time() user system elapsed 2.126 1.406 2.273