R version 2.11.1 (2010-05-31) Copyright (C) 2010 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(276444,289742,303725,298305,266795,259497,266148,271037,276239,279681,277509,271115,275902,287224,300713,293860,264221,256167,262572,263276,264291,263903,260376,255603,261076,270976,285257,280445,250741,243803,253158,255542,262522,268381,267153,266424,276427,286994,303598,296806,263290,264981,272566,276475,284678,291542,291413,295916,309119,327616) > 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] 50 > (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 5 4 4 4 4 4 4 4 4 4 4 > arr [,1] [,2] [,3] [,4] [,5] [1,] 276444 275902 261076 276427 309119 [2,] 289742 287224 270976 286994 327616 [3,] 303725 300713 285257 303598 NA [4,] 298305 293860 280445 296806 NA [5,] 266795 264221 250741 263290 NA [6,] 259497 256167 243803 264981 NA [7,] 266148 262572 253158 272566 NA [8,] 271037 263276 255542 276475 NA [9,] 276239 264291 262522 284678 NA [10,] 279681 263903 268381 291542 NA [11,] 277509 260376 267153 291413 NA [12,] 271115 255603 266424 295916 NA > darr [,1] [,2] [,3] [,4] [,5] [1,] 13298 11322 9900 10567 18497 [2,] 13983 13489 14281 16604 NA [3,] -5420 -6853 -4812 -6792 NA [4,] -31510 -29639 -29704 -33516 NA [5,] -7298 -8054 -6938 1691 NA [6,] 6651 6405 9355 7585 NA [7,] 4889 704 2384 3909 NA [8,] 5202 1015 6980 8203 NA [9,] 3442 -388 5859 6864 NA [10,] -2172 -3527 -1228 -129 NA [11,] -6394 -4773 -729 4503 NA [12,] 4787 5473 10003 13203 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/12jh71290712109.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/22jh71290712109.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/3cbya1290712109.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/4cbya1290712109.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,] 275902 286994 285257.0 280445.0 250741.0 243803 253158 255542.0 262522.0 [2,] 275902 286994 292985.0 287152.5 257015.5 249985 257865 259409.0 263406.5 [3,] 276427 287224 302155.5 295333.0 263755.5 257832 264360 267156.5 270265.0 [4,] 276444 289742 303661.5 297555.5 265508.0 262239 269357 273756.0 280458.5 [5,] 276444 289742 303725.0 298305.0 266795.0 264981 272566 276475.0 284678.0 [,10] [,11] [,12] [1,] 263903.0 260376.0 255603.0 [2,] 266142.0 263764.5 261013.5 [3,] 274031.0 272331.0 268769.5 [4,] 285611.5 284461.0 283515.5 [5,] 291542.0 291413.0 295916.0 $n [1] 5 5 4 4 4 4 4 4 4 4 4 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 276044 285282.3 293721.1 287114.6 257046.4 248151.3 255281.3 255822.4 [2,] 276810 289165.7 310589.9 303551.4 270464.6 267512.7 273438.7 278490.6 [,9] [,10] [,11] [,12] [1,] 256793.9 258650.1 255980.8 250992.9 [2,] 283736.1 289411.9 288681.2 286546.1 $out [1] 261076 309119 270976 327616 $group [1] 1 1 2 2 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(275902, 275902, 276427, 276444, 276444, 286994, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/5cbya1290712109.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,] 9900 13489.0 -6853.0 -33516.0 -8054.0 6405 704.0 1015.0 -388.0 -3527.0 [2,] 10567 13736.0 -6822.5 -32513.0 -7676.0 6528 1544.0 3108.5 1527.0 -2849.5 [3,] 11322 14132.0 -6106.0 -30607.0 -7118.0 7118 3146.5 6091.0 4650.5 -1700.0 [4,] 13298 15442.5 -5116.0 -29671.5 -2623.5 8470 4399.0 7591.5 6361.5 -678.5 [5,] 13298 16604.0 -4812.0 -29639.0 1691.0 9355 4889.0 8203.0 6864.0 -129.0 [,11] [,12] [1,] -6394.0 4787 [2,] -5583.5 5130 [3,] -2751.0 7738 [4,] 1887.0 11603 [5,] 4503.0 13203 $n [1] 5 4 4 4 4 4 4 4 4 4 4 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 9392.282 12783.86 -7454.135 -32851.79 -11109.475 5583.82 891.05 2549.43 [2,] 13251.718 15480.14 -4757.865 -28362.22 -3126.525 8652.18 5401.95 9632.57 [,9] [,10] [,11] [,12] [1,] 831.245 -3415.09 -8652.695 2624.33 [2,] 8469.755 15.09 3150.695 12851.67 $out [1] 18497 $group [1] 1 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(9900, 10567, 11322, 13298, 13298, 13489, 13736, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/652xd1290712109.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,] 259497.0 255603 243803.0 263290.0 309119.0 [2,] 268916.0 261474 254350.0 274496.5 309119.0 [3,] 276341.5 264062 264473.0 285836.0 318367.5 [4,] 284711.5 281563 269678.5 293729.0 327616.0 [5,] 303725.0 300713 285257.0 303598.0 327616.0 $n [1] 12 12 12 12 2 $conf [,1] [,2] [,3] [,4] [,5] [1,] 269137.1 254899.3 257481.6 277063.9 297702.1 [2,] 283545.9 273224.7 271464.4 294608.1 339032.9 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" NA Warning message: In bxp(list(stats = c(259497, 268916, 276341.5, 284711.5, 303725, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/752xd1290712109.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,] 256112.0 257832.0 256972.0 [2,] 265096.8 265758.2 265427.5 [3,] 273188.6 271298.0 272160.3 [4,] 286073.8 281825.5 282270.5 [5,] 298323.2 302155.5 300239.4 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 263620.9 263969.6 264478.1 [2,] 282756.4 278626.4 279842.5 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(256112, 265096.75, 273188.625, 286073.8, 298323.25, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/12jh71290712109.ps tmp/12jh71290712109.png",intern=TRUE)) character(0) > try(system("convert tmp/22jh71290712109.ps tmp/22jh71290712109.png",intern=TRUE)) character(0) > try(system("convert tmp/3cbya1290712109.ps tmp/3cbya1290712109.png",intern=TRUE)) character(0) > try(system("convert tmp/4cbya1290712109.ps tmp/4cbya1290712109.png",intern=TRUE)) character(0) > try(system("convert tmp/5cbya1290712109.ps tmp/5cbya1290712109.png",intern=TRUE)) character(0) > try(system("convert tmp/652xd1290712109.ps tmp/652xd1290712109.png",intern=TRUE)) character(0) > try(system("convert tmp/752xd1290712109.ps tmp/752xd1290712109.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.910 0.670 2.566