R version 2.11.1 (2010-05-31) Copyright (C) 2010 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(556,555,554,552,572,571,556,546,547,547,548,550,555,549,555,550,566,573,543,535,542,541,535,536,548,546,548,548,561,563,527,527,541,534,522,527,539,533,532,519,538,542,503,502,522,511,492,500,509,511,505,493,518,518,474,471,483,461,439,446,461,449,441,424,447,448,404,403,411,386,359,370,385,369,368,352,378,383,334,323,330,303,275,284,301,281,284,272,297,300,240,236,247,218,192,201,223,197,195,175,197,204,142,142,151,127,100,114,139,112,123,108,132,140,76,71,81,57,38,46) > 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,] 556 555 548 539 509 461 385 301 223 139 NA [2,] 555 549 546 533 511 449 369 281 197 112 NA [3,] 554 555 548 532 505 441 368 284 195 123 NA [4,] 552 550 548 519 493 424 352 272 175 108 NA [5,] 572 566 561 538 518 447 378 297 197 132 NA [6,] 571 573 563 542 518 448 383 300 204 140 NA [7,] 556 543 527 503 474 404 334 240 142 76 NA [8,] 546 535 527 502 471 403 323 236 142 71 NA [9,] 547 542 541 522 483 411 330 247 151 81 NA [10,] 547 541 534 511 461 386 303 218 127 57 NA [11,] 548 535 522 492 439 359 275 192 100 38 NA [12,] 550 536 527 500 446 370 284 201 114 46 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] -1 -6 -2 -6 2 -12 -16 -20 -26 -27 NA [2,] -1 6 2 -1 -6 -8 -1 3 -2 11 NA [3,] -2 -5 0 -13 -12 -17 -16 -12 -20 -15 NA [4,] 20 16 13 19 25 23 26 25 22 24 NA [5,] -1 7 2 4 0 1 5 3 7 8 NA [6,] -15 -30 -36 -39 -44 -44 -49 -60 -62 -64 NA [7,] -10 -8 0 -1 -3 -1 -11 -4 0 -5 NA [8,] 1 7 14 20 12 8 7 11 9 10 NA [9,] 0 -1 -7 -11 -22 -25 -27 -29 -24 -24 NA [10,] 1 -6 -12 -19 -22 -27 -28 -26 -27 -19 NA [11,] 2 1 5 8 7 11 9 9 14 8 NA [12,] 5 12 12 9 15 15 17 22 25 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/rcomp/tmp/1h70k1281948767.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/rcomp/tmp/2h70k1281948767.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/rcomp/tmp/3rhzn1281948767.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/rcomp/tmp/4rhzn1281948767.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,] 139 112 123 108.0 132.0 140 76 71 81 57.0 38 46 [2,] 301 281 284 272.0 297.0 300 240 236 247 218.0 192 201 [3,] 485 480 473 458.5 482.5 483 439 437 447 423.5 399 408 [4,] 548 546 548 548.0 561.0 563 527 527 541 534.0 522 527 [5,] 556 555 555 552.0 572.0 573 556 546 547 547.0 548 550 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 361.5890 347.5954 341.0951 320.5994 350.5951 351.5947 295.6034 291.6048 [2,] 608.4110 612.4046 604.9049 596.4006 614.4049 614.4053 582.3966 582.3952 [,9] [,10] [,11] [,12] [1,] 300.1059 265.6138 234.1188 245.1174 [2,] 593.8941 581.3862 563.8812 570.8826 $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(139, 301, 485, 548, 556, 112, 281, 480, 546, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/5rhzn1281948767.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,] -27 -8 -20.0 13.0 -1.0 -64 -11.0 1.0 -29 -28.0 1 5 [2,] -20 -2 -16.0 19.0 1.0 -60 -8.0 7.0 -25 -27.0 5 12 [3,] -9 -1 -12.5 22.5 3.5 -44 -3.5 9.5 -23 -20.5 8 15 [4,] -2 3 -5.0 25.0 7.0 -36 -1.0 12.0 -7 -12.0 9 17 [5,] 2 6 0.0 26.0 8.0 -15 0.0 14.0 0 1.0 14 22 $n [1] 10 10 10 10 10 10 10 10 10 10 10 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] -17.993517666 -3.498199 -17.996039 19.50216 0.5021608 -55.99136 [2,] -0.006482334 1.498199 -7.003961 25.49784 6.4978392 -32.00864 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -6.997479092 7.0018 -31.99352 -27.99460 6.00144 12.36667 [2,] -0.002520908 11.9982 -14.00648 -13.00540 9.99856 17.63333 $out [1] 11 20 25 $group [1] 2 8 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-27, -20, -9, -2, 2, -8, -2, -1, 3, 6, -20, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/6k8y81281948767.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,] 546.0 535.0 522.0 492.0 439 359.0 275.0 192.0 100.0 38.0 NA [2,] 547.5 538.5 527.0 502.5 466 394.5 313.0 227.0 134.5 64.0 NA [3,] 553.0 546.0 543.5 520.5 488 417.5 343.0 259.5 163.0 94.5 NA [4,] 556.0 555.0 548.0 535.5 510 447.5 373.5 290.5 197.0 127.5 NA [5,] 556.0 573.0 563.0 542.0 518 461.0 385.0 301.0 223.0 140.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,] 549.1231 538.4742 533.9218 505.4485 467.9313 393.3263 315.4055 230.5372 [2,] 556.8769 553.5258 553.0782 535.5515 508.0687 441.6737 370.5945 288.4628 [,9] [,10] [,11] [1,] 134.4933 65.53722 NA [2,] 191.5067 123.46278 NA $out [1] 572 571 $group [1] 1 1 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(546, 547.5, 553, 556, 556, 535, 538.5, 546, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/7k8y81281948767.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,] 350.00 399.00 363.6250 [2,] 372.05 430.25 386.5000 [3,] 392.40 452.75 409.1875 [4,] 415.55 481.25 429.1875 [5,] 424.20 485.00 439.2500 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 372.5594 429.4886 389.7174 [2,] 412.2406 476.0114 428.6576 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(350, 372.05, 392.4, 415.55, 424.2, 399, 430.25, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1h70k1281948767.ps tmp/1h70k1281948767.png",intern=TRUE)) character(0) > try(system("convert tmp/2h70k1281948767.ps tmp/2h70k1281948767.png",intern=TRUE)) character(0) > try(system("convert tmp/3rhzn1281948767.ps tmp/3rhzn1281948767.png",intern=TRUE)) character(0) > try(system("convert tmp/4rhzn1281948767.ps tmp/4rhzn1281948767.png",intern=TRUE)) character(0) > try(system("convert tmp/5rhzn1281948767.ps tmp/5rhzn1281948767.png",intern=TRUE)) character(0) > try(system("convert tmp/6k8y81281948767.ps tmp/6k8y81281948767.png",intern=TRUE)) character(0) > try(system("convert tmp/7k8y81281948767.ps tmp/7k8y81281948767.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.01 1.30 3.26