R version 2.6.2 (2008-02-08) 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(18.3,15.3,18.6,18.2,16.1,13.1,16.5,16.5,14.7,12.1,15.7,15.7,14,11.7,15.2,15.6,14.3,12.5,16.6,18.1,18.5,17.6,22.6,23.9,23.2,20.6,24.2,24.5,22.9,20.4,23.9,24.1,22.3,19.5,23.3,23.4,21.8,19.8,23.3,23.2,21.2,19,23.8,24.3,23.1,21.6,22.2,17.4,15.6,14.5,20.3,16.1,14.1,15.3,17.8,19.6,17.8,15.7,18.9,18.4,20.8,19,24.5,22.6,19.6,17.5,25,22.3,20.5,19.9,23.4,22.1,20,18.9,23,20,18.6,19.2,20.3,17.8) > par1 = '4' > #'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] 80 > (np <- floor(n / par1)) [1] 20 > 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] 20 20 20 20 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 18.3 16.1 14.7 14.0 14.3 18.5 23.2 22.9 22.3 21.8 21.2 23.1 15.6 14.1 [2,] 15.3 13.1 12.1 11.7 12.5 17.6 20.6 20.4 19.5 19.8 19.0 21.6 14.5 15.3 [3,] 18.6 16.5 15.7 15.2 16.6 22.6 24.2 23.9 23.3 23.3 23.8 22.2 20.3 17.8 [4,] 18.2 16.5 15.7 15.6 18.1 23.9 24.5 24.1 23.4 23.2 24.3 17.4 16.1 19.6 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 17.8 20.8 19.6 20.5 20.0 18.6 NA [2,] 15.7 19.0 17.5 19.9 18.9 19.2 NA [3,] 18.9 24.5 25.0 23.4 23.0 20.3 NA [4,] 18.4 22.6 22.3 22.1 20.0 17.8 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -3.0 -3.0 -2.6 -2.3 -1.8 -0.9 -2.6 -2.5 -2.8 -2.0 -2.2 -1.5 -1.1 1.2 [2,] 3.3 3.4 3.6 3.5 4.1 5.0 3.6 3.5 3.8 3.5 4.8 0.6 5.8 2.5 [3,] -0.4 0.0 0.0 0.4 1.5 1.3 0.3 0.2 0.1 -0.1 0.5 -4.8 -4.2 1.8 [4,] -2.1 -1.8 -1.7 -1.3 0.4 -0.7 -1.6 -1.8 -1.6 -2.0 -1.2 -1.8 -2.0 -1.8 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -2.1 -1.8 -2.1 -0.6 -1.1 0.6 NA [2,] 3.2 5.5 7.5 3.5 4.1 1.1 NA [3,] -0.5 -1.9 -2.7 -1.3 -3.0 -2.5 NA [4,] 2.4 -3.0 -1.8 -2.1 -1.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/1csxl1209404252.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/25wyk1209404252.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/3il3d1209404252.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/4v46f1209404252.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] [1,] 14.00 11.70 15.2 15.6 [2,] 15.85 14.90 18.2 17.6 [3,] 19.10 18.25 22.4 19.8 [4,] 21.50 19.65 23.6 23.3 [5,] 23.20 21.60 25.0 24.5 $n [1] 20 20 20 20 $conf [,1] [,2] [,3] [,4] [1,] 17.10386 16.57183 20.49219 17.78620 [2,] 21.09614 19.92817 24.30781 21.81380 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" Warning message: In bxp(list(stats = c(14, 15.85, 19.1, 21.5, 23.2, 11.7, 14.9, 18.25, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5fw0i1209404252.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] [1,] -3.00 2.50 -4.80 -2.10 [2,] -2.55 3.35 -2.20 -1.90 [3,] -2.05 3.55 -0.05 -1.80 [4,] -1.10 4.45 0.35 -1.35 [5,] 0.60 5.80 1.80 -0.70 $n [1] 20 20 20 19 $conf [,1] [,2] [,3] [,4] [1,] -2.562283 3.161371 -0.9509118 -1.999362 [2,] -1.537717 3.938629 0.8509118 -1.600638 $out [1] 1.2 0.6 7.5 1.1 0.4 2.4 -3.0 $group [1] 1 2 2 2 4 4 4 $names [1] "1" "2" "3" "4" Warning message: In bxp(list(stats = c(-3, -2.55, -2.05, -1.1, 0.599999999999998, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6on7n1209404252.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] [,7] [,8] [,9] [,10] [,11] [,12] [1,] 15.30 13.1 12.1 11.70 12.50 17.60 20.60 20.40 19.50 19.80 19.00 17.40 [2,] 16.75 14.6 13.4 12.85 13.40 18.05 21.90 21.65 20.90 20.80 20.10 19.50 [3,] 18.25 16.3 15.2 14.60 15.45 20.55 23.70 23.40 22.80 22.50 22.50 21.90 [4,] 18.45 16.5 15.7 15.40 17.35 23.25 24.35 24.00 23.35 23.25 24.05 22.65 [5,] 18.60 16.5 15.7 15.60 18.10 23.90 24.50 24.10 23.40 23.30 24.30 23.10 [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 14.50 14.10 15.70 19.00 17.50 19.90 18.90 17.80 NA [2,] 15.05 14.70 16.75 19.90 18.55 20.20 19.45 18.20 NA [3,] 15.85 16.55 18.10 21.70 20.95 21.30 20.00 18.90 NA [4,] 18.20 18.70 18.65 23.55 23.65 22.75 21.50 19.75 NA [5,] 20.30 19.60 18.90 24.50 25.00 23.40 23.00 20.30 NA $n [1] 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 16.907 14.799 13.383 12.5855 12.3295 16.442 21.7645 21.5435 20.8645 [2,] 19.593 17.801 17.017 16.6145 18.5705 24.658 25.6355 25.2565 24.7355 [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [1,] 20.5645 19.3795 19.4115 13.3615 13.39 16.599 18.8165 16.921 19.2855 [2,] 24.4355 25.6205 24.3885 18.3385 19.71 19.601 24.5835 24.979 23.3145 [,19] [,20] [,21] [1,] 18.3805 17.6755 NA [2,] 21.6195 20.1245 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" [16] "16" "17" "18" "19" "20" NA Warning message: In bxp(list(stats = c(15.3, 16.75, 18.25, 18.45, 18.6, 13.1, 14.6, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7oax01209404252.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,] 17.1600 18.250 17.33750 [2,] 18.0150 18.675 18.00000 [3,] 19.5300 19.450 19.56875 [4,] 20.5725 21.100 20.71250 [5,] 20.9550 22.400 20.95000 $n [1] 4 4 4 $conf [,1] [,2] [,3] [1,] 17.50958 17.53425 17.42588 [2,] 21.55043 21.36575 21.71163 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(17.16, 18.015, 19.53, 20.5725, 20.955, 18.25, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1csxl1209404252.ps tmp/1csxl1209404252.png") > system("convert tmp/25wyk1209404252.ps tmp/25wyk1209404252.png") > system("convert tmp/3il3d1209404252.ps tmp/3il3d1209404252.png") > system("convert tmp/4v46f1209404252.ps tmp/4v46f1209404252.png") > system("convert tmp/5fw0i1209404252.ps tmp/5fw0i1209404252.png") > system("convert tmp/6on7n1209404252.ps tmp/6on7n1209404252.png") > system("convert tmp/7oax01209404252.ps tmp/7oax01209404252.png") > > > proc.time() user system elapsed 1.415 0.966 1.763