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(95,94,93,91,111,110,95,85,86,86,87,89,93,96,99,92,109,110,97,88,93,93,89,89,91,97,99,85,101,105,88,80,87,84,87,87,85,96,102,93,111,117,101,88,98,89,93,93,95,105,109,94,113,125,106,95,109,100,94,94,94,103,103,80,106,117,99,95,116,118,100,100,105,121,131,108,136,149,131,137,164,169,154,160,166,186,197,166,191,207,187,191,222,230,210,224,234,251,258,227,254,281,261,264,286,293,276,292,299,319,329,293,318,346,327,329,353,355,332,346) > 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] 120 > (np <- floor(n / par1)) [1] 10 > 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] 10 10 10 10 10 10 10 10 10 10 10 10 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] 95 93 91 85 95 94 105 166 234 299 NA [2,] 94 96 97 96 105 103 121 186 251 319 NA [3,] 93 99 99 102 109 103 131 197 258 329 NA [4,] 91 92 85 93 94 80 108 166 227 293 NA [5,] 111 109 101 111 113 106 136 191 254 318 NA [6,] 110 110 105 117 125 117 149 207 281 346 NA [7,] 95 97 88 101 106 99 131 187 261 327 NA [8,] 85 88 80 88 95 95 137 191 264 329 NA [9,] 86 93 87 98 109 116 164 222 286 353 NA [10,] 86 93 84 89 100 118 169 230 293 355 NA [11,] 87 89 87 93 94 100 154 210 276 332 NA [12,] 89 89 87 93 94 100 160 224 292 346 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] -1 3 6 11 10 9 16 20 17 20 NA [2,] -1 3 2 6 4 0 10 11 7 10 NA [3,] -2 -7 -14 -9 -15 -23 -23 -31 -31 -36 NA [4,] 20 17 16 18 19 26 28 25 27 25 NA [5,] -1 1 4 6 12 11 13 16 27 28 NA [6,] -15 -13 -17 -16 -19 -18 -18 -20 -20 -19 NA [7,] -10 -9 -8 -13 -11 -4 6 4 3 2 NA [8,] 1 5 7 10 14 21 27 31 22 24 NA [9,] 0 0 -3 -9 -9 2 5 8 7 2 NA [10,] 1 -4 3 4 -6 -18 -15 -20 -17 -23 NA [11,] 2 0 0 0 0 0 6 14 16 14 NA [12,] 4 2 -2 2 0 5 6 10 7 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/17zoh1280840143.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/2i86k1280840143.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/3i86k1280840143.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/4shn51280840143.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,] 85 94 93 80.0 101 105 88.0 80 86.0 84 87 87 [2,] 93 96 99 91.0 109 110 97.0 88 93.0 89 89 89 [3,] 95 104 106 93.5 112 121 103.5 95 112.5 109 97 97 [4,] 166 186 197 166.0 191 207 187.0 191 222.0 230 210 224 [5,] 234 319 329 227.0 254 346 261.0 329 353.0 355 332 346 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 58.52629 59.03241 57.03529 56.02701 71.02953 72.53493 58.53241 [2,] 131.47371 148.96759 154.96471 130.97299 152.97047 169.46507 148.46759 [,8] [,9] [,10] [,11] [,12] [1,] 43.53709 48.04646 38.55078 36.54358 29.54862 [2,] 146.46291 176.95354 179.44922 157.45642 164.45138 $out [1] 299 293 318 327 $group [1] 1 4 5 7 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(85, 93, 95, 166, 234, 94, 96, 104, 186, 319, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5shn51280840143.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.0 -1 -36 16.0 -1.0 -20 -13 1.0 -9 -23.0 0 -2 [2,] 6.0 2 -31 18.0 4.0 -19 -10 7.0 -3 -18.0 0 2 [3,] 10.5 5 -19 22.5 11.5 -18 -6 17.5 1 -10.5 1 4 [4,] 17.0 10 -9 26.0 16.0 -16 3 24.0 5 1.0 14 6 [5,] 20.0 11 -2 28.0 28.0 -13 6 31.0 8 4.0 16 10 $n [1] 10 10 10 10 10 10 10 10 10 10 10 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 5.003961 1.002881 -29.992077 18.50288 5.504322 -19.49892 -12.4953183 [2,] 15.996039 8.997119 -8.007923 26.49712 17.495678 -16.50108 0.4953183 [,8] [,9] [,10] [,11] [,12] [1,] 9.006122 -2.997119 -19.993158 -5.994958 1.893333 [2,] 25.993878 4.997119 -1.006842 7.994958 6.106667 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-1, 6, 10.5, 17, 20, -1, 2, 5, 10, 11, -36, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6lqmq1280840143.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] [,8] [,9] [,10] [,11] [1,] 85.0 88.0 80.0 85.0 94.0 80.0 105.0 166.0 227.0 293.0 NA [2,] 86.5 90.5 86.0 91.0 94.5 97.0 126.0 186.5 252.5 318.5 NA [3,] 92.0 93.0 87.5 94.5 102.5 101.5 136.5 194.0 262.5 329.0 NA [4,] 95.0 98.0 98.0 101.5 109.0 111.0 157.0 216.0 283.5 346.0 NA [5,] 95.0 109.0 105.0 117.0 125.0 118.0 169.0 230.0 293.0 355.0 NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 88.1231 89.5792 82.02672 89.71088 95.88645 95.1145 122.3607 180.5449 [2,] 95.8769 96.4208 92.97328 99.28912 109.11355 107.8855 150.6393 207.4551 [,9] [,10] [,11] [1,] 248.3607 316.4571 NA [2,] 276.6393 341.5429 NA $out [1] 111 110 110 $group [1] 1 1 2 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(85, 86.5, 92, 95, 95, 88, 90.5, 93, 98, 109, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7lqmq1280840143.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,] 132.9 93.50 121.3750 [2,] 146.0 96.00 132.8750 [3,] 152.1 103.75 141.5625 [4,] 159.4 110.50 149.9375 [5,] 166.7 121.00 152.3750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 145.9882 97.13645 133.7802 [2,] 158.2118 110.36355 149.3448 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(132.9, 146, 152.1, 159.4, 166.7, 93.5, 96, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/17zoh1280840143.ps tmp/17zoh1280840143.png",intern=TRUE)) character(0) > try(system("convert tmp/2i86k1280840143.ps tmp/2i86k1280840143.png",intern=TRUE)) character(0) > try(system("convert tmp/3i86k1280840143.ps tmp/3i86k1280840143.png",intern=TRUE)) character(0) > try(system("convert tmp/4shn51280840143.ps tmp/4shn51280840143.png",intern=TRUE)) character(0) > try(system("convert tmp/5shn51280840143.ps tmp/5shn51280840143.png",intern=TRUE)) character(0) > try(system("convert tmp/6lqmq1280840143.ps tmp/6lqmq1280840143.png",intern=TRUE)) character(0) > try(system("convert tmp/7lqmq1280840143.ps tmp/7lqmq1280840143.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.212 0.935 1.650