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(124.1,124.4,115.7,108.3,102.3,104.6,104,103.5,96,96.6,95.4,92.1,93,90.4,93.3,97.1,111,114.1,113.3,111,107.2,118.3,134.1,139,116.7,112.5,122.8,130,125.6,123.8,135.8,136.4,135.3,149.5,159.6,161.4,175.2,199.5,245,257.8) > par1 = '10' > #'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] 4 > 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 4 4 4 4 4 4 > arr [,1] [,2] [,3] [,4] [,5] [1,] 124.1 95.4 107.2 135.8 NA [2,] 124.4 92.1 118.3 136.4 NA [3,] 115.7 93.0 134.1 135.3 NA [4,] 108.3 90.4 139.0 149.5 NA [5,] 102.3 93.3 116.7 159.6 NA [6,] 104.6 97.1 112.5 161.4 NA [7,] 104.0 111.0 122.8 175.2 NA [8,] 103.5 114.1 130.0 199.5 NA [9,] 96.0 113.3 125.6 245.0 NA [10,] 96.6 111.0 123.8 257.8 NA > darr [,1] [,2] [,3] [,4] [,5] [1,] 0.3 -3.3 11.1 0.6 NA [2,] -8.7 0.9 15.8 -1.1 NA [3,] -7.4 -2.6 4.9 14.2 NA [4,] -6.0 2.9 -22.3 10.1 NA [5,] 2.3 3.8 -4.2 1.8 NA [6,] -0.6 13.9 10.3 13.8 NA [7,] -0.5 3.1 7.2 24.3 NA [8,] -7.5 -0.8 -4.4 45.5 NA [9,] 0.6 -2.3 -1.8 12.8 NA [10,] -1.2 -3.8 12.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/1icda1228996763.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/26pdc1228996763.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/3co631228996763.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/4zovp1228996763.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] [1,] 95.40 92.10 93.00 90.40 93.30 97.10 104.0 103.50 96.00 96.6 [2,] 101.30 105.20 104.35 99.35 97.80 100.85 107.5 108.80 104.65 103.8 [3,] 115.65 121.35 124.90 123.65 109.50 108.55 116.9 122.05 119.45 117.4 [4,] 129.95 130.40 134.70 144.25 138.15 136.95 149.0 164.75 185.30 190.8 [5,] 135.80 136.40 135.30 149.50 159.60 161.40 175.2 199.50 245.00 257.8 $n [1] 4 4 4 4 4 4 4 4 4 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 93.0165 101.442 100.9235 88.179 77.6235 80.031 84.115 77.8495 [2,] 138.2835 141.258 148.8765 159.121 141.3765 137.069 149.685 166.2505 [,9] [,10] [1,] 55.7365 48.67 [2,] 183.1635 186.13 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" Warning message: In bxp(list(stats = c(95.4, 101.3, 115.65, 129.95, 135.8, 92.1, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/52cv31228996763.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] [1,] -3.30 -8.70 -7.40 -22.30 -4.20 -0.60 -0.50 -7.50 -2.30 -3.8 [2,] -1.50 -4.90 -5.00 -14.15 -1.20 4.85 1.30 -5.95 -2.05 -2.5 [3,] 0.45 -0.10 1.15 -1.55 2.05 12.05 5.15 -2.60 -0.60 -1.2 [4,] 5.85 8.35 9.55 6.50 3.05 13.85 15.75 22.35 6.70 5.4 [5,] 11.10 15.80 14.20 10.10 3.80 13.90 24.30 45.50 12.80 12.0 $n [1] 4 4 4 4 4 4 4 4 4 3 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] -5.3565 -10.5675 -10.3445 -17.8635 -1.3075 4.94 -6.2655 -24.957 -7.5125 [2,] 6.2565 10.3675 12.6445 14.7635 5.4075 19.16 16.5655 19.757 6.3125 [,10] [1,] -8.406486 [2,] 6.006486 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" Warning message: In bxp(list(stats = c(-3.30000000000001, -1.5, 0.450000000000003, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6ifmq1228996763.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] [1,] 96.0 90.40 107.2 135.3 NA [2,] 102.3 93.00 116.7 136.4 NA [3,] 104.3 96.25 123.3 160.5 NA [4,] 115.7 111.00 130.0 199.5 NA [5,] 124.4 114.10 139.0 257.8 NA $n [1] 10 10 10 10 0 $conf [,1] [,2] [,3] [,4] [,5] [1,] 97.60483 87.25648 116.6548 128.9727 NA [2,] 110.99517 105.24352 129.9452 192.0273 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" NA Warning message: In bxp(list(stats = c(96, 102.3, 104.3, 115.7, 124.4, 90.4, 93, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7xjac1228996763.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.6250 108.550 113.7250 [2,] 117.9750 115.650 115.6375 [3,] 120.6625 118.425 122.3937 [4,] 136.7750 122.050 129.4125 [5,] 147.3000 124.900 132.3500 $n [1] 10 10 10 $conf [,1] [,2] [,3] [1,] 111.2693 115.2273 115.5112 [2,] 130.0557 121.6227 129.2763 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(115.625, 117.975, 120.6625, 136.775, 147.3, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1icda1228996763.ps tmp/1icda1228996763.png") > system("convert tmp/26pdc1228996763.ps tmp/26pdc1228996763.png") > system("convert tmp/3co631228996763.ps tmp/3co631228996763.png") > system("convert tmp/4zovp1228996763.ps tmp/4zovp1228996763.png") > system("convert tmp/52cv31228996763.ps tmp/52cv31228996763.png") > system("convert tmp/6ifmq1228996763.ps tmp/6ifmq1228996763.png") > system("convert tmp/7xjac1228996763.ps tmp/7xjac1228996763.png") > > > proc.time() user system elapsed 1.129 0.916 1.616