R version 2.10.1 (2009-12-14) Copyright (C) 2009 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(103.6,104.7,105.5,106.6,107.2,107.5,108.3,108.7,108.8,109.8,109.5,109.2,110.6,110.1,109.9,109.7,109.4,109.4,109.4,109.5,109.5,109.9,110,110.8,112.4,112.8,113.7,114.5,114.8,115.6,115.8,115.8,116.3,116.3,116.8,116.7,116.8,117,117.2,117.1,117.3,117.4,117.7,117.9,118.8,119.9,122.4,123.5,125.6,127.4,128.9,129.5,130.8,132.7,134,132.9,133.1,131.7,128.8,125.1,123.9,121.8,119.2,118.9,119.6,120.2,119.6,121,120.4,120.4,121.4,121.7) > 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,] 103.6 110.6 112.4 116.8 125.6 123.9 NA [2,] 104.7 110.1 112.8 117.0 127.4 121.8 NA [3,] 105.5 109.9 113.7 117.2 128.9 119.2 NA [4,] 106.6 109.7 114.5 117.1 129.5 118.9 NA [5,] 107.2 109.4 114.8 117.3 130.8 119.6 NA [6,] 107.5 109.4 115.6 117.4 132.7 120.2 NA [7,] 108.3 109.4 115.8 117.7 134.0 119.6 NA [8,] 108.7 109.5 115.8 117.9 132.9 121.0 NA [9,] 108.8 109.5 116.3 118.8 133.1 120.4 NA [10,] 109.8 109.9 116.3 119.9 131.7 120.4 NA [11,] 109.5 110.0 116.8 122.4 128.8 121.4 NA [12,] 109.2 110.8 116.7 123.5 125.1 121.7 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1.1 -0.5 0.4 0.2 1.8 -2.1 NA [2,] 0.8 -0.2 0.9 0.2 1.5 -2.6 NA [3,] 1.1 -0.2 0.8 -0.1 0.6 -0.3 NA [4,] 0.6 -0.3 0.3 0.2 1.3 0.7 NA [5,] 0.3 0.0 0.8 0.1 1.9 0.6 NA [6,] 0.8 0.0 0.2 0.3 1.3 -0.6 NA [7,] 0.4 0.1 0.0 0.2 -1.1 1.4 NA [8,] 0.1 0.0 0.5 0.9 0.2 -0.6 NA [9,] 1.0 0.4 0.0 1.1 -1.4 0.0 NA [10,] -0.3 0.1 0.5 2.5 -2.9 1.0 NA [11,] -0.3 0.8 -0.1 1.1 -3.7 0.3 NA [12,] 1.4 1.6 0.1 2.1 -1.2 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/rcomp/tmp/1sj6s1275653465.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/2sj6s1275653465.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/3sj6s1275653465.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/4kanv1275653465.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] [1,] 103.6 104.7 105.50 106.6 107.20 107.5 108.30 108.70 108.80 109.8 109.5 [2,] 110.6 110.1 109.90 109.7 109.40 109.4 109.40 109.50 109.50 109.9 110.0 [3,] 114.6 114.9 115.45 115.8 116.05 116.5 116.75 116.85 117.55 118.1 119.1 [4,] 123.9 121.8 119.20 118.9 119.60 120.2 119.60 121.00 120.40 120.4 122.4 [5,] 125.6 127.4 128.90 129.5 130.80 132.7 134.00 132.90 133.10 131.7 128.8 [,12] [1,] 109.2 [2,] 110.8 [3,] 119.2 [4,] 123.5 [5,] 125.1 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 106.0211 107.3531 109.4512 109.8657 109.4707 109.5337 110.1707 109.4321 [2,] 123.1789 122.4469 121.4488 121.7343 122.6293 123.4663 123.3293 124.2679 [,9] [,10] [,11] [,12] [1,] 110.5191 111.3272 111.1016 111.0081 [2,] 124.5809 124.8728 127.0984 127.3919 $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(103.6, 110.6, 114.6, 123.9, 125.6, 104.7, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/5kanv1275653465.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,] -2.1 -0.2 -0.30 -0.30 0.00 -0.60 0.00 -0.60 -1.4 -0.3 -0.3 -1.2 [2,] -0.5 -0.2 -0.20 0.20 0.10 0.00 0.00 0.00 0.0 -0.3 -0.3 0.1 [3,] 0.3 0.5 0.25 0.45 0.45 0.25 0.15 0.15 0.2 0.3 0.1 1.4 [4,] 1.1 0.9 0.80 0.70 0.80 0.80 0.40 0.50 1.0 1.0 0.8 1.6 [5,] 1.8 1.5 1.10 1.30 0.80 1.30 0.40 0.90 1.1 2.5 1.1 2.1 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.7320517 -0.2095355 -0.3950323 0.1274839 -0.001522609 -0.2660258 [2,] 1.3320517 1.2095355 0.8950323 0.7725161 0.901522609 0.7660258 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.1080129 -0.1725161 -0.4450323 -0.538542 -0.6095355 0.3401038 [2,] 0.4080129 0.4725161 0.8450323 1.138542 0.8095355 2.4598962 $out [1] -2.6 1.9 -1.1 1.4 -2.9 -3.7 $group [1] 2 5 7 7 10 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-2.10000000000001, -0.5, 0.299999999999997, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/6vjmg1275653465.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,] 103.60 109.40 112.4 116.80 125.10 118.90 NA [2,] 106.05 109.45 114.1 117.15 128.10 119.60 NA [3,] 107.90 109.80 115.7 117.55 130.15 120.40 NA [4,] 109.00 110.05 116.3 119.35 132.80 121.55 NA [5,] 109.80 110.80 116.8 122.40 134.00 123.90 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 106.5545 109.5263 114.6966 116.5466 128.0063 119.5106 NA [2,] 109.2455 110.0737 116.7034 118.5534 132.2937 121.2894 NA $out [1] 123.5 $group [1] 4 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(103.6, 106.05, 107.9, 109, 109.8, 109.4, 109.45, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/7vjmg1275653465.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.4833 114.600 114.6750 [2,] 115.8917 115.625 114.9750 [3,] 117.3000 116.625 115.6250 [4,] 117.8250 117.825 116.2375 [5,] 118.1500 119.200 117.6625 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 116.4182 115.6216 115.0492 [2,] 118.1818 117.6284 116.2008 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(115.483333333333, 115.891666666667, 117.3, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1sj6s1275653465.ps tmp/1sj6s1275653465.png",intern=TRUE)) character(0) > try(system("convert tmp/2sj6s1275653465.ps tmp/2sj6s1275653465.png",intern=TRUE)) character(0) > try(system("convert tmp/3sj6s1275653465.ps tmp/3sj6s1275653465.png",intern=TRUE)) character(0) > try(system("convert tmp/4kanv1275653465.ps tmp/4kanv1275653465.png",intern=TRUE)) character(0) > try(system("convert tmp/5kanv1275653465.ps tmp/5kanv1275653465.png",intern=TRUE)) character(0) > try(system("convert tmp/6vjmg1275653465.ps tmp/6vjmg1275653465.png",intern=TRUE)) character(0) > try(system("convert tmp/7vjmg1275653465.ps tmp/7vjmg1275653465.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.440 1.220 1.558