R version 2.6.2 (2008-02-08) 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. Natural language support but running in an English locale 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(121.3,124.0,122.9,120.1,118.3,118.1,118.4,116.6,116.4,116.7,117.7,119.5,123.3,124.6,125.4,127.0,126.8,131.8,128.1,130.1,133.5,142.7,140.0,137.9,132.6,133.7,137.0,141.1,145.3,146.1,141.8,140.0,137.4,139.5,140.3,142.7,143.3,146.0,147.2,146.1,147.1,141.7,138.8,138.3,140.2,143.1,142.0,142.4,141.2,138.0,137.9,136.8,135.9,138.8,139.5,138.0,139.7,137.5,137.8,137.4,141.7,145.3,148.9,151.3,151.4,149.2,143.8,143.6,144.3,142.0,140.8,141.8) > 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,] 121.3 123.3 132.6 143.3 141.2 141.7 NA [2,] 124.0 124.6 133.7 146.0 138.0 145.3 NA [3,] 122.9 125.4 137.0 147.2 137.9 148.9 NA [4,] 120.1 127.0 141.1 146.1 136.8 151.3 NA [5,] 118.3 126.8 145.3 147.1 135.9 151.4 NA [6,] 118.1 131.8 146.1 141.7 138.8 149.2 NA [7,] 118.4 128.1 141.8 138.8 139.5 143.8 NA [8,] 116.6 130.1 140.0 138.3 138.0 143.6 NA [9,] 116.4 133.5 137.4 140.2 139.7 144.3 NA [10,] 116.7 142.7 139.5 143.1 137.5 142.0 NA [11,] 117.7 140.0 140.3 142.0 137.8 140.8 NA [12,] 119.5 137.9 142.7 142.4 137.4 141.8 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 2.7 1.3 1.1 2.7 -3.2 3.6 NA [2,] -1.1 0.8 3.3 1.2 -0.1 3.6 NA [3,] -2.8 1.6 4.1 -1.1 -1.1 2.4 NA [4,] -1.8 -0.2 4.2 1.0 -0.9 0.1 NA [5,] -0.2 5.0 0.8 -5.4 2.9 -2.2 NA [6,] 0.3 -3.7 -4.3 -2.9 0.7 -5.4 NA [7,] -1.8 2.0 -1.8 -0.5 -1.5 -0.2 NA [8,] -0.2 3.4 -2.6 1.9 1.7 0.7 NA [9,] 0.3 9.2 2.1 2.9 -2.2 -2.3 NA [10,] 1.0 -2.7 0.8 -1.1 0.3 -1.2 NA [11,] 1.8 -2.1 2.4 0.4 -0.4 1.0 NA [12,] 3.8 -5.3 0.6 -1.2 4.3 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/freestat/rcomp/tmp/11o7i1209297178.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/freestat/rcomp/tmp/22xay1209297178.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/freestat/rcomp/tmp/3u1nr1209297178.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/freestat/rcomp/tmp/4tllq1209297178.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,] 121.3 124.00 122.90 120.10 118.3 118.10 118.40 116.60 133.50 137.50 137.80 [2,] 123.3 124.60 125.40 127.00 126.8 131.80 128.10 130.10 133.50 137.50 137.80 [3,] 136.9 135.85 137.45 138.95 140.6 140.25 139.15 138.15 138.55 140.75 140.15 [4,] 141.7 145.30 147.20 146.10 147.1 146.10 141.80 140.00 140.20 142.70 140.80 [5,] 143.3 146.00 148.90 151.30 151.4 149.20 143.80 143.60 144.30 143.10 142.00 [,12] [1,] 137.40 [2,] 137.40 [3,] 139.85 [4,] 142.40 [5,] 142.70 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 125.0314 122.4978 123.3883 126.6299 127.5058 131.0260 130.3131 131.7642 [2,] 148.7686 149.2022 151.5117 151.2701 153.6942 149.4740 147.9869 144.5358 [,9] [,10] [,11] [,12] [1,] 134.2283 137.3958 138.2149 136.6248 [2,] 142.8717 144.1042 142.0851 143.0752 $out [1] 116.4 116.7 117.7 119.5 $group [1] 9 10 11 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(121.3, 123.3, 136.9, 141.7, 143.3, 124, 124.6, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/5uebs1209297178.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,] 1.1 -1.1 -2.80 -1.80 -5.4 -5.4 -1.8 -2.6 -2.3 -2.7 -2.1 -5.3 [2,] 1.1 -0.1 -1.10 -0.90 -2.2 -4.3 -1.8 -0.2 -2.2 -1.2 -0.4 -1.2 [3,] 2.0 1.0 0.25 -0.05 0.3 -3.3 -1.0 1.2 1.2 -0.4 0.7 0.6 [4,] 2.7 3.3 2.40 1.00 2.9 0.3 -0.2 1.9 2.9 0.8 1.8 3.8 [5,] 3.6 3.6 4.10 1.00 5.0 0.7 2.0 3.4 9.2 1.0 2.4 4.3 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.9679483 -1.193110 -2.007613 -1.275561 -2.989665 -6.2671486 -2.03205168 [2,] 3.0320517 3.193110 2.507613 1.175561 3.589665 -0.3328514 0.03205168 [,8] [,9] [,10] [,11] [,12] [1,] -0.1545678 -2.089665 -1.6900646 -0.719071 -2.932987 [2,] 2.5545678 4.489665 0.8900646 2.119071 4.132987 $out [1] -3.2 4.2 $group [1] 1 4 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(1.09999999999999, 1.09999999999999, 1.99999999999999, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/6b1o61209297178.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,] 116.40 123.3 132.60 138.30 135.90 140.80 NA [2,] 117.20 126.1 137.20 140.95 137.45 141.90 NA [3,] 118.35 129.1 140.15 142.75 137.95 144.05 NA [4,] 120.70 135.7 142.25 146.05 139.15 149.05 NA [5,] 124.00 142.7 146.10 147.20 141.20 151.40 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 116.7536 124.7214 137.8467 140.4239 137.1746 140.7888 NA [2,] 119.9464 133.4786 142.4533 145.0761 138.7254 147.3112 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(116.4, 117.2, 118.35, 120.7, 124, 123.3, 126.1, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/70qh01209297178.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,] 133.9000 135.85 133.6000 [2,] 135.1583 137.80 135.9125 [3,] 136.4917 139.05 137.2125 [4,] 137.0083 140.20 139.3938 [5,] 137.6167 140.75 140.2625 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 135.6479 137.9553 135.6247 [2,] 137.3355 140.1447 138.8003 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(133.9, 135.158333333333, 136.491666666667, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/11o7i1209297178.ps tmp/11o7i1209297178.png") > system("convert tmp/22xay1209297178.ps tmp/22xay1209297178.png") > system("convert tmp/3u1nr1209297178.ps tmp/3u1nr1209297178.png") > system("convert tmp/4tllq1209297178.ps tmp/4tllq1209297178.png") > system("convert tmp/5uebs1209297178.ps tmp/5uebs1209297178.png") > system("convert tmp/6b1o61209297178.ps tmp/6b1o61209297178.png") > system("convert tmp/70qh01209297178.ps tmp/70qh01209297178.png") > > > proc.time() user system elapsed 2.125 1.388 2.279