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(79,106,101,104,97,93,99,116,104,99,109,93,91,111,105,114,103,105,106,125,103,114,123,102,101,121,120,119,102,118,114,130,113,119,129,116,110,124,133,129,105,127,127,128,133,122,141,127,110,136,132,110,97,96,98,106,98,94,107,98) > 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,] 79 91 101 110 110 NA [2,] 106 111 121 124 136 NA [3,] 101 105 120 133 132 NA [4,] 104 114 119 129 110 NA [5,] 97 103 102 105 97 NA [6,] 93 105 118 127 96 NA [7,] 99 106 114 127 98 NA [8,] 116 125 130 128 106 NA [9,] 104 103 113 133 98 NA [10,] 99 114 119 122 94 NA [11,] 109 123 129 141 107 NA [12,] 93 102 116 127 98 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 27 20 20 14 26 NA [2,] -5 -6 -1 9 -4 NA [3,] 3 9 -1 -4 -22 NA [4,] -7 -11 -17 -24 -13 NA [5,] -4 2 16 22 -1 NA [6,] 6 1 -4 0 2 NA [7,] 17 19 16 1 8 NA [8,] -12 -22 -17 5 -8 NA [9,] -5 11 6 -11 -4 NA [10,] 10 9 10 19 13 NA [11,] -16 -21 -13 -14 -9 NA [12,] -2 -1 -6 -17 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/1t7eh1257362768.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/2twl31257362768.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/3u7dm1257362768.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/46rl91257362768.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,] 79 106 101 104 97 93 98 106 98 94 107 93 [2,] 91 111 105 110 97 96 99 116 103 99 109 98 [3,] 101 121 120 114 102 105 106 125 104 114 123 102 [4,] 110 124 132 119 103 118 114 128 113 119 129 116 [5,] 110 136 133 129 105 127 127 130 113 122 141 127 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 87.57465 111.8142 100.9219 107.6406 97.76042 89.45486 95.40104 [2,] 114.42535 130.1858 139.0781 120.3594 106.23958 120.54514 116.59896 [,8] [,9] [,10] [,11] [,12] [1,] 116.5208 96.93403 99.86805 108.8681 89.28125 [2,] 133.4792 111.06597 128.13195 137.1319 114.71875 $out [1] 133 $group [1] 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(79, 91, 101, 110, 110, 106, 111, 121, 124, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5cxnw1257362768.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,] 14 -6 -4 -24 -4 0 1 -22 -11 9 -16 -17.0 [2,] 20 -5 -4 -17 -1 0 8 -17 -5 10 -16 -11.5 [3,] 20 -4 -1 -13 2 1 16 -12 -4 10 -14 -4.0 [4,] 26 -1 3 -11 16 2 17 -8 6 13 -13 -1.5 [5,] 27 -1 9 -7 22 2 19 5 11 13 -9 -1.0 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 15.76042 -6.82639 -5.946182 -17.239585 -10.01216 -0.413195 9.640623 [2,] 24.23958 -1.17361 3.946182 -8.760415 14.01216 2.413195 22.359377 [,8] [,9] [,10] [,11] [,12] [1,] -18.359377 -11.772572 7.880208 -16.11979 -11.9 [2,] -5.640623 3.772572 12.119792 -11.88021 3.9 $out [1] 9 -22 6 -4 19 -21 $group [1] 2 3 6 6 10 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(14, 20, 20, 26, 27, -6, -5, -4, -1, -1, -4, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/68ism1257362768.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,] 93 91.0 113.0 122 94.0 NA [2,] 95 103.0 113.5 123 97.5 NA [3,] 100 105.5 118.5 127 102.0 NA [4,] 105 114.0 120.5 131 110.0 NA [5,] 116 125.0 130.0 141 110.0 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 95.43893 100.4828 115.3073 123.3511 96.29867 NA [2,] 104.56107 110.5172 121.6927 130.6489 107.70133 NA $out [1] 79 101 102 110 105 136 132 $group [1] 1 3 3 4 4 5 5 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(93, 95, 100, 105, 116, 91, 103, 105.5, 114, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7nl2z1257362768.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,] 98.2 101.0 100.00 [2,] 107.5 103.0 106.75 [3,] 109.9 110.0 108.50 [4,] 118.9 120.5 118.00 [5,] 121.8 125.0 122.00 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 104.7004 102.0181 103.3688 [2,] 115.0996 117.9819 113.6312 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(98.2, 107.5, 109.9, 118.9, 121.8, 101, 103, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1t7eh1257362768.ps tmp/1t7eh1257362768.png") > system("convert tmp/2twl31257362768.ps tmp/2twl31257362768.png") > system("convert tmp/3u7dm1257362768.ps tmp/3u7dm1257362768.png") > system("convert tmp/46rl91257362768.ps tmp/46rl91257362768.png") > system("convert tmp/5cxnw1257362768.ps tmp/5cxnw1257362768.png") > system("convert tmp/68ism1257362768.ps tmp/68ism1257362768.png") > system("convert tmp/7nl2z1257362768.ps tmp/7nl2z1257362768.png") > > > proc.time() user system elapsed 1.200 0.954 2.071