R version 2.9.0 (2009-04-17) 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(100.4,97.7,97,96.5,98.4,106.3,103.1,102.4,95,98.1,106.1,99.1,101.2,95.5,99.8,97.1,97.5,96.8,97.7,100.9,94.3,99.5,100.8,97,99.2,101,102.3,97,91.2,97.6,95.7,100.5,94.4,102.9,105.1,98.8,100.7,99.6,107.7,102.9,101.6,102.7,110.5,109.8,94.3,102.5,105,102.3,107.7,100.3,99.5,95,97.7,96.3,97.8,106.4,96.1,106.2,114.7,111.9,121,117.7,115.4,114.3,109.5,108.1,108.2,99.1,101.2,98.1,95.5,97.9,98.2,98.7,95.6,95.8,94.4,96.5,103.3,104.3,104.5,102.3,103.8,103.1,102.2,106.3,102.1,94,102.6,102.6,106.7,107.9,109.3,105.9,109.1,108.5,111.7,109.8,109.1,108.5,108.5,106.2,117.1,109.8,115.2,115.9,119.2,121,118.6,117.6,114.6,110.6,102.5,101.6,107.4,105.8,102.8,104,100.4,100.6) > 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] 120 > (np <- floor(n / par1)) [1] 10 > 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] 10 10 10 10 10 10 10 10 10 10 10 10 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] 100.4 101.2 99.2 100.7 107.7 121.0 98.2 102.2 111.7 118.6 NA [2,] 97.7 95.5 101.0 99.6 100.3 117.7 98.7 106.3 109.8 117.6 NA [3,] 97.0 99.8 102.3 107.7 99.5 115.4 95.6 102.1 109.1 114.6 NA [4,] 96.5 97.1 97.0 102.9 95.0 114.3 95.8 94.0 108.5 110.6 NA [5,] 98.4 97.5 91.2 101.6 97.7 109.5 94.4 102.6 108.5 102.5 NA [6,] 106.3 96.8 97.6 102.7 96.3 108.1 96.5 102.6 106.2 101.6 NA [7,] 103.1 97.7 95.7 110.5 97.8 108.2 103.3 106.7 117.1 107.4 NA [8,] 102.4 100.9 100.5 109.8 106.4 99.1 104.3 107.9 109.8 105.8 NA [9,] 95.0 94.3 94.4 94.3 96.1 101.2 104.5 109.3 115.2 102.8 NA [10,] 98.1 99.5 102.9 102.5 106.2 98.1 102.3 105.9 115.9 104.0 NA [11,] 106.1 100.8 105.1 105.0 114.7 95.5 103.8 109.1 119.2 100.4 NA [12,] 99.1 97.0 98.8 102.3 111.9 97.9 103.1 108.5 121.0 100.6 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] -2.7 -5.7 1.8 -1.1 -7.4 -3.3 0.5 4.1 -1.9 -1.0 NA [2,] -0.7 4.3 1.3 8.1 -0.8 -2.3 -3.1 -4.2 -0.7 -3.0 NA [3,] -0.5 -2.7 -5.3 -4.8 -4.5 -1.1 0.2 -8.1 -0.6 -4.0 NA [4,] 1.9 0.4 -5.8 -1.3 2.7 -4.8 -1.4 8.6 0.0 -8.1 NA [5,] 7.9 -0.7 6.4 1.1 -1.4 -1.4 2.1 0.0 -2.3 -0.9 NA [6,] -3.2 0.9 -1.9 7.8 1.5 0.1 6.8 4.1 10.9 5.8 NA [7,] -0.7 3.2 4.8 -0.7 8.6 -9.1 1.0 1.2 -7.3 -1.6 NA [8,] -7.4 -6.6 -6.1 -15.5 -10.3 2.1 0.2 1.4 5.4 -3.0 NA [9,] 3.1 5.2 8.5 8.2 10.1 -3.1 -2.2 -3.4 0.7 1.2 NA [10,] 8.0 1.3 2.2 2.5 8.5 -2.6 1.5 3.2 3.3 -3.6 NA [11,] -7.0 -3.8 -6.3 -2.7 -2.8 2.4 -0.7 -0.6 1.8 0.2 NA [12,] 2.1 2.2 1.9 5.4 9.1 0.3 -0.9 3.2 -2.4 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/18j7u1290010830.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/2ia6f1290010830.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/3ia6f1290010830.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/4ia6f1290010830.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,] 98.2 95.50 95.6 94.00 91.2 96.3 95.7 99.10 94.30 98.1 95.50 [2,] 100.4 98.70 99.5 95.80 97.5 96.8 97.8 100.90 94.40 99.5 100.80 [3,] 101.7 100.65 102.2 97.05 100.0 102.1 105.0 105.05 98.65 102.7 105.05 [4,] 111.7 109.80 109.1 108.50 102.6 106.2 108.2 107.90 104.50 105.9 109.10 [5,] 121.0 117.70 115.4 114.30 109.5 108.1 117.1 109.80 115.20 106.2 119.20 [,12] [1,] 97.00 [2,] 98.80 [3,] 101.45 [4,] 108.50 [5,] 121.00 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 96.05407 95.104 97.40346 90.70457 97.45184 97.40339 99.80375 [2,] 107.34593 106.196 106.99654 103.39543 102.54816 106.79661 110.19625 [,8] [,9] [,10] [,11] [,12] [1,] 101.5525 93.60364 99.5023 100.9030 96.6035 [2,] 108.5475 103.69636 105.8977 109.1970 106.2965 $out [1] 115.9 $group [1] 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(98.2, 100.4, 101.7, 111.7, 121, 95.5, 98.7, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5b2n01290010830.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,] -7.4 -4.20 -8.10 -8.10 -2.30 -3.2 -7.30 -15.50 -3.40 1.30 -7.0 -2.4 [2,] -3.3 -3.00 -4.80 -4.80 -1.40 0.1 -1.60 -7.40 -2.20 1.30 -3.8 0.3 [3,] -1.5 -0.75 -3.35 -0.65 -0.35 2.8 0.15 -4.55 2.15 2.35 -1.7 2.1 [4,] 0.5 1.30 -0.60 1.90 2.10 6.8 3.20 1.40 8.20 3.30 0.2 3.2 [5,] 4.1 4.30 0.20 8.60 6.40 10.9 8.60 5.40 10.10 3.30 2.4 5.4 $n [1] 10 10 10 10 10 10 10 10 10 10 10 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -3.3986315 -2.898451 -5.448487 -3.997587 -2.098740 -0.5475871 -2.248271 [2,] 0.3986315 1.398451 -1.251513 2.697587 1.398740 6.1475871 2.548271 [,8] [,9] [,10] [,11] [,12] [1,] -8.9468309 -3.046255 1.350720 -3.6985595 0.5726667 [2,] -0.1531691 7.346255 3.349280 0.2985595 3.6273333 $out [1] 8.1 7.9 -9.1 8.0 8.5 -2.6 -3.6 9.1 $group [1] 2 5 7 10 10 10 10 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-7.4, -3.3, -1.50000000000001, 0.5, 4.09999999999999, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6b2n01290010830.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] [,8] [,9] [,10] [,11] [1,] 95.00 94.3 91.20 94.30 95.00 95.50 94.40 94.0 106.20 100.40 NA [2,] 97.35 96.9 96.35 101.15 97.00 98.60 96.15 102.4 108.80 102.05 NA [3,] 98.75 97.6 99.00 102.60 99.90 108.15 100.50 106.1 110.75 104.90 NA [4,] 102.75 100.3 101.65 106.35 107.05 114.85 103.55 108.2 116.50 112.60 NA [5,] 106.30 101.2 105.10 110.50 114.70 121.00 104.50 109.3 121.00 118.60 NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 96.28702 96.04924 96.58263 100.2282 95.31613 100.7383 97.12481 [2,] 101.21298 99.15076 101.41737 104.9718 104.48387 115.5617 103.87519 [,8] [,9] [,10] [,11] [1,] 103.4546 107.2380 100.0881 NA [2,] 108.7454 114.2620 109.7119 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(95, 97.35, 98.75, 102.75, 106.3, 94.3, 96.9, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/74b431290010830.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,] 100.390 97.050 99.3125 [2,] 101.320 100.325 101.3500 [3,] 104.165 101.900 103.2875 [4,] 104.720 103.850 104.2812 [5,] 106.090 105.050 105.5875 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 102.6142 100.2922 101.9505 [2,] 105.7158 103.5078 104.6245 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(100.39, 101.32, 104.165, 104.72, 106.09, 97.05, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/18j7u1290010830.ps tmp/18j7u1290010830.png",intern=TRUE)) character(0) > try(system("convert tmp/2ia6f1290010830.ps tmp/2ia6f1290010830.png",intern=TRUE)) character(0) > try(system("convert tmp/3ia6f1290010830.ps tmp/3ia6f1290010830.png",intern=TRUE)) character(0) > try(system("convert tmp/4ia6f1290010830.ps tmp/4ia6f1290010830.png",intern=TRUE)) character(0) > try(system("convert tmp/5b2n01290010830.ps tmp/5b2n01290010830.png",intern=TRUE)) character(0) > try(system("convert tmp/6b2n01290010830.ps tmp/6b2n01290010830.png",intern=TRUE)) character(0) > try(system("convert tmp/74b431290010830.ps tmp/74b431290010830.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.197 0.957 2.996