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(449,452,462,455,461,461,463,462,456,455,456,472,472,471,465,459,465,468,467,463,460,462,461,476,476,471,453,443,442,444,438,427,424,416,406,431,434,418,412,404,409,412,406,398,397,385,390,413,413,401,397,397,409,419,424,428,430,424,433,456,459) > 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] 61 > (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] 6 5 5 5 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 449 472 476 434 413 459 [2,] 452 471 471 418 401 NA [3,] 462 465 453 412 397 NA [4,] 455 459 443 404 397 NA [5,] 461 465 442 409 409 NA [6,] 461 468 444 412 419 NA [7,] 463 467 438 406 424 NA [8,] 462 463 427 398 428 NA [9,] 456 460 424 397 430 NA [10,] 455 462 416 385 424 NA [11,] 456 461 406 390 433 NA [12,] 472 476 431 413 456 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 3 -1 -5 -16 -12 NA [2,] 10 -6 -18 -6 -4 NA [3,] -7 -6 -10 -8 0 NA [4,] 6 6 -1 5 12 NA [5,] 0 3 2 3 10 NA [6,] 2 -1 -6 -6 5 NA [7,] -1 -4 -11 -8 4 NA [8,] -6 -3 -3 -1 2 NA [9,] -1 2 -8 -12 -6 NA [10,] 1 -1 -10 5 9 NA [11,] 16 15 25 23 23 NA [12,] 0 0 3 0 3 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/16ged1257763987.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/2ohvn1257763987.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/3cpun1257763987.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/402my1257763987.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,] 413 401 397 397 409 412 406 398 397 385 390 413 [2,] 434 418 412 404 409 419 424 427 424 416 406 431 [3,] 454 452 453 443 442 444 438 428 430 424 433 456 [4,] 472 471 462 455 461 461 463 462 456 455 456 472 [5,] 476 471 465 459 465 468 467 463 460 462 461 476 $n [1] 6 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 429.4888 414.5503 417.6701 406.9635 405.2569 414.3229 410.4427 403.2691 [2,] 478.5112 489.4497 488.3299 479.0365 478.7431 473.6771 465.5573 452.7309 [,9] [,10] [,11] [,12] [1,] 407.3889 396.4427 397.6701 427.0295 [2,] 452.6111 451.5573 468.3299 484.9705 $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(413, 434, 454, 472, 476, 401, 418, 452, 471, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/50g7e1257763987.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,] -16 -6 -10 5 2 -6 -11 -6 -12 -10 15 0 [2,] -12 -6 -8 5 2 -6 -8 -3 -8 -1 16 0 [3,] -5 -6 -7 6 3 -1 -4 -3 -6 1 23 0 [4,] -1 -4 -6 6 3 2 -1 -1 -1 5 23 3 [5,] 3 -4 -6 6 3 5 4 2 2 9 25 3 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -12.772572 -7.413195 -8.413195 5.293403 2.293403 -6.65278 -8.9461824 [2,] 2.772572 -4.586805 -5.586805 6.706597 3.706597 4.65278 0.9461824 [,8] [,9] [,10] [,11] [,12] [1,] -4.413195 -10.946182 -3.239585 18.05382 -2.119792 [2,] -1.586805 -1.053818 5.239585 27.94618 2.119792 $out [1] 10 -18 0 -1 12 0 10 $group [1] 2 2 3 4 4 5 5 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-16, -12, -5, -1, 3, -6, -6, -6, -4, -4, -10, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6vyse1257763987.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,] 449.0 459.0 406.0 385.0 397.0 459 [2,] 455.0 461.5 425.5 397.5 405.0 459 [3,] 458.5 465.0 440.0 407.5 421.5 459 [4,] 462.0 469.5 448.5 412.5 429.0 459 [5,] 472.0 476.0 476.0 434.0 456.0 459 $n [1] 12 12 12 12 12 1 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 455.3073 461.3511 429.5095 400.6584 410.5534 459 [2,] 461.6927 468.6489 450.4905 414.3416 432.4466 459 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(449, 455, 458.5, 462, 472, 459, 461.5, 465, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7y3tj1257763987.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,] 428.4 424.0 429.50 [2,] 432.5 431.5 435.25 [3,] 437.5 442.5 440.00 [4,] 441.7 452.5 444.50 [5,] 450.5 456.0 453.25 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 433.3038 432.9218 435.781 [2,] 441.6962 452.0782 444.219 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" > dev.off() null device 1 > > system("convert tmp/16ged1257763987.ps tmp/16ged1257763987.png") > system("convert tmp/2ohvn1257763987.ps tmp/2ohvn1257763987.png") > system("convert tmp/3cpun1257763987.ps tmp/3cpun1257763987.png") > system("convert tmp/402my1257763987.ps tmp/402my1257763987.png") > system("convert tmp/50g7e1257763987.ps tmp/50g7e1257763987.png") > system("convert tmp/6vyse1257763987.ps tmp/6vyse1257763987.png") > system("convert tmp/7y3tj1257763987.ps tmp/7y3tj1257763987.png") > > > proc.time() user system elapsed 1.197 0.956 2.175