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(268,267,266,264,284,283,268,258,259,259,260,262,255,259,258,258,288,289,271,268,274,284,284,279,273,280,276,271,298,297,278,270,280,289,288,293,285,283,275,268,295,290,267,252,268,278,280,278,261,263,259,265,294,285,255,231,246,258,265,260,238,241,239,233,265,255,224,194,210,222,230,225,206,204,207,195,230,221,195,162,182,203,211,206,187,181,189,174,213,201,177,140,165,192,197,196,176,164,177,165,208,195,164,123,147,173,176,170,157,145,148,135,175,168,140,109,129,150,150,152) > 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,] 268 255 273 285 261 238 206 187 176 157 NA [2,] 267 259 280 283 263 241 204 181 164 145 NA [3,] 266 258 276 275 259 239 207 189 177 148 NA [4,] 264 258 271 268 265 233 195 174 165 135 NA [5,] 284 288 298 295 294 265 230 213 208 175 NA [6,] 283 289 297 290 285 255 221 201 195 168 NA [7,] 268 271 278 267 255 224 195 177 164 140 NA [8,] 258 268 270 252 231 194 162 140 123 109 NA [9,] 259 274 280 268 246 210 182 165 147 129 NA [10,] 259 284 289 278 258 222 203 192 173 150 NA [11,] 260 284 288 280 265 230 211 197 176 150 NA [12,] 262 279 293 278 260 225 206 196 170 152 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] -1 4 7 -2 2 3 -2 -6 -12 -12 NA [2,] -1 -1 -4 -8 -4 -2 3 8 13 3 NA [3,] -2 0 -5 -7 6 -6 -12 -15 -12 -13 NA [4,] 20 30 27 27 29 32 35 39 43 40 NA [5,] -1 1 -1 -5 -9 -10 -9 -12 -13 -7 NA [6,] -15 -18 -19 -23 -30 -31 -26 -24 -31 -28 NA [7,] -10 -3 -8 -15 -24 -30 -33 -37 -41 -31 NA [8,] 1 6 10 16 15 16 20 25 24 20 NA [9,] 0 10 9 10 12 12 21 27 26 21 NA [10,] 1 0 -1 2 7 8 8 5 3 0 NA [11,] 2 -5 5 -2 -5 -5 -5 -1 -6 2 NA [12,] -7 -6 -8 -17 -22 -19 -19 -20 -13 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/1mewi1279373359.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/2x5dl1279373359.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/3x5dl1279373359.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/4qxuo1279373359.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,] 157.0 145 148.0 135.0 175.0 168 140.0 109.0 129 150 150 152.0 [2,] 187.0 181 189.0 174.0 213.0 201 177.0 140.0 165 192 197 196.0 [3,] 246.5 250 248.5 245.5 274.5 269 239.5 212.5 228 240 245 242.5 [4,] 268.0 267 266.0 265.0 294.0 289 268.0 258.0 268 278 280 278.0 [5,] 285.0 283 276.0 271.0 298.0 297 278.0 270.0 280 289 288 293.0 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 206.0292 207.0310 210.0277 200.0328 234.0292 225.0317 194.0328 153.5425 [2,] 286.9708 292.9690 286.9723 290.9672 314.9708 312.9683 284.9672 271.4575 [,9] [,10] [,11] [,12] [1,] 176.5371 197.0310 203.5299 201.5295 [2,] 279.4629 282.9690 286.4701 283.4705 $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(157, 187, 246.5, 268, 285, 145, 181, 250, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5qxuo1279373359.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,] -12.0 -8 -15.0 20 -13 -31 -41 1 0 -1.0 -6.0 -22 [2,] -6.0 -4 -12.0 27 -10 -30 -33 10 10 0.0 -5.0 -19 [3,] -1.5 -1 -6.5 31 -8 -25 -27 16 12 2.5 -3.5 -17 [4,] 3.0 3 -2.0 39 -1 -19 -10 20 21 7.0 2.0 -8 [5,] 7.0 13 6.0 43 1 -15 -3 25 27 8.0 5.0 -6 $n [1] 10 10 10 10 10 10 10 10 10 10 10 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -5.996759 -4.497479 -11.496399 25.00432 -12.496759 -30.49604 -38.49172 [2,] 2.996759 2.497479 -1.503601 36.99568 -3.503241 -19.50396 -15.50828 [,8] [,9] [,10] [,11] [,12] [1,] 11.00360 6.503961 -0.997479 -6.997479092 -22.79333 [2,] 20.99640 17.496039 5.997479 -0.002520908 -11.20667 $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(-12, -6, -1.5, 3, 7, -8, -4, -1, 3, 13, -15, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6qxuo1279373359.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,] 258.0 255.0 270.0 252 246.0 210.0 182 165.0 147.0 129.0 NA [2,] 259.5 258.5 274.5 268 256.5 223.0 195 175.5 164.0 137.5 NA [3,] 265.0 272.5 280.0 278 260.5 231.5 205 188.0 171.5 149.0 NA [4,] 268.0 284.0 291.0 284 265.0 240.0 209 196.5 176.5 154.5 NA [5,] 268.0 289.0 298.0 295 265.0 265.0 230 213.0 195.0 175.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,] 261.1231 260.8693 272.4742 270.7023 256.6231 223.7462 198.6145 178.4218 [2,] 268.8769 284.1307 287.5258 285.2977 264.3769 239.2538 211.3855 197.5782 [,9] [,10] [,11] [1,] 165.7987 141.2462 NA [2,] 177.2013 156.7538 NA $out [1] 284 283 294 285 231 194 162 140 208 123 109 $group [1] 1 1 5 5 5 6 7 8 9 9 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(258, 259.5, 265, 268, 268, 255, 258.5, 272.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7i6cr1279373359.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,] 216.00 228.00 217.5000 [2,] 223.35 239.75 223.3125 [3,] 230.00 245.25 228.9375 [4,] 233.10 249.25 237.3125 [5,] 234.10 250.00 254.8750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 225.5530 240.917 222.552 [2,] 234.4470 249.583 235.323 $out [1] 255.0 248.4 200.7 274.5 269.0 212.5 201.0 $group [1] 1 1 1 2 2 2 3 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(216, 223.35, 230, 233.1, 234.1, 228, 239.75, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1mewi1279373359.ps tmp/1mewi1279373359.png",intern=TRUE)) character(0) > try(system("convert tmp/2x5dl1279373359.ps tmp/2x5dl1279373359.png",intern=TRUE)) character(0) > try(system("convert tmp/3x5dl1279373359.ps tmp/3x5dl1279373359.png",intern=TRUE)) character(0) > try(system("convert tmp/4qxuo1279373359.ps tmp/4qxuo1279373359.png",intern=TRUE)) character(0) > try(system("convert tmp/5qxuo1279373359.ps tmp/5qxuo1279373359.png",intern=TRUE)) character(0) > try(system("convert tmp/6qxuo1279373359.ps tmp/6qxuo1279373359.png",intern=TRUE)) character(0) > try(system("convert tmp/7i6cr1279373359.ps tmp/7i6cr1279373359.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.133 0.916 1.884