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(345,334,345,333,336,324,320,330,313,301,288,294,302,294,293,290,283,286,293,334,329,411,416,418,408,402,401,400,389,371,364,350,332,323,316,312,315,314,313,314,317,308,312,306,304,297,284,278,273,265,259,252,245,235,232,229,219,218,215,211) > 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,] 345 302 408 315 273 NA [2,] 334 294 402 314 265 NA [3,] 345 293 401 313 259 NA [4,] 333 290 400 314 252 NA [5,] 336 283 389 317 245 NA [6,] 324 286 371 308 235 NA [7,] 320 293 364 312 232 NA [8,] 330 334 350 306 229 NA [9,] 313 329 332 304 219 NA [10,] 301 411 323 297 218 NA [11,] 288 416 316 284 215 NA [12,] 294 418 312 278 211 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -11 -8 -6 -1 -8 NA [2,] 11 -1 -1 -1 -6 NA [3,] -12 -3 -1 1 -7 NA [4,] 3 -7 -11 3 -7 NA [5,] -12 3 -18 -9 -10 NA [6,] -4 7 -7 4 -3 NA [7,] 10 41 -14 -6 -3 NA [8,] -17 -5 -18 -2 -10 NA [9,] -12 82 -9 -7 -1 NA [10,] -13 5 -7 -13 -3 NA [11,] 6 2 -4 -6 -4 NA [12,] 8 -10 3 -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/18foo1228992152.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/2ziyi1228992152.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/32td81228992152.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/4zj7r1228992152.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,] 273 265 259 252 245 235 293 306 304 297 284 278 [2,] 302 294 293 290 283 286 293 306 304 297 284 278 [3,] 315 314 313 314 317 308 312 330 313 301 288 294 [4,] 345 334 345 333 336 324 320 334 329 323 316 312 [5,] 408 334 401 333 389 371 320 350 332 323 316 312 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 284.6163 285.7361 276.2569 283.6163 279.5503 281.1493 292.9219 310.2153 [2,] 345.3837 342.2639 349.7431 344.3837 354.4497 334.8507 331.0781 349.7847 [,9] [,10] [,11] [,12] [1,] 295.3351 282.6285 265.3889 269.9757 [2,] 330.6649 319.3715 310.6111 318.0243 $out [1] 402 400 364 232 229 219 411 218 416 215 418 211 $group [1] 2 4 7 7 8 9 10 10 11 11 12 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(273, 302, 315, 345, 408, 265, 294, 314, 334, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5g7ma1228992152.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,] -11 -1 -12 -11 -12 -7 -14 -18 -12 -13 -6 -10.0 [2,] -8 -1 -7 -7 -12 -4 -6 -17 -9 -13 -4 -7.5 [3,] -8 -1 -3 -7 -10 -3 -3 -10 -7 -7 -4 -1.0 [4,] -6 -1 -1 3 -9 4 10 -5 -1 -3 2 5.5 [5,] -6 -1 1 3 -9 7 10 -2 -1 5 6 8.0 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -9.413195 -1 -7.239585 -14.06597481 -12.119792 -8.65278 -14.30556 [2,] -6.586805 -1 1.239585 0.06597481 -7.880208 2.65278 8.30556 [,8] [,9] [,10] [,11] [,12] [1,] -18.479170 -12.652780 -14.06597481 -8.2395849 -11.27 [2,] -1.520830 -1.347220 0.06597481 0.2395849 9.27 $out [1] -1 11 -6 3 -18 41 82 $group [1] 1 2 2 5 5 7 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-11, -8, -8, -6, -6, -1, -1, -1, -1, -1, -12, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6yi2u1228992152.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,] 288 283.0 312.0 284.0 211.0 NA [2,] 307 291.5 327.5 300.5 218.5 NA [3,] 327 298.0 367.5 310.0 233.5 NA [4,] 335 372.5 400.5 314.0 255.5 NA [5,] 345 418.0 408.0 317.0 273.0 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 314.229 261.0554 334.2042 303.8426 216.6241 NA [2,] 339.771 334.9446 400.7958 316.1574 250.3759 NA $out [1] 278 $group [1] 4 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(288, 307, 327, 335, 345, 283, 291.5, 298, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/74uvm1228992152.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,] 299.4 294.0 295.00 [2,] 304.0 304.5 305.75 [3,] 309.9 313.0 310.75 [4,] 319.8 314.5 317.75 [5,] 328.6 317.0 323.50 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 302.6935 308.4389 305.2767 [2,] 317.1065 317.5611 316.2233 $out [1] 330 288 $group [1] 2 2 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(299.4, 304, 309.9, 319.8, 328.6, 294, 304.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/18foo1228992152.ps tmp/18foo1228992152.png") > system("convert tmp/2ziyi1228992152.ps tmp/2ziyi1228992152.png") > system("convert tmp/32td81228992152.ps tmp/32td81228992152.png") > system("convert tmp/4zj7r1228992152.ps tmp/4zj7r1228992152.png") > system("convert tmp/5g7ma1228992152.ps tmp/5g7ma1228992152.png") > system("convert tmp/6yi2u1228992152.ps tmp/6yi2u1228992152.png") > system("convert tmp/74uvm1228992152.ps tmp/74uvm1228992152.png") > > > proc.time() user system elapsed 1.213 0.953 1.473