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(493,514,522,490,484,506,501,462,465,454,464,427,460,473,465,422,415,413,420,363,376,380,384,346,389,407,393,346,348,353,364,305,307,312,312,286,324,336,327,302,299,311,315,264,278,278,287,279,324,354,354,360,363,385,412,370,389,395,417,404) > 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,] 493 460 389 324 324 NA [2,] 514 473 407 336 354 NA [3,] 522 465 393 327 354 NA [4,] 490 422 346 302 360 NA [5,] 484 415 348 299 363 NA [6,] 506 413 353 311 385 NA [7,] 501 420 364 315 412 NA [8,] 462 363 305 264 370 NA [9,] 465 376 307 278 389 NA [10,] 454 380 312 278 395 NA [11,] 464 384 312 287 417 NA [12,] 427 346 286 279 404 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 21 13 18 12 30 NA [2,] 8 -8 -14 -9 0 NA [3,] -32 -43 -47 -25 6 NA [4,] -6 -7 2 -3 3 NA [5,] 22 -2 5 12 22 NA [6,] -5 7 11 4 27 NA [7,] -39 -57 -59 -51 -42 NA [8,] 3 13 2 14 19 NA [9,] -11 4 5 0 6 NA [10,] 10 4 0 9 22 NA [11,] -37 -38 -26 -8 -13 NA [12,] 33 43 38 45 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/147wh1293304796.ps",horizontal=F,onefile=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/247wh1293304796.ps",horizontal=F,onefile=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/347wh1293304796.ps",horizontal=F,onefile=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/4fyek1293304796.ps",horizontal=F,onefile=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,] 324 336 327 302 299 311 315 264 278 278 287 279 [2,] 324 354 354 346 348 353 364 305 307 312 312 286 [3,] 389 407 393 360 363 385 412 363 376 380 384 346 [4,] 460 473 465 422 415 413 420 370 389 395 417 404 [5,] 493 514 522 490 484 413 501 462 465 454 464 427 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 292.9027 322.9149 314.5677 306.2986 315.658 342.6042 372.4305 317.0712 [2,] 485.0973 491.0851 471.4323 413.7014 410.342 427.3958 451.5695 408.9288 [,9] [,10] [,11] [,12] [1,] 318.059 321.3524 309.8073 262.6215 [2,] 433.941 438.6476 458.1927 429.3785 $out [1] 506 $group [1] 6 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(324, 324, 389, 460, 493, 336, 354, 407, 473, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5fyek1293304796.ps",horizontal=F,onefile=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,] 12 -14 -47 -7 -2 -5 -59 2 0 0 -38 33.0 [2,] 13 -9 -43 -6 5 4 -57 3 0 4 -37 35.5 [3,] 18 -8 -32 -3 12 7 -51 13 4 9 -26 40.5 [4,] 21 0 -25 2 22 11 -42 14 5 10 -13 44.0 [5,] 30 8 -25 3 22 11 -39 19 6 10 -8 45.0 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 12.34722 -14.359377 -44.71875 -8.65278 -0.01215718 2.053818 -61.59896 [2,] 23.65278 -1.640623 -19.28125 2.65278 24.01215718 11.946182 -40.40104 [,8] [,9] [,10] [,11] [,12] [1,] 5.227428 0.4670126 4.760415 -42.95834 33.785 [2,] 20.772572 7.5329874 13.239585 -9.04166 47.215 $out [1] 6 27 -11 22 $group [1] 3 6 9 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(12, 13, 18, 21, 30, -14, -9, -8, 0, 8, -47, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/687v51293304796.ps",horizontal=F,onefile=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,] 427.0 346 286.0 264.0 324.0 NA [2,] 463.0 378 309.5 278.5 357.0 NA [3,] 487.0 414 347.0 300.5 377.5 NA [4,] 503.5 441 376.5 319.5 399.5 NA [5,] 522.0 473 407.0 336.0 417.0 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 468.5277 385.2653 316.4409 281.7996 358.1155 NA [2,] 505.4723 442.7347 377.5591 319.2004 396.8845 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(427, 463, 487, 503.5, 522, 346, 378, 414, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/787v51293304796.ps",horizontal=F,onefile=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,] 348.4 346 337.50 [2,] 363.4 363 350.75 [3,] 382.9 382 382.25 [4,] 400.2 391 392.00 [5,] 416.8 412 413.50 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 366.1153 369.229 363.4356 [2,] 399.6847 394.771 401.0644 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(348.4, 363.4, 382.9, 400.2, 416.8, 346, 363, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/147wh1293304796.ps tmp/147wh1293304796.png",intern=TRUE)) character(0) > try(system("convert tmp/247wh1293304796.ps tmp/247wh1293304796.png",intern=TRUE)) character(0) > try(system("convert tmp/347wh1293304796.ps tmp/347wh1293304796.png",intern=TRUE)) character(0) > try(system("convert tmp/4fyek1293304796.ps tmp/4fyek1293304796.png",intern=TRUE)) character(0) > try(system("convert tmp/5fyek1293304796.ps tmp/5fyek1293304796.png",intern=TRUE)) character(0) > try(system("convert tmp/687v51293304796.ps tmp/687v51293304796.png",intern=TRUE)) character(0) > try(system("convert tmp/787v51293304796.ps tmp/787v51293304796.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.244 0.990 27.437