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. 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(113000,110000,107000,103000,98000,98000,137000,148000,147000,139000,130000,128000,127000,123000,118000,114000,108000,111000,151000,159000,158000,148000,138000,137000,136000,133000,126000,120000,114000,116000,153000,162000,161000,149000,139000,135000,130000,127000,122000,117000,112000,113000,149000,157000,157000,147000,137000,132000,125000,123000,117000,114000,111000,112000,144000,150000,149000,134000,123000,116000,117000,111000,105000,102000,95000,93000,124000,130000,124000,115000,106000,105000) > 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] 72 > (np <- floor(n / par1)) [1] 6 > 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] 6 6 6 6 6 6 6 6 6 6 6 6 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 113000 127000 136000 130000 125000 117000 NA [2,] 110000 123000 133000 127000 123000 111000 NA [3,] 107000 118000 126000 122000 117000 105000 NA [4,] 103000 114000 120000 117000 114000 102000 NA [5,] 98000 108000 114000 112000 111000 95000 NA [6,] 98000 111000 116000 113000 112000 93000 NA [7,] 137000 151000 153000 149000 144000 124000 NA [8,] 148000 159000 162000 157000 150000 130000 NA [9,] 147000 158000 161000 157000 149000 124000 NA [10,] 139000 148000 149000 147000 134000 115000 NA [11,] 130000 138000 139000 137000 123000 106000 NA [12,] 128000 137000 135000 132000 116000 105000 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -3000 -4000 -3000 -3000 -2000 -6000 NA [2,] -3000 -5000 -7000 -5000 -6000 -6000 NA [3,] -4000 -4000 -6000 -5000 -3000 -3000 NA [4,] -5000 -6000 -6000 -5000 -3000 -7000 NA [5,] 0 3000 2000 1000 1000 -2000 NA [6,] 39000 40000 37000 36000 32000 31000 NA [7,] 11000 8000 9000 8000 6000 6000 NA [8,] -1000 -1000 -1000 0 -1000 -6000 NA [9,] -8000 -10000 -12000 -10000 -15000 -9000 NA [10,] -9000 -10000 -10000 -10000 -11000 -9000 NA [11,] -2000 -1000 -4000 -5000 -7000 -1000 NA [12,] -1000 -1000 -5000 -7000 1000 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/1a3wm1209281336.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/2cw7d1209281336.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/3spf61209281336.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/455wv1209281336.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] [1,] 113000 110000 105000 102000 95000 93000 124000 148000 147000 115000 [2,] 117000 111000 107000 103000 98000 98000 137000 148000 147000 134000 [3,] 126000 123000 117500 114000 109500 111500 146500 153500 153000 143000 [4,] 130000 127000 122000 117000 112000 113000 151000 159000 158000 148000 [5,] 136000 133000 126000 120000 114000 116000 153000 162000 161000 149000 [,11] [,12] [1,] 106000 105000 [2,] 123000 116000 [3,] 133500 130000 [4,] 138000 135000 [5,] 139000 137000 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 117614.6 112679.5 107824.5 104969.5 100469.5 101824.5 137469.5 146404.6 [2,] 134385.4 133320.5 127175.5 123030.5 118530.5 121175.5 155530.5 160595.4 [,9] [,10] [,11] [,12] [1,] 145904.6 133969.5 123824.5 117744.4 [2,] 160095.4 152030.5 143175.5 142255.6 $out [1] 130000 124000 $group [1] 8 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(113000, 117000, 126000, 130000, 136000, 110000, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5tbej1209281336.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,] -4000 -7000 -6000 -7000 -2000 31000 6000 -1000 -15000 -11000 -7000 -7000 [2,] -4000 -6000 -5000 -6000 0 32000 6000 -1000 -12000 -10000 -5000 -5000 [3,] -3000 -5500 -4000 -5500 1000 36500 8000 -1000 -10000 -10000 -3000 -1000 [4,] -3000 -5000 -3000 -5000 2000 39000 9000 -1000 -9000 -9000 -1000 -1000 [5,] -2000 -5000 -3000 -5000 3000 40000 11000 -1000 -8000 -9000 -1000 1000 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] -3645.032 -6145.032 -5290.065 -6145.032 -290.0646 31984.77 6064.903 -1000 [2,] -2354.968 -4854.968 -2709.935 -4854.968 2290.0646 41015.23 9935.097 -1000 [,9] [,10] [,11] [,12] [1,] -11935.097 -10645.032 -5580.1292 -3826.39 [2,] -8064.903 -9354.968 -419.8708 1826.39 $out [1] -6000 -3000 -3000 0 -6000 $group [1] 1 2 4 8 8 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-4000, -4000, -3000, -3000, -2000, -7000, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6v4v51209281336.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] [1,] 98000 108000 114000 112000 111000 93000 NA [2,] 105000 116000 123000 119500 115000 103500 NA [3,] 120500 132000 135500 131000 123000 108500 NA [4,] 138000 149500 151000 148000 139000 120500 NA [5,] 148000 159000 162000 157000 150000 130000 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 105448.5 116720.4 122729 118001.0 112053.4 100746.2 NA [2,] 135551.5 147279.6 148271 143999.0 133946.6 116253.8 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(98000, 105000, 120500, 138000, 148000, 108000, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7nw081209281336.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,] 106333.3 109500 106125.0 [2,] 113750.0 115750 113125.0 [3,] 125083.3 128000 125375.0 [4,] 140833.3 144750 143062.5 [5,] 151000.0 153500 153500.0 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 112730.4 114772.9 111720.3 [2,] 137436.2 141227.1 139029.7 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(106333.333333333, 113750, 125083.333333333, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1a3wm1209281336.ps tmp/1a3wm1209281336.png") > system("convert tmp/2cw7d1209281336.ps tmp/2cw7d1209281336.png") > system("convert tmp/3spf61209281336.ps tmp/3spf61209281336.png") > system("convert tmp/455wv1209281336.ps tmp/455wv1209281336.png") > system("convert tmp/5tbej1209281336.ps tmp/5tbej1209281336.png") > system("convert tmp/6v4v51209281336.ps tmp/6v4v51209281336.png") > system("convert tmp/7nw081209281336.ps tmp/7nw081209281336.png") > > > proc.time() user system elapsed 1.436 0.956 1.709