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(111.2,116.7,114.8,100.0,98.8,106.3,119.5,120.7,121.1,112.4,108.2,113.6,106.7,114.3,117.3,109.6,109.9,112.5,116.1,112.0,113.3,107.9,108.2,114.8,105.6,111.9,113.6,108.4,111.1,112.5,112.6,108.7,108.9,104.5,105.9,111.1,102.2,108.3,112.3,110.8,108.6,103.8,96.6,88.0,85.6,88.8,92.9,98.8,88.8,90.5,87.7,81.9,80.2,86.3,94.3,94.6,92.2,88.8,88.2,96.3) > 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,] 111.2 106.7 105.6 102.2 88.8 NA [2,] 116.7 114.3 111.9 108.3 90.5 NA [3,] 114.8 117.3 113.6 112.3 87.7 NA [4,] 100.0 109.6 108.4 110.8 81.9 NA [5,] 98.8 109.9 111.1 108.6 80.2 NA [6,] 106.3 112.5 112.5 103.8 86.3 NA [7,] 119.5 116.1 112.6 96.6 94.3 NA [8,] 120.7 112.0 108.7 88.0 94.6 NA [9,] 121.1 113.3 108.9 85.6 92.2 NA [10,] 112.4 107.9 104.5 88.8 88.8 NA [11,] 108.2 108.2 105.9 92.9 88.2 NA [12,] 113.6 114.8 111.1 98.8 96.3 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 5.5 7.6 6.3 6.1 1.7 NA [2,] -1.9 3.0 1.7 4.0 -2.8 NA [3,] -14.8 -7.7 -5.2 -1.5 -5.8 NA [4,] -1.2 0.3 2.7 -2.2 -1.7 NA [5,] 7.5 2.6 1.4 -4.8 6.1 NA [6,] 13.2 3.6 0.1 -7.2 8.0 NA [7,] 1.2 -4.1 -3.9 -8.6 0.3 NA [8,] 0.4 1.3 0.2 -2.4 -2.4 NA [9,] -8.7 -5.4 -4.4 3.2 -3.4 NA [10,] -4.2 0.3 1.4 4.1 -0.6 NA [11,] 5.4 6.6 5.2 5.9 8.1 NA [12,] -6.9 -9.2 -8.9 -10.0 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/1vnnf1258138208.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/21yte1258138208.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/3uy6l1258138208.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/49c5b1258138208.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,] 102.2 108.3 112.3 100.0 98.8 103.8 94.3 88.0 85.6 88.8 88.2 96.3 [2,] 102.2 108.3 112.3 100.0 98.8 103.8 96.6 94.6 92.2 88.8 92.9 98.8 [3,] 105.6 111.9 113.6 108.4 108.6 106.3 112.6 108.7 108.9 104.5 105.9 111.1 [4,] 106.7 114.3 114.8 109.6 109.9 112.5 116.1 112.0 113.3 107.9 108.2 113.6 [5,] 111.2 116.7 117.3 110.8 111.1 112.5 119.5 120.7 121.1 112.4 108.2 114.8 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 102.4203 107.6604 111.8335 101.6167 100.7568 100.1526 98.82135 96.4052 [2,] 108.7797 116.1396 115.3665 115.1833 116.4432 112.4474 126.37865 120.9948 [,9] [,10] [,11] [,12] [1,] 93.9908 91.00399 95.08906 100.6424 [2,] 123.8092 117.99601 116.71094 121.5576 $out [1] 88.8 90.5 87.7 81.9 80.2 86.3 $group [1] 1 2 3 4 5 6 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(102.2, 102.2, 105.6, 106.7, 111.2, 108.3, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5u8u51258138208.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,] 5.5 -2.8 -7.7 -2.2 -4.8 -7.2 -8.6 -2.4 -5.4 -0.6 5.2 -10.00 [2,] 5.5 -1.9 -7.7 -1.7 1.4 0.1 -4.1 -2.4 -5.4 -0.6 5.4 -9.60 [3,] 6.1 1.7 -5.8 -1.2 2.6 3.6 -3.9 0.2 -4.4 0.3 5.9 -9.05 [4,] 6.3 3.0 -5.2 0.3 6.1 8.0 0.3 0.4 -3.4 1.4 6.6 -7.90 [5,] 6.3 4.0 -1.5 2.7 7.5 13.2 1.2 1.3 -3.4 4.1 8.1 -6.90 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 5.534722 -1.762328 -7.566494 -2.6131950 -0.7210082 -1.98212 -7.0090289 [2,] 6.665278 5.162328 -4.033506 0.2131950 5.9210082 9.18212 -0.7909711 [,8] [,9] [,10] [,11] [,12] [1,] -1.778473 -5.813195 -1.113195 5.052083 -10.393 [2,] 2.178473 -2.986805 1.713195 6.747917 -7.707 $out [1] 7.6 1.7 -14.8 -8.7 3.2 -4.2 $group [1] 1 1 3 9 9 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(5.5, 5.5, 6.1, 6.30000000000001, 6.30000000000001, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/66psa1258138208.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,] 98.80 106.70 104.50 85.60 80.20 NA [2,] 107.25 108.90 107.15 90.85 87.00 NA [3,] 113.00 112.25 110.00 100.50 88.80 NA [4,] 118.10 114.55 112.20 108.45 93.25 NA [5,] 121.10 117.30 113.60 112.30 96.30 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 108.0512 109.673 107.6967 92.47252 85.94933 NA [2,] 117.9488 114.827 112.3033 108.52748 91.65067 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(98.8, 107.25, 113, 118.1, 121.1, 106.7, 108.9, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/72z9g1258138208.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.48 104.50 98.350 [2,] 101.93 106.10 103.025 [3,] 104.25 108.65 104.625 [4,] 107.37 111.50 107.250 [5,] 109.14 113.60 113.550 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 101.7688 106.1870 102.6979 [2,] 106.7312 111.1130 106.5521 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(100.48, 101.93, 104.25, 107.37, 109.14, 104.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1vnnf1258138208.ps tmp/1vnnf1258138208.png") > system("convert tmp/21yte1258138208.ps tmp/21yte1258138208.png") > system("convert tmp/3uy6l1258138208.ps tmp/3uy6l1258138208.png") > system("convert tmp/49c5b1258138208.ps tmp/49c5b1258138208.png") > system("convert tmp/5u8u51258138208.ps tmp/5u8u51258138208.png") > system("convert tmp/66psa1258138208.ps tmp/66psa1258138208.png") > system("convert tmp/72z9g1258138208.ps tmp/72z9g1258138208.png") > > > proc.time() user system elapsed 1.229 0.935 1.529