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(36,35,34,32,52,51,36,26,27,27,28,30,28,29,25,28,55,53,42,32,37,41,37,38,39,32,36,39,83,83,66,53,72,77,69,72,81,71,63,66,114,116,109,97,111,120,110,106,115,110,103,112,163,166,156,140,166,176,163,162,171,167,163,168,222,216,197,178,204,220,196,195,213,218,216,225,280,272,252,230,248,259,240,237,252,250,255,255,313,291,271,247,268,283,259,259,267,270,279,269,334,326,301,276,301,313,291,287,289,298,320,312,385,380,351,322,350,363,344,345) > 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,] 36 28 39 81 115 171 213 252 267 289 NA [2,] 35 29 32 71 110 167 218 250 270 298 NA [3,] 34 25 36 63 103 163 216 255 279 320 NA [4,] 32 28 39 66 112 168 225 255 269 312 NA [5,] 52 55 83 114 163 222 280 313 334 385 NA [6,] 51 53 83 116 166 216 272 291 326 380 NA [7,] 36 42 66 109 156 197 252 271 301 351 NA [8,] 26 32 53 97 140 178 230 247 276 322 NA [9,] 27 37 72 111 166 204 248 268 301 350 NA [10,] 27 41 77 120 176 220 259 283 313 363 NA [11,] 28 37 69 110 163 196 240 259 291 344 NA [12,] 30 38 72 106 162 195 237 259 287 345 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] -1 1 -7 -10 -5 -4 5 -2 3 9 NA [2,] -1 -4 4 -8 -7 -4 -2 5 9 22 NA [3,] -2 3 3 3 9 5 9 0 -10 -8 NA [4,] 20 27 44 48 51 54 55 58 65 73 NA [5,] -1 -2 0 2 3 -6 -8 -22 -8 -5 NA [6,] -15 -11 -17 -7 -10 -19 -20 -20 -25 -29 NA [7,] -10 -10 -13 -12 -16 -19 -22 -24 -25 -29 NA [8,] 1 5 19 14 26 26 18 21 25 28 NA [9,] 0 4 5 9 10 16 11 15 12 13 NA [10,] 1 -4 -8 -10 -13 -24 -19 -24 -22 -19 NA [11,] 2 1 3 -4 -1 -1 -3 0 -4 1 NA [12,] -2 1 9 9 9 18 15 8 2 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/1d3sq1281702824.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/2d3sq1281702824.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/3oc9b1281702824.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/4oc9b1281702824.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,] 28 29.0 25 28 52.0 51 36.0 26 27 27 28.0 30.0 [2,] 39 35.0 36 39 83.0 83 66.0 53 72 77 69.0 72.0 [3,] 143 138.5 133 140 192.5 191 176.5 159 185 198 179.5 178.5 [4,] 252 250.0 255 255 313.0 291 271.0 247 268 283 259.0 259.0 [5,] 289 298.0 320 312 385.0 380 351.0 322 350 363 344.0 345.0 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 36.57671 31.07743 23.57887 32.07779 77.58283 87.0749 74.07383 [2,] 249.42329 245.92257 242.42113 247.92221 307.41717 294.9251 278.92617 [,8] [,9] [,10] [,11] [,12] [1,] 62.06987 87.07059 95.07419 84.56842 85.06734 [2,] 255.93013 282.92941 300.92581 274.43158 271.93266 $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(28, 39, 143, 252, 289, 29, 35, 138.5, 250, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5oc9b1281702824.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,] -10.0 -8.0 -10 27.0 -8.0 -29 -29.0 1 0.0 -24 -4.0 -2 [2,] -5.0 -4.0 -2 44.0 -8.0 -20 -24.0 14 5.0 -22 -3.0 2 [3,] -1.5 -1.5 3 52.5 -3.5 -18 -17.5 20 10.5 -16 -0.5 9 [4,] 3.0 5.0 5 58.0 0.0 -11 -12.0 26 13.0 -8 1.0 9 [5,] 9.0 9.0 9 73.0 3.0 -7 -10.0 28 16.0 1 3.0 18 $n [1] 10 10 10 10 10 10 10 10 10 10 10 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -5.497119 -5.996759 -0.4974791 45.50504 -7.497119 -22.49676 -23.49568 [2,] 2.497119 2.996759 6.4974791 59.49496 0.497119 -13.50324 -11.50432 [,8] [,9] [,10] [,11] [,12] [1,] 14.00432 6.502881 -22.994958 -2.498559 5.313333 [2,] 25.99568 14.497119 -9.005042 1.498559 12.686667 $out [1] 22 20 -22 $group [1] 2 4 5 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-10, -5, -1.5, 3, 9, -8, -4, -1.5, 5, 9, -10, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6h49w1281702824.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,] 26.0 25.0 32.0 63.0 103.0 163.0 213.0 247.0 267 289.0 NA [2,] 27.5 28.5 39.0 76.0 113.5 169.5 221.5 253.5 273 316.0 NA [3,] 33.0 37.0 67.5 107.5 159.0 195.5 238.5 259.0 289 344.5 NA [4,] 36.0 41.5 74.5 112.5 164.5 210.0 255.5 277.0 307 357.0 NA [5,] 36.0 55.0 83.0 120.0 176.0 222.0 280.0 291.0 334 385.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,] 29.12309 31.07061 51.30821 90.8521 135.7386 177.0277 222.9924 248.2815 [2,] 36.87691 42.92939 83.69179 124.1479 182.2614 213.9723 254.0076 269.7185 [,9] [,10] [,11] [1,] 273.4924 325.7996 NA [2,] 304.5076 363.2004 NA $out [1] 52 51 313 $group [1] 1 1 8 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(26, 27.5, 33, 36, 36, 25, 28.5, 37, 41.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7h49w1281702824.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,] 148.00 133.0 143.000 [2,] 150.00 141.5 146.250 [3,] 173.40 177.5 166.875 [4,] 183.15 188.0 177.375 [5,] 200.10 198.0 197.750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 158.2801 156.2910 152.6787 [2,] 188.5199 198.7090 181.0713 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(148, 150, 173.4, 183.15, 200.1, 133, 141.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1d3sq1281702824.ps tmp/1d3sq1281702824.png",intern=TRUE)) character(0) > try(system("convert tmp/2d3sq1281702824.ps tmp/2d3sq1281702824.png",intern=TRUE)) character(0) > try(system("convert tmp/3oc9b1281702824.ps tmp/3oc9b1281702824.png",intern=TRUE)) character(0) > try(system("convert tmp/4oc9b1281702824.ps tmp/4oc9b1281702824.png",intern=TRUE)) character(0) > try(system("convert tmp/5oc9b1281702824.ps tmp/5oc9b1281702824.png",intern=TRUE)) character(0) > try(system("convert tmp/6h49w1281702824.ps tmp/6h49w1281702824.png",intern=TRUE)) character(0) > try(system("convert tmp/7h49w1281702824.ps tmp/7h49w1281702824.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.175 0.941 1.639