R version 2.8.0 (2008-10-20) 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(101.1,100.7,100,100,100.8,101.9,102.7,103.1,103.5,103.9,104.4,105.2,106,107,108.2,109,109.1,109.3,110.1,110.7,110.8,110.7,110.9,111.3,111.6,111.8,112.1,112.3,112.5,113,113.6,114.4,114.9,115.2,116,117,118,119.4,121.1,123.1,125,126.3,127.4,129,131,133.3,135.9,138.4,140.3,141.7,143.1,144.5,146,147.7,149,149.7,150.2,150.5,150.7,150.9) > 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,] 101.1 106.0 111.6 118.0 140.3 NA [2,] 100.7 107.0 111.8 119.4 141.7 NA [3,] 100.0 108.2 112.1 121.1 143.1 NA [4,] 100.0 109.0 112.3 123.1 144.5 NA [5,] 100.8 109.1 112.5 125.0 146.0 NA [6,] 101.9 109.3 113.0 126.3 147.7 NA [7,] 102.7 110.1 113.6 127.4 149.0 NA [8,] 103.1 110.7 114.4 129.0 149.7 NA [9,] 103.5 110.8 114.9 131.0 150.2 NA [10,] 103.9 110.7 115.2 133.3 150.5 NA [11,] 104.4 110.9 116.0 135.9 150.7 NA [12,] 105.2 111.3 117.0 138.4 150.9 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.4 1.0 0.2 1.4 1.4 NA [2,] -0.7 1.2 0.3 1.7 1.4 NA [3,] 0.0 0.8 0.2 2.0 1.4 NA [4,] 0.8 0.1 0.2 1.9 1.5 NA [5,] 1.1 0.2 0.5 1.3 1.7 NA [6,] 0.8 0.8 0.6 1.1 1.3 NA [7,] 0.4 0.6 0.8 1.6 0.7 NA [8,] 0.4 0.1 0.5 2.0 0.5 NA [9,] 0.4 -0.1 0.3 2.3 0.3 NA [10,] 0.5 0.2 0.8 2.6 0.2 NA [11,] 0.8 0.4 1.0 2.5 0.2 NA [12,] 0.8 0.3 1.0 1.9 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/1y5ht1229977387.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/2c3fb1229977387.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/3qy2u1229977387.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/4fwc61229977387.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,] 101.1 100.7 100.0 100.0 100.8 101.9 102.7 103.1 103.5 103.9 104.4 105.2 [2,] 106.0 107.0 108.2 109.0 109.1 109.3 110.1 110.7 110.8 110.7 110.9 111.3 [3,] 111.6 111.8 112.1 112.3 112.5 113.0 113.6 114.4 114.9 115.2 116.0 117.0 [4,] 118.0 119.4 121.1 123.1 125.0 126.3 127.4 129.0 131.0 133.3 135.9 138.4 [5,] 118.0 119.4 121.1 123.1 146.0 147.7 149.0 149.7 150.2 150.5 150.7 150.9 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 103.1208 103.0382 102.9849 102.3370 101.2651 100.9878 101.3759 101.4693 [2,] 120.0792 120.5618 121.2151 122.2630 123.7349 125.0122 125.8241 127.3307 [,9] [,10] [,11] [,12] [1,] 100.6267 99.2309 98.33506 97.8512 [2,] 129.1733 131.1691 133.66494 136.1488 $out [1] 140.3 141.7 143.1 144.5 $group [1] 1 2 3 4 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(101.1, 106, 111.6, 118, 118, 100.7, 107, 111.8, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/51jxq1229977387.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,] -0.4 -0.7 0.0 0.1 0.2 0.6 0.4 0.4 0.3 0.2 0.2 0.30 [2,] 0.2 0.3 0.2 0.2 0.5 0.8 0.6 0.4 0.3 0.2 0.4 0.55 [3,] 1.0 1.2 0.8 0.8 1.1 0.8 0.7 0.5 0.3 0.5 0.8 0.90 [4,] 1.4 1.4 1.4 1.5 1.3 1.1 0.8 0.5 0.4 0.8 1.0 1.45 [5,] 1.4 1.7 2.0 1.9 1.7 1.3 0.8 0.5 0.4 0.8 1.0 1.90 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.1520830 0.4227428 -0.04791698 -0.1185767 0.534722 0.5880208 0.5586805 [2,] 1.8479170 1.9772572 1.64791698 1.7185767 1.665278 1.0119792 0.8413195 [,8] [,9] [,10] [,11] [,12] [1,] 0.4293403 0.2293403 0.07604151 0.3760415 0.189 [2,] 0.5706597 0.3706597 0.92395849 1.2239585 1.611 $out [1] 1.6 0.1 2.0 -0.1 2.3 2.6 2.5 $group [1] 7 8 8 9 9 10 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-0.399999999999991, 0.200000000000003, 1, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/61dut1229977387.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,] 100.00 106.00 111.60 118.00 140.30 NA [2,] 100.75 108.60 112.20 122.10 143.80 NA [3,] 102.30 109.70 113.30 126.85 148.35 NA [4,] 103.70 110.75 115.05 132.15 150.35 NA [5,] 105.20 111.30 117.00 138.40 150.90 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 100.9545 108.7194 112.0001 122.2661 145.3625 NA [2,] 103.6455 110.6806 114.5999 131.4339 151.3375 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(100, 100.75, 102.3, 103.7, 105.2, 106, 108.6, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/77eq51229977387.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,] 115.40 111.60 112.000 [2,] 117.34 112.20 115.350 [3,] 120.10 113.30 118.275 [4,] 122.40 115.05 121.450 [5,] 124.56 117.00 124.850 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 117.7921 112.0001 115.4927 [2,] 122.4079 114.5999 121.0573 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(115.4, 117.34, 120.1, 122.4, 124.56, 111.6, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1y5ht1229977387.ps tmp/1y5ht1229977387.png") > system("convert tmp/2c3fb1229977387.ps tmp/2c3fb1229977387.png") > system("convert tmp/3qy2u1229977387.ps tmp/3qy2u1229977387.png") > system("convert tmp/4fwc61229977387.ps tmp/4fwc61229977387.png") > system("convert tmp/51jxq1229977387.ps tmp/51jxq1229977387.png") > system("convert tmp/61dut1229977387.ps tmp/61dut1229977387.png") > system("convert tmp/77eq51229977387.ps tmp/77eq51229977387.png") > > > proc.time() user system elapsed 1.223 1.000 1.735