R version 2.8.1 (2008-12-22) 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(46,50,49,48,50,47,50,49,51,52,48,55,56,43,44,50,49,47,46,50,49,53,54,56,56,58,53,51,52,53,56,54,54,56,59,62,62,73,76,80,77,81,80,80,81,80,77,71,71,64,64,47,41,35,34,33,23,16,16,8,9) > 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] 61 > (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] 6 5 5 5 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 46 56 56 62 71 9 [2,] 50 43 58 73 64 NA [3,] 49 44 53 76 64 NA [4,] 48 50 51 80 47 NA [5,] 50 49 52 77 41 NA [6,] 47 47 53 81 35 NA [7,] 50 46 56 80 34 NA [8,] 49 50 54 80 33 NA [9,] 51 49 54 81 23 NA [10,] 52 53 56 80 16 NA [11,] 48 54 59 77 16 NA [12,] 55 56 62 71 8 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 4 -13 2 11 -7 NA [2,] -1 1 -5 3 0 NA [3,] -1 6 -2 4 -17 NA [4,] 2 -1 1 -3 -6 NA [5,] -3 -2 1 4 -6 NA [6,] 3 -1 3 -1 -1 NA [7,] -1 4 -2 0 -1 NA [8,] 2 -1 0 1 -10 NA [9,] 1 4 2 -1 -7 NA [10,] -4 1 3 -3 0 NA [11,] 7 2 3 -6 -8 NA [12,] 1 0 0 0 1 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/1txjp1258052544.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/2p31p1258052544.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/3s7hc1258052544.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/4350l1258052544.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,] 46 43 44 47 49 47 34 49 49 52 48 55 [2,] 46 50 49 48 49 47 46 49 49 52 48 55 [3,] 56 58 53 50 50 47 50 50 51 53 54 56 [4,] 62 64 64 51 52 53 56 54 54 56 59 62 [5,] 71 73 76 51 52 53 56 54 54 56 59 71 $n [1] 6 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 45.67948 48.10764 42.40104 47.88021 47.88021 42.76042 42.93403 46.46701 [2,] 66.32052 67.89236 63.59896 52.11979 52.11979 51.23958 57.06597 53.53299 [,9] [,10] [,11] [,12] [1,] 47.46701 50.17361 46.22743 51.05382 [2,] 54.53299 55.82639 61.77257 60.94618 $out [1] 9 80 77 41 81 35 80 80 33 81 23 80 16 77 16 8 $group [1] 1 4 5 5 6 6 7 8 8 9 9 10 10 11 11 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(46, 46, 56, 62, 71, 43, 50, 58, 64, 73, 44, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/5y9251258052544.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,] -13 -1 -2 -6 -6 -1 -2 -1 -1 -4 -8 0 [2,] -7 -1 -2 -3 -3 -1 -1 -1 -1 -3 -6 0 [3,] 2 0 -1 -1 -2 -1 -1 0 1 0 2 0 [4,] 4 1 4 1 1 3 0 1 2 1 3 1 [5,] 11 3 6 2 4 3 0 2 4 3 7 1 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -5.772572 -1.413195 -5.239585 -3.82639 -4.82639 -3.82639 -1.7065975 [2,] 9.772572 1.413195 3.239585 1.82639 0.82639 1.82639 -0.2934025 [,8] [,9] [,10] [,11] [,12] [1,] -1.413195 -1.119792 -2.82639 -4.359377 -0.7065975 [2,] 1.413195 3.119792 2.82639 8.359377 0.7065975 $out [1] -5 -17 4 -10 -7 $group [1] 2 3 7 8 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-13, -7, 2, 4, 11, -1, -1, 0, 1, 3, -2, -2, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/6iqns1258052544.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,] 46.0 43.0 51 71.0 8.0 9 [2,] 48.0 46.5 53 74.5 19.5 9 [3,] 49.5 49.5 55 78.5 34.5 9 [4,] 50.5 53.5 57 80.0 55.5 9 [5,] 52.0 56.0 62 81.0 71.0 9 $n [1] 12 12 12 12 12 1 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 48.35973 46.30725 53.17557 75.99141 18.08016 9 [2,] 50.64027 52.69275 56.82443 81.00859 50.91984 9 $out [1] 55 62 $group [1] 1 4 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(46, 48, 49.5, 50.5, 52, 43, 46.5, 49.5, 53.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/7iozv1258052544.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,] 50.0 47 49.50 [2,] 51.1 50 50.75 [3,] 52.9 52 52.50 [4,] 54.5 55 55.50 [5,] 57.6 58 58.50 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 51.34924 49.71947 50.33349 [2,] 54.45076 54.28053 54.66651 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(50, 51.1, 52.9, 54.5, 57.6, 47, 50, 52, 55, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1txjp1258052544.ps tmp/1txjp1258052544.png") > system("convert tmp/2p31p1258052544.ps tmp/2p31p1258052544.png") > system("convert tmp/3s7hc1258052544.ps tmp/3s7hc1258052544.png") > system("convert tmp/4350l1258052544.ps tmp/4350l1258052544.png") > system("convert tmp/5y9251258052544.ps tmp/5y9251258052544.png") > system("convert tmp/6iqns1258052544.ps tmp/6iqns1258052544.png") > system("convert tmp/7iozv1258052544.ps tmp/7iozv1258052544.png") > > > proc.time() user system elapsed 1.660 1.460 2.383