R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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(10070.8,10548.3,11078.2,11651.9,12217.4,12732.6,13276.9,13815.9,14403.8,15033.1,15636.9,16198.3,16724.5,17223.6,17735.1,18249.0,18769.6,19303.0,19842.6,20437.2,21045.1,21696.9,22354.0,22983.7,23651.4,24355.7,25097.2,25828.2,26589.0,27339.7,28122.5,28911.5,29650.8,30448.8,31236.6,31992.8,32765.0,33510.8,34279.3,35039.5) > 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] 40 > (np <- floor(n / par1)) [1] 3 > 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] 4 4 4 4 3 3 3 3 3 3 3 3 > arr [,1] [,2] [,3] [,4] [1,] 10070.8 16724.5 23651.4 32765.0 [2,] 10548.3 17223.6 24355.7 33510.8 [3,] 11078.2 17735.1 25097.2 34279.3 [4,] 11651.9 18249.0 25828.2 35039.5 [5,] 12217.4 18769.6 26589.0 NA [6,] 12732.6 19303.0 27339.7 NA [7,] 13276.9 19842.6 28122.5 NA [8,] 13815.9 20437.2 28911.5 NA [9,] 14403.8 21045.1 29650.8 NA [10,] 15033.1 21696.9 30448.8 NA [11,] 15636.9 22354.0 31236.6 NA [12,] 16198.3 22983.7 31992.8 NA > darr [,1] [,2] [,3] [,4] [1,] 477.5 499.1 704.3 745.8 [2,] 529.9 511.5 741.5 768.5 [3,] 573.7 513.9 731.0 760.2 [4,] 565.5 520.6 760.8 NA [5,] 515.2 533.4 750.7 NA [6,] 544.3 539.6 782.8 NA [7,] 539.0 594.6 789.0 NA [8,] 587.9 607.9 739.3 NA [9,] 629.3 651.8 798.0 NA [10,] 603.8 657.1 787.8 NA [11,] 561.4 629.7 756.2 NA [12,] 526.2 667.7 772.2 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/wessaorg/rcomp/tmp/1ic0w1321555302.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/2lr091321555302.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/34oqf1321555302.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/46fy11321555302.ps",horizontal=F,onefile=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] [1,] 10070.80 10548.30 11078.20 11651.90 12217.4 12732.60 13276.90 13815.90 [2,] 13397.65 13885.95 14406.65 14950.45 15493.5 16017.80 16559.75 17126.55 [3,] 20187.95 20789.65 21416.15 22038.60 18769.6 19303.00 19842.60 20437.20 [4,] 28208.20 28933.25 29688.25 30433.85 22679.3 23321.35 23982.55 24674.35 [5,] 32765.00 33510.80 34279.30 35039.50 26589.0 27339.70 28122.50 28911.50 [,9] [,10] [,11] [,12] [1,] 14403.80 15033.10 15636.90 16198.30 [2,] 17724.45 18365.00 18995.45 19591.00 [3,] 21045.10 21696.90 22354.00 22983.70 [4,] 25347.95 26072.85 26795.30 27488.25 [5,] 29650.80 30448.80 31236.60 31992.80 $n [1] 4 4 4 4 3 3 3 3 3 3 3 3 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 8487.615 8902.283 9343.686 9806.714 12214.62 12640.6 13071.42 13552.0 [2,] 31888.285 32677.017 33488.614 34270.486 25324.58 25965.4 26613.78 27322.4 [,9] [,10] [,11] [,12] [1,] 14090.84 14665.7 15238.87 15779.72 [2,] 27999.36 28728.1 29469.13 30187.68 $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(10070.8, 13397.65, 20187.95, 28208.2, 32765, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5fd411321555302.ps",horizontal=F,onefile=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] [1,] 477.50 511.5 513.90 520.60 515.20 539.60 539.0 587.9 629.30 603.80 561.40 [2,] 488.30 520.7 543.80 543.05 524.30 541.95 566.8 597.9 640.55 630.45 595.55 [3,] 601.70 635.7 652.35 565.50 533.40 544.30 594.6 607.9 651.80 657.10 629.70 [4,] 725.05 755.0 745.60 663.15 642.05 663.55 691.8 673.6 724.90 722.45 692.95 [5,] 745.80 768.5 760.20 760.80 750.70 782.80 789.0 739.3 798.00 787.80 756.20 [,12] [1,] 526.20 [2,] 596.95 [3,] 667.70 [4,] 719.95 [5,] 772.20 $n [1] 4 4 4 3 3 3 3 3 3 3 3 3 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 414.6675 450.603 492.928 455.9432 425.9869 433.3748 480.5733 538.8454 [2,] 788.7325 820.797 811.772 675.0568 640.8131 655.2252 708.6267 676.9546 [,9] [,10] [,11] [,12] [1,] 574.8548 573.1764 540.8504 555.4977 [2,] 728.7452 741.0236 718.5496 779.9023 $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(477.5, 488.299999999999, 601.699999999999, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6jxp21321555302.ps",horizontal=F,onefile=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] [1,] 10070.80 16724.50 23651.4 32765.00 [2,] 11365.05 17992.05 25462.7 33137.90 [3,] 13004.75 19572.80 27731.1 33895.05 [4,] 14718.45 21371.00 30049.8 34659.40 [5,] 16198.30 22983.70 31992.8 35039.50 $n [1] 12 12 12 4 $conf [,1] [,2] [,3] [,4] [1,] 11475.24 18031.64 25638.89 32693.07 [2,] 14534.26 21113.96 29823.31 35097.04 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" NA Warning message: In bxp(list(stats = c(10070.8, 11365.05, 13004.75, 14718.45, 16198.3, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/70z7c1321555302.ps",horizontal=F,onefile=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,] 19192.00 18769.60 19086.40 [2,] 20608.46 20015.28 20383.29 [3,] 21554.75 20917.38 21317.91 [4,] 22542.54 21867.75 22292.15 [5,] 23724.93 22983.70 23539.62 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 20672.6 20072.45 20447.27 [2,] 22436.9 21762.30 22188.55 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" > dev.off() null device 1 > > try(system("convert tmp/1ic0w1321555302.ps tmp/1ic0w1321555302.png",intern=TRUE)) character(0) > try(system("convert tmp/2lr091321555302.ps tmp/2lr091321555302.png",intern=TRUE)) character(0) > try(system("convert tmp/34oqf1321555302.ps tmp/34oqf1321555302.png",intern=TRUE)) character(0) > try(system("convert tmp/46fy11321555302.ps tmp/46fy11321555302.png",intern=TRUE)) character(0) > try(system("convert tmp/5fd411321555302.ps tmp/5fd411321555302.png",intern=TRUE)) character(0) > try(system("convert tmp/6jxp21321555302.ps tmp/6jxp21321555302.png",intern=TRUE)) character(0) > try(system("convert tmp/70z7c1321555302.ps tmp/70z7c1321555302.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.582 0.339 1.951