R version 2.7.0 (2008-04-22) 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(555,562,561,555,544,537,543,594,611,613,611,594,595,591,589,584,573,567,569,621,629,628,612,595,597,593,590,580,574,573,573,620,626,620,588,566,557,561,549,532,526,511,499,555,565,542,527,510,514,517,508,493,490,469,478,528,534,518,506,502) > 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,] 555 595 597 557 514 NA [2,] 562 591 593 561 517 NA [3,] 561 589 590 549 508 NA [4,] 555 584 580 532 493 NA [5,] 544 573 574 526 490 NA [6,] 537 567 573 511 469 NA [7,] 543 569 573 499 478 NA [8,] 594 621 620 555 528 NA [9,] 611 629 626 565 534 NA [10,] 613 628 620 542 518 NA [11,] 611 612 588 527 506 NA [12,] 594 595 566 510 502 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 7 -4 -4 4 3 NA [2,] -1 -2 -3 -12 -9 NA [3,] -6 -5 -10 -17 -15 NA [4,] -11 -11 -6 -6 -3 NA [5,] -7 -6 -1 -15 -21 NA [6,] 6 2 0 -12 9 NA [7,] 51 52 47 56 50 NA [8,] 17 8 6 10 6 NA [9,] 2 -1 -6 -23 -16 NA [10,] -2 -16 -32 -15 -12 NA [11,] -17 -17 -22 -17 -4 NA [12,] 1 2 -9 4 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/14v9f1230042097.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/2n23p1230042097.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/3f7qk1230042097.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/4vqcs1230042097.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,] 514 517 508 493 490 469 478 528 534 518 506 502 [2,] 555 561 549 532 526 511 499 555 565 542 527 510 [3,] 557 562 561 555 544 537 543 594 611 613 588 566 [4,] 595 591 589 580 573 567 569 620 626 620 611 594 [5,] 597 593 590 584 574 573 573 621 629 628 612 595 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 528.7361 540.8021 532.7361 521.0833 510.7899 497.4305 493.5382 548.0712 [2,] 585.2639 583.1979 589.2639 588.9167 577.2101 576.5695 592.4618 639.9288 [,9] [,10] [,11] [,12] [1,] 567.8976 557.8854 528.6458 506.6458 [2,] 654.1024 668.1146 647.3542 625.3542 $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(514, 555, 557, 595, 597, 517, 561, 562, 591, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5tkqa1230042097.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,] -4 -12 -17 -11 -21 0 47 6 -23 -16 -17 -9.0 [2,] -4 -9 -15 -11 -15 0 50 6 -16 -16 -17 -4.0 [3,] 3 -3 -10 -6 -7 2 51 8 -6 -15 -17 1.5 [4,] 4 -2 -6 -6 -6 6 52 10 -1 -12 -17 3.0 [5,] 7 -1 -5 -3 -1 9 52 10 2 -12 -17 4.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.65278 -7.946182 -16.359377 -9.532987 -13.3593773 -2.239585 49.58681 [2,] 8.65278 1.946182 -3.640623 -2.467013 -0.6406227 6.239585 52.41319 [,8] [,9] [,10] [,11] [,12] [1,] 5.17361 -16.598962 -17.82639 -17 -4.03 [2,] 10.82639 4.598962 -12.17361 -17 7.03 $out [1] -12 56 17 -2 -32 -22 -4 $group [1] 6 7 8 10 10 11 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-4, -4, 3, 4, 7, -12, -9, -3, -2, -1, -17, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6oa4m1230042097.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,] 537.0 567.0 566.0 499.0 469.0 NA [2,] 549.5 578.5 573.5 518.5 491.5 NA [3,] 561.5 593.0 589.0 537.0 507.0 NA [4,] 602.5 616.5 608.5 556.0 517.5 NA [5,] 613.0 629.0 626.0 565.0 534.0 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 537.3263 575.668 573.0363 519.896 495.1412 NA [2,] 585.6737 610.332 604.9637 554.104 518.8588 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(537, 549.5, 561.5, 602.5, 613, 567, 578.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7qzl41230042097.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,] 531.4 537.0 534.00 [2,] 545.1 549.5 550.75 [3,] 561.5 561.5 569.00 [4,] 576.2 591.0 578.50 [5,] 593.0 613.0 595.50 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 547.3151 542.5716 556.343 [2,] 575.6849 580.4284 581.657 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(531.4, 545.1, 561.5, 576.2, 593, 537, 549.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/14v9f1230042097.ps tmp/14v9f1230042097.png") > system("convert tmp/2n23p1230042097.ps tmp/2n23p1230042097.png") > system("convert tmp/3f7qk1230042097.ps tmp/3f7qk1230042097.png") > system("convert tmp/4vqcs1230042097.ps tmp/4vqcs1230042097.png") > system("convert tmp/5tkqa1230042097.ps tmp/5tkqa1230042097.png") > system("convert tmp/6oa4m1230042097.ps tmp/6oa4m1230042097.png") > system("convert tmp/7qzl41230042097.ps tmp/7qzl41230042097.png") > > > proc.time() user system elapsed 2.554 1.572 2.816