R version 2.6.2 (2008-02-08) Copyright (C) 2008 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(209,214,265,290,287,270,263,265,252,281,259,312,275,250,312,331,256,247,291,318,296,291,313,311,273,258,361,391,446,433,449,479,460,466,410,415,382,409,496,471,488,584,610,684,626,580,444,552,473,431,513,467,470,455,406,424,406,373,332,310,301,296,333,374,422,424,341,216,319,383,360,400) > 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] 72 > (np <- floor(n / par1)) [1] 6 > 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] 6 6 6 6 6 6 6 6 6 6 6 6 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 209 275 273 382 473 301 NA [2,] 214 250 258 409 431 296 NA [3,] 265 312 361 496 513 333 NA [4,] 290 331 391 471 467 374 NA [5,] 287 256 446 488 470 422 NA [6,] 270 247 433 584 455 424 NA [7,] 263 291 449 610 406 341 NA [8,] 265 318 479 684 424 216 NA [9,] 252 296 460 626 406 319 NA [10,] 281 291 466 580 373 383 NA [11,] 259 313 410 444 332 360 NA [12,] 312 311 415 552 310 400 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 5 -25 -15 27 -42 -5 NA [2,] 51 62 103 87 82 37 NA [3,] 25 19 30 -25 -46 41 NA [4,] -3 -75 55 17 3 48 NA [5,] -17 -9 -13 96 -15 2 NA [6,] -7 44 16 26 -49 -83 NA [7,] 2 27 30 74 18 -125 NA [8,] -13 -22 -19 -58 -18 103 NA [9,] 29 -5 6 -46 -33 64 NA [10,] -22 22 -56 -136 -41 -23 NA [11,] 53 -2 5 108 -22 40 NA [12,] -37 -38 -33 -79 -9 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/10nx61209321952.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/29t8d1209321952.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/301py1209321952.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/45bh01209321952.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,] 209 214 265 290.0 256 247.0 263.0 216 252.0 281 259 310 [2,] 273 250 312 331.0 287 270.0 291.0 265 296.0 291 313 311 [3,] 288 277 347 382.5 434 428.5 373.5 371 362.5 378 346 356 [4,] 382 409 496 467.0 470 455.0 449.0 479 460.0 466 410 415 [5,] 473 431 513 471.0 488 584.0 610.0 684 626.0 580 444 552 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 217.6915 174.4399 228.3141 294.7756 315.9591 309.169 271.5849 232.9631 [2,] 358.3085 379.5601 465.6859 470.2244 552.0409 547.831 475.4151 509.0369 [,9] [,10] [,11] [,12] [1,] 256.7147 265.1193 283.4319 288.9166 [2,] 468.2853 490.8807 408.5681 423.0834 $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(209, 273, 288, 382, 473, 214, 250, 277, 409, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5xlq91209321952.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,] -42 37 -46 -75 -17 -83.0 2.0 -22.0 -46.0 -56 -22.0 -38 [2,] -25 51 -25 -3 -15 -49.0 2.0 -22.0 -33.0 -56 -2.0 -38 [3,] -10 72 22 10 -11 4.5 22.5 -18.5 0.5 -32 22.5 -37 [4,] 5 87 30 48 2 26.0 30.0 -13.0 29.0 -22 53.0 -33 [5,] 27 103 41 55 2 44.0 30.0 -13.0 64.0 22 108.0 -33 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -29.350969 48.77884 -13.47678 -22.89665 -21.96554908 -43.87742 4.439096 [2,] 9.350969 95.22116 57.47678 42.89665 -0.03445092 52.87742 40.560904 [,8] [,9] [,10] [,11] [,12] [1,] -24.30529 -39.492 -53.93110 -12.97678 -40.53299 [2,] -12.69471 40.492 -10.06890 57.97678 -33.46701 $out [1] 96 74 -125 -58 103 -136 -79 -9 $group [1] 5 7 7 8 8 10 12 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-42, -25, -10, 5, 27, 37, 51, 72, 87, 103, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6ne491209321952.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] [1,] 214.0 247.0 273.0 382.0 310.0 216.0 NA [2,] 255.5 265.5 376.0 457.5 389.5 310.0 NA [3,] 265.0 293.5 424.0 524.0 427.5 350.5 NA [4,] 284.0 312.5 454.5 597.0 468.5 391.5 NA [5,] 312.0 331.0 479.0 684.0 513.0 424.0 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 252.0010 272.063 388.1956 460.3731 391.4676 313.3273 NA [2,] 277.9990 314.937 459.8044 587.6269 463.5324 387.6727 NA $out [1] 209 258 $group [1] 1 3 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(214, 255.5, 265, 284, 312, 247, 265.5, 293.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7ru0m1209321952.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,] 353.0000 346.00 357.6250 [2,] 366.5000 346.50 359.4375 [3,] 390.2500 366.75 372.9375 [4,] 395.2500 380.25 384.3750 [5,] 402.1667 428.50 394.8750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 377.1369 351.3564 361.5633 [2,] 403.3631 382.1436 384.3117 $out [1] 318.8333 309.6667 288.0000 277.0000 434.0000 317.6250 316.3750 $group [1] 1 1 2 2 2 3 3 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(353, 366.5, 390.25, 395.25, 402.166666666667, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/10nx61209321952.ps tmp/10nx61209321952.png") > system("convert tmp/29t8d1209321952.ps tmp/29t8d1209321952.png") > system("convert tmp/301py1209321952.ps tmp/301py1209321952.png") > system("convert tmp/45bh01209321952.ps tmp/45bh01209321952.png") > system("convert tmp/5xlq91209321952.ps tmp/5xlq91209321952.png") > system("convert tmp/6ne491209321952.ps tmp/6ne491209321952.png") > system("convert tmp/7ru0m1209321952.ps tmp/7ru0m1209321952.png") > > > proc.time() user system elapsed 1.426 0.918 3.636