R version 2.8.0 (2008-10-20) 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(418,426,428,430,424,423,427,441,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) > 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,] 418 461 465 442 409 NA [2,] 426 461 468 444 412 NA [3,] 428 463 467 438 406 NA [4,] 430 462 463 427 398 NA [5,] 424 456 460 424 397 NA [6,] 423 455 462 416 385 NA [7,] 427 456 461 406 390 NA [8,] 441 472 476 431 413 NA [9,] 449 472 476 434 413 NA [10,] 452 471 471 418 401 NA [11,] 462 465 453 412 397 NA [12,] 455 459 443 404 397 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 8 0 3 2 3 NA [2,] 2 2 -1 -6 -6 NA [3,] 2 -1 -4 -11 -8 NA [4,] -6 -6 -3 -3 -1 NA [5,] -1 -1 2 -8 -12 NA [6,] 4 1 -1 -10 5 NA [7,] 14 16 15 25 23 NA [8,] 8 0 0 3 0 NA [9,] 3 -1 -5 -16 -12 NA [10,] 10 -6 -18 -6 -4 NA [11,] -7 -6 -10 -8 0 NA [12,] 6 6 -1 5 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/1ejl01230109978.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/2vkik1230109978.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/30ltp1230109978.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/4rtjt1230109978.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,] 409 412 406 398 397 385 390 413 413 401 397 397 [2,] 418 426 428 427 424 416 406 431 434 418 412 404 [3,] 442 444 438 430 424 423 427 441 449 452 453 443 [4,] 461 461 463 462 456 455 456 472 472 471 462 455 [5,] 465 468 467 463 460 462 461 476 476 471 465 459 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 411.6163 419.2691 413.2691 405.2691 401.3889 395.4427 391.6701 412.0295 [2,] 472.3837 468.7309 462.7309 454.7309 446.6111 450.5573 462.3299 469.9705 [,9] [,10] [,11] [,12] [1,] 422.1493 414.5503 417.6701 406.9635 [2,] 475.8507 489.4497 488.3299 479.0365 $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(409, 418, 442, 461, 465, 412, 426, 444, 461, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5cqlz1230109978.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,] 2 -6 -11 -6 -12 -1 14 0 -16 -6 -10 -1.0 [2,] 2 -6 -8 -6 -8 -1 15 0 -12 -6 -8 2.0 [3,] 3 -1 -4 -3 -1 1 16 0 -5 -6 -7 5.5 [4,] 3 2 -1 -3 -1 4 23 3 -1 -4 -6 6.0 [5,] 3 2 2 -1 2 5 25 3 3 -4 -6 6.0 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 2.293403 -6.65278 -8.9461824 -5.1197924 -5.946182 -2.532987 10.34722 [2,] 3.706597 4.65278 0.9461824 -0.8802076 3.946182 4.532987 21.65278 [,8] [,9] [,10] [,11] [,12] [1,] -2.119792 -12.772572 -7.413195 -8.413195 2.34 [2,] 2.119792 2.772572 -4.586805 -5.586805 8.66 $out [1] 8 0 -10 8 10 -18 0 $group [1] 1 1 6 8 10 10 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(2, 2, 3, 3, 3, -6, -6, -1, 2, 2, -11, -8, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6uqk41230109978.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,] 418.0 455.0 453.0 404.0 385.0 NA [2,] 425.0 457.5 460.5 414.0 397.0 NA [3,] 429.0 461.5 464.0 425.5 399.5 NA [4,] 450.5 468.0 469.5 436.0 410.5 NA [5,] 462.0 472.0 476.0 444.0 413.0 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 417.3693 456.7109 459.895 415.4657 393.3426 NA [2,] 440.6307 466.2891 468.105 435.5343 405.6574 NA $out [1] 443 $group [1] 3 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(418, 425, 429, 450.5, 462, 455, 457.5, 461.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7ma0i1230109978.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.0 423.0 429.50 [2,] 431.9 428.5 436.25 [3,] 438.4 441.5 441.75 [4,] 442.4 446.5 445.00 [5,] 448.8 453.0 453.00 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 433.6109 433.2901 437.7591 [2,] 443.1891 449.7099 445.7409 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(428, 431.9, 438.4, 442.4, 448.8, 423, 428.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1ejl01230109978.ps tmp/1ejl01230109978.png") > system("convert tmp/2vkik1230109978.ps tmp/2vkik1230109978.png") > system("convert tmp/30ltp1230109978.ps tmp/30ltp1230109978.png") > system("convert tmp/4rtjt1230109978.ps tmp/4rtjt1230109978.png") > system("convert tmp/5cqlz1230109978.ps tmp/5cqlz1230109978.png") > system("convert tmp/6uqk41230109978.ps tmp/6uqk41230109978.png") > system("convert tmp/7ma0i1230109978.ps tmp/7ma0i1230109978.png") > > > proc.time() user system elapsed 1.202 0.947 1.597