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(433,344,357,385,392,308,294,302,400,392,373,379,303,324,353,392,327,376,329,359,413,338,422,390,370,367,406,418,346,350,329,318,381,337,372,422,427,426,396,458,314,336,385,351,381,438,397,451,362,363,468,371,407,391,364,366,424,364,366,423) > 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] 60 > (np <- floor(n / par1)) [1] 5 > 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] 5 5 5 5 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 433 303 370 427 362 NA [2,] 344 324 367 426 363 NA [3,] 357 353 406 396 468 NA [4,] 385 392 418 458 371 NA [5,] 392 327 346 314 407 NA [6,] 308 376 350 336 391 NA [7,] 294 329 329 385 364 NA [8,] 302 359 318 351 366 NA [9,] 400 413 381 381 424 NA [10,] 392 338 337 438 364 NA [11,] 373 422 372 397 366 NA [12,] 379 390 422 451 423 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -89 21 -3 -1 1 NA [2,] 13 29 39 -30 105 NA [3,] 28 39 12 62 -97 NA [4,] 7 -65 -72 -144 36 NA [5,] -84 49 4 22 -16 NA [6,] -14 -47 -21 49 -27 NA [7,] 8 30 -11 -34 2 NA [8,] 98 54 63 30 58 NA [9,] -8 -75 -44 57 -60 NA [10,] -19 84 35 -41 2 NA [11,] 6 -32 50 54 57 NA [12,] -76 -20 5 -89 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/12kfo1257700266.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/266k11257700266.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/31on11257700266.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/4mprr1257700266.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,] 303 324 353 371 314 308 294 302 381 337 366 379 [2,] 362 344 357 385 327 336 329 318 381 338 372 390 [3,] 370 363 396 392 346 350 329 351 400 364 373 422 [4,] 427 367 406 418 392 376 364 359 413 392 397 423 [5,] 433 367 468 458 407 391 385 366 424 438 422 451 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 324.0712 346.7483 361.3767 368.6823 300.0712 321.7361 304.2691 322.0295 [2,] 415.9288 379.2517 430.6233 415.3177 391.9288 378.2639 353.7309 379.9705 [,9] [,10] [,11] [,12] [1,] 377.3889 325.8437 355.3351 398.6823 [2,] 422.6111 402.1563 390.6649 445.3177 $out [1] 426 $group [1] 2 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(303, 362, 370, 427, 433, 324, 344, 363, 367, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/53kvs1257700266.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,] -3 13 12 -144 -16 -27 -34 54 -75 -41 -32 -89.0 [2,] -3 13 12 -72 -16 -27 -11 54 -60 -19 6 -82.5 [3,] -1 29 28 -65 4 -21 2 58 -44 2 50 -48.0 [4,] 1 39 39 7 22 -14 8 63 -8 35 54 -7.5 [5,] 1 39 62 36 49 -14 30 63 57 84 57 5.0 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -3.82639 10.62847 8.921868 -120.821201 -22.85070 -30.18577 -11.42535 [2,] 1.82639 47.37153 47.078132 -9.178799 30.85070 -11.81423 15.42535 [,8] [,9] [,10] [,11] [,12] [1,] 51.64062 -80.743069 -36.15626 16.08332 -107.25 [2,] 64.35938 -7.256931 40.15626 83.91668 11.25 $out [1] -89 21 -30 105 -97 -84 -47 49 98 30 $group [1] 1 1 2 2 3 5 6 6 8 8 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-3, -3, -1, 1, 1, 13, 13, 29, 39, 39, 12, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6ld211257700266.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] [1,] 294 303 318.0 314.0 362.0 NA [2,] 326 328 341.5 366.0 364.0 NA [3,] 376 356 368.5 396.5 368.5 NA [4,] 392 391 393.5 432.5 415.0 NA [5,] 433 422 422.0 458.0 468.0 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 345.8970 327.2653 344.7825 366.1689 345.2386 NA [2,] 406.1030 384.7347 392.2175 426.8311 391.7614 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(294, 326, 376, 392, 433, 303, 328, 356, 391, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7onrm1257700266.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,] 339.2 329.0 338.50 [2,] 354.7 350.5 355.75 [3,] 376.4 367.0 373.25 [4,] 397.9 394.0 395.75 [5,] 413.0 422.0 406.50 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 356.6962 347.1594 355.0057 [2,] 396.1038 386.8406 391.4943 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(339.2, 354.7, 376.4, 397.9, 413, 329, 350.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/12kfo1257700266.ps tmp/12kfo1257700266.png") > system("convert tmp/266k11257700266.ps tmp/266k11257700266.png") > system("convert tmp/31on11257700266.ps tmp/31on11257700266.png") > system("convert tmp/4mprr1257700266.ps tmp/4mprr1257700266.png") > system("convert tmp/53kvs1257700266.ps tmp/53kvs1257700266.png") > system("convert tmp/6ld211257700266.ps tmp/6ld211257700266.png") > system("convert tmp/7onrm1257700266.ps tmp/7onrm1257700266.png") > > > proc.time() user system elapsed 1.202 0.948 1.521