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(521,501,518,547,629,572,582,574,461,576,460,455,444,488,513,468,488,536,486,460,376,503,369,353,359,400,374,430,433,418,438,389,368,386,261,294,263,293,303,326,314,332,347,290,340,371,340,376,322,364,379,343,358,433,344,357,385,392,308,294) > 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,] 521 444 359 263 322 NA [2,] 501 488 400 293 364 NA [3,] 518 513 374 303 379 NA [4,] 547 468 430 326 343 NA [5,] 629 488 433 314 358 NA [6,] 572 536 418 332 433 NA [7,] 582 486 438 347 344 NA [8,] 574 460 389 290 357 NA [9,] 461 376 368 340 385 NA [10,] 576 503 386 371 392 NA [11,] 460 369 261 340 308 NA [12,] 455 353 294 376 294 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -20 44 41 30 42 NA [2,] 17 25 -26 10 15 NA [3,] 29 -45 56 23 -36 NA [4,] 82 20 3 -12 15 NA [5,] -57 48 -15 18 75 NA [6,] 10 -50 20 15 -89 NA [7,] -8 -26 -49 -57 13 NA [8,] -113 -84 -21 50 28 NA [9,] 115 127 18 31 7 NA [10,] -116 -134 -125 -31 -84 NA [11,] -5 -16 33 36 -14 NA [12,] -11 6 -31 -54 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/freestat/rcomp/tmp/1ft391258017752.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/freestat/rcomp/tmp/2anru1258017752.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/freestat/rcomp/tmp/39gon1258017752.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/freestat/rcomp/tmp/4plbj1258017752.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,] 263 293 303 326 314 332 344 290 368 371 261 294 [2,] 322 364 374 343 358 418 347 357 368 386 308 294 [3,] 359 400 379 430 433 433 438 389 376 392 340 353 [4,] 444 488 513 468 488 536 486 460 385 503 369 376 [5,] 521 501 518 547 629 572 582 574 385 576 460 455 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 272.7951 312.3819 280.7830 341.6753 341.1423 349.6215 339.7830 316.2205 [2,] 445.2049 487.6181 477.2170 518.3247 524.8577 516.3785 536.2170 461.7795 [,9] [,10] [,11] [,12] [1,] 363.9878 309.3281 296.8976 295.059 [2,] 388.0122 474.6719 383.1024 410.941 $out [1] 461 340 $group [1] 9 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(263, 322, 359, 444, 521, 293, 364, 400, 488, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/5shkh1258017752.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,] 30 10 -45 -12 -57 -89 -57 -113 7 -134 -16 -54.0 [2,] 30 10 -36 3 -15 -50 -49 -84 18 -125 -14 -42.5 [3,] 41 15 23 15 18 10 -26 -21 31 -116 -5 -21.0 [4,] 42 17 29 20 48 15 -8 28 115 -84 33 -2.5 [5,] 44 25 56 20 75 20 13 50 127 -31 36 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,] 32.52083 10.05382 -22.92884 2.987843 -26.51564 -35.92884 -54.970497 [2,] 49.47917 19.94618 68.92884 27.012157 62.51564 55.92884 2.970497 [,8] [,9] [,10] [,11] [,12] [1,] -100.13892 -37.53996 -144.9705 -38.21008 -52.6 [2,] 58.13892 99.53996 -87.0295 28.21008 10.6 $out [1] -20 -26 82 $group [1] 1 2 4 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(30, 30, 41, 42, 44, 10, 10, 15, 17, 25, -45, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/6px9c1258017752.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,] 455 353.0 294.0 263.0 294.0 NA [2,] 481 410.0 363.5 298.0 332.5 NA [3,] 534 477.0 387.5 329.0 357.5 NA [4,] 575 495.5 424.0 343.5 382.0 NA [5,] 629 536.0 438.0 376.0 433.0 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 491.126 438.0029 359.9055 308.2471 334.9227 NA [2,] 576.874 515.9971 415.0945 349.7529 380.0773 NA $out [1] 261 $group [1] 3 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(455, 481, 534, 575, 629, 353, 410, 477, 495.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/7egk31258017752.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,] 347.6 340.0 335.00 [2,] 383.9 367.5 379.75 [3,] 415.7 390.5 412.50 [4,] 441.9 431.5 434.75 [5,] 458.2 438.0 477.00 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 389.2458 361.3092 387.4141 [2,] 442.1542 419.6908 437.5859 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(347.6, 383.9, 415.7, 441.9, 458.2, 340, 367.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1ft391258017752.ps tmp/1ft391258017752.png") > system("convert tmp/2anru1258017752.ps tmp/2anru1258017752.png") > system("convert tmp/39gon1258017752.ps tmp/39gon1258017752.png") > system("convert tmp/4plbj1258017752.ps tmp/4plbj1258017752.png") > system("convert tmp/5shkh1258017752.ps tmp/5shkh1258017752.png") > system("convert tmp/6px9c1258017752.ps tmp/6px9c1258017752.png") > system("convert tmp/7egk31258017752.ps tmp/7egk31258017752.png") > > > proc.time() user system elapsed 1.925 1.521 2.267