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(349,348,347,345,365,364,349,339,340,340,341,343,341,343,341,335,355,357,337,325,336,338,337,328,326,327,319,310,320,322,303,292,303,315,311,307,308,312,309,310,309,304,287,275,290,298,294,286,294,292,287,281,280,271,264,259,271,279,279,273,286,286,280,277,269,255,252,245,257,267,261,258,271,262,258,253,236,228,235,226,231,235,227,222,233,221,218,220,204,196,208,190,191,194,179,162,179,176,168,170,153,142,155,136,136,144,135,114,135,132,123,123,103,97,113,108,111,121,111,97) > 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,] 349 341 326 308 294 286 271 233 179 135 NA [2,] 348 343 327 312 292 286 262 221 176 132 NA [3,] 347 341 319 309 287 280 258 218 168 123 NA [4,] 345 335 310 310 281 277 253 220 170 123 NA [5,] 365 355 320 309 280 269 236 204 153 103 NA [6,] 364 357 322 304 271 255 228 196 142 97 NA [7,] 349 337 303 287 264 252 235 208 155 113 NA [8,] 339 325 292 275 259 245 226 190 136 108 NA [9,] 340 336 303 290 271 257 231 191 136 111 NA [10,] 340 338 315 298 279 267 235 194 144 121 NA [11,] 341 337 311 294 279 261 227 179 135 111 NA [12,] 343 328 307 286 273 258 222 162 114 97 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] -1 2 1 4 -2 0 -9 -12 -3 -3 NA [2,] -1 -2 -8 -3 -5 -6 -4 -3 -8 -9 NA [3,] -2 -6 -9 1 -6 -3 -5 2 2 0 NA [4,] 20 20 10 -1 -1 -8 -17 -16 -17 -20 NA [5,] -1 2 2 -5 -9 -14 -8 -8 -11 -6 NA [6,] -15 -20 -19 -17 -7 -3 7 12 13 16 NA [7,] -10 -12 -11 -12 -5 -7 -9 -18 -19 -5 NA [8,] 1 11 11 15 12 12 5 1 0 3 NA [9,] 0 2 12 8 8 10 4 3 8 10 NA [10,] 1 -1 -4 -4 0 -6 -8 -15 -9 -10 NA [11,] 2 -9 -4 -8 -6 -3 -5 -17 -21 -14 NA [12,] -2 -2 1 8 13 13 11 17 21 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/1aroa1282136727.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/2aroa1282136727.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/33i6v1282136727.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/43i6v1282136727.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,] 135 132 123.0 123 103.0 97 113 108 111 121 111 97.0 [2,] 233 221 218.0 220 204.0 196 208 190 191 194 179 162.0 [3,] 290 289 283.5 279 274.5 263 258 252 264 273 270 265.5 [4,] 326 327 319.0 310 320.0 322 303 292 303 315 311 307.0 [5,] 349 348 347.0 345 365.0 364 349 339 340 340 341 343.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,] 243.5335 236.0382 233.0364 234.0324 216.5418 200.0454 210.5342 201.0367 [2,] 336.4665 341.9618 333.9636 323.9676 332.4582 325.9546 305.4658 302.9633 [,9] [,10] [,11] [,12] [1,] 208.0403 212.5436 204.0475 193.0522 [2,] 319.9597 333.4564 335.9525 337.9478 $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(135, 233, 290, 326, 349, 132, 221, 289, 327, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5dr5g1282136727.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,] -9.0 -9.0 -9.0 -20.0 -14 -20 -19.0 0 0 -15 -21 -2 [2,] -3.0 -8.0 -6.0 -17.0 -9 -17 -12.0 1 3 -9 -14 1 [3,] -1.5 -4.5 -2.5 -4.5 -7 -5 -10.5 8 8 -5 -7 11 [4,] 1.0 -3.0 1.0 10.0 -1 12 -7.0 12 10 -1 -4 13 [5,] 4.0 -1.0 2.0 20.0 2 16 -5.0 15 12 1 2 21 $n [1] 10 10 10 10 10 10 10 10 10 10 10 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -3.4985595 -6.998199 -5.997479 -17.990276 -10.997119 -19.489556 -12.9982 [2,] 0.4985595 -2.001801 0.997479 8.990276 -3.002881 9.489556 -8.0018 [,8] [,9] [,10] [,11] [,12] [1,] 2.503961 4.502521 -8.997119 -11.996399 4.68 [2,] 13.496039 11.497479 -1.002881 -2.003601 17.32 $out [1] -12 $group [1] 1 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-9, -3, -1.5, 1, 4, -9, -8, -4.5, -3, -1, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6dr5g1282136727.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,] 339.0 328.0 292 275.0 259 245.0 222.0 162.0 114.0 97.0 NA [2,] 340.5 335.5 305 288.5 271 256.0 227.5 190.5 136.0 105.5 NA [3,] 346.0 337.5 313 301.0 279 264.0 235.0 200.0 148.5 112.0 NA [4,] 349.0 342.0 321 309.0 284 278.5 255.5 219.0 169.0 123.0 NA [5,] 349.0 343.0 327 312.0 294 286.0 271.0 233.0 179.0 135.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,] 342.1231 334.5353 305.7023 291.6498 273.0706 253.7376 222.229 187.0010 [2,] 349.8769 340.4647 320.2977 310.3502 284.9294 274.2624 247.771 212.9990 [,9] [,10] [,11] [1,] 133.4485 104.0181 NA [2,] 163.5515 119.9819 NA $out [1] 365 364 355 357 325 $group [1] 1 1 2 2 2 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(339, 340.5, 346, 349, 349, 328, 335.5, 337.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/760411282136727.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,] 239.00 252.00 239.3750 [2,] 247.05 263.50 249.6250 [3,] 253.35 271.50 259.1250 [4,] 263.70 281.25 270.6875 [5,] 272.20 290.00 282.0000 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 245.7558 263.4041 249.5183 [2,] 260.9442 279.5959 268.7317 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(239, 247.05, 253.35, 263.7, 272.2, 252, 263.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1aroa1282136727.ps tmp/1aroa1282136727.png",intern=TRUE)) character(0) > try(system("convert tmp/2aroa1282136727.ps tmp/2aroa1282136727.png",intern=TRUE)) character(0) > try(system("convert tmp/33i6v1282136727.ps tmp/33i6v1282136727.png",intern=TRUE)) character(0) > try(system("convert tmp/43i6v1282136727.ps tmp/43i6v1282136727.png",intern=TRUE)) character(0) > try(system("convert tmp/5dr5g1282136727.ps tmp/5dr5g1282136727.png",intern=TRUE)) character(0) > try(system("convert tmp/6dr5g1282136727.ps tmp/6dr5g1282136727.png",intern=TRUE)) character(0) > try(system("convert tmp/760411282136727.ps tmp/760411282136727.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.184 0.919 4.445