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(16.4,17.8,22.3,22.8,18.3,22.4,23.9,21.3,23.0,21.4,21.2,20.9,17.9,20.7,22.2,19.8,17.7,19.6,20.8,19.8,18.6,21.,18.6,18.9,17.3,20.0,19.9,19.5,16.2,17.6,19.8,19.4,17.2,21.1,17.8,17.5,18.0,19.1,17.7,19.2,15.1,16.3,18.6,17.2,17.8,19.1,16.6,16.0,16.7,17.4,17.9,17.8,13.9,15.9,17.9,15.4,16.4,17.9,15.3,14.6,14.9,15.0,16.7,16.3,11.7,15.1,15.5,15.0,15.4,16.0,14.7,14.8) > 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] 72 > (np <- floor(n / par1)) [1] 6 > 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] 6 6 6 6 6 6 6 6 6 6 6 6 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 16.4 17.9 17.3 18.0 16.7 14.9 NA [2,] 17.8 20.7 20.0 19.1 17.4 15.0 NA [3,] 22.3 22.2 19.9 17.7 17.9 16.7 NA [4,] 22.8 19.8 19.5 19.2 17.8 16.3 NA [5,] 18.3 17.7 16.2 15.1 13.9 11.7 NA [6,] 22.4 19.6 17.6 16.3 15.9 15.1 NA [7,] 23.9 20.8 19.8 18.6 17.9 15.5 NA [8,] 21.3 19.8 19.4 17.2 15.4 15.0 NA [9,] 23.0 18.6 17.2 17.8 16.4 15.4 NA [10,] 21.4 21.0 21.1 19.1 17.9 16.0 NA [11,] 21.2 18.6 17.8 16.6 15.3 14.7 NA [12,] 20.9 18.9 17.5 16.0 14.6 14.8 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1.4 2.8 2.7 1.1 0.7 0.1 NA [2,] 4.5 1.5 -0.1 -1.4 0.5 1.7 NA [3,] 0.5 -2.4 -0.4 1.5 -0.1 -0.4 NA [4,] -4.5 -2.1 -3.3 -4.1 -3.9 -4.6 NA [5,] 4.1 1.9 1.4 1.2 2.0 3.4 NA [6,] 1.5 1.2 2.2 2.3 2.0 0.4 NA [7,] -2.6 -1.0 -0.4 -1.4 -2.5 -0.5 NA [8,] 1.7 -1.2 -2.2 0.6 1.0 0.4 NA [9,] -1.6 2.4 3.9 1.3 1.5 0.6 NA [10,] -0.2 -2.4 -3.3 -2.5 -2.6 -1.3 NA [11,] -0.3 0.3 -0.3 -0.6 -0.7 0.1 NA [12,] -3.0 -1.6 0.5 0.7 0.3 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/1ryjv1258126056.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/2ru2j1258126056.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/3n4gs1258126056.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/4zaf51258126056.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,] 14.9 15.00 16.7 16.30 11.70 15.10 15.5 15.0 15.4 16.00 14.7 14.60 [2,] 16.4 17.40 17.7 17.80 13.90 15.90 17.9 15.4 16.4 17.90 15.3 14.80 [3,] 17.0 18.45 18.9 19.35 15.65 16.95 19.2 18.3 17.5 20.05 17.2 16.75 [4,] 17.9 20.00 22.2 19.80 17.70 19.60 20.8 19.8 18.6 21.10 18.6 18.90 [5,] 18.0 20.70 22.3 22.80 18.30 22.40 23.9 21.3 18.6 21.40 21.2 20.90 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 16.03245 16.77292 15.99735 18.05994 13.19888 14.56338 17.32941 15.46186 [2,] 17.96755 20.12708 21.80265 20.64006 18.10112 19.33662 21.07059 21.13814 [,9] [,10] [,11] [,12] [1,] 16.08093 17.98590 15.07139 14.10537 [2,] 18.91907 22.11410 19.32861 19.39463 $out [1] 23 $group [1] 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(14.9, 16.4, 17, 17.9, 18, 15, 17.4, 18.45, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5eejc1258126056.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,] 0.10 -1.4 -0.40 -4.6 1.20 0.40 -2.6 -2.2 -1.6 -3.30 -0.7 -3.0 [2,] 0.70 -0.1 -0.40 -4.5 1.40 1.20 -2.5 -1.2 0.6 -2.60 -0.6 -1.6 [3,] 1.25 1.0 -0.25 -4.0 1.95 1.75 -1.2 0.5 1.4 -2.45 -0.3 0.3 [4,] 2.70 1.7 0.50 -3.3 3.40 2.20 -0.5 1.0 2.4 -1.30 0.1 0.5 [5,] 2.80 1.7 1.50 -2.1 4.10 2.30 -0.4 1.7 3.9 -0.20 0.3 0.7 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.0400646 -0.1610581 -0.8305291 -4.774039 0.6599354 1.104968 -2.4900646 [2,] 2.5400646 2.1610581 0.3305291 -3.225961 3.2400646 2.395032 0.0900646 [,8] [,9] [,10] [,11] [,12] [1,] -0.919071 0.2389419 -3.288542 -0.7515226 -1.183855 [2,] 1.919071 2.5610581 -1.611458 0.1515226 1.783855 $out [1] 4.5 -2.4 $group [1] 2 3 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0.0999999999999996, 0.700, 1.25000000000000, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/653qf1258126056.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] [1,] 16.40 17.70 16.20 15.10 13.90 14.70 NA [2,] 19.60 18.60 17.40 16.45 15.35 14.85 NA [3,] 21.35 19.70 18.60 17.75 16.55 15.05 NA [4,] 22.60 20.75 19.85 18.85 17.85 15.75 NA [5,] 23.90 22.20 21.10 19.20 17.90 16.70 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 19.98168 18.71937 17.48254 16.65534 15.40973 14.63950 NA [2,] 22.71832 20.68063 19.71746 18.84466 17.69027 15.46050 NA $out [1] 11.7 $group [1] 6 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(16.4, 19.6, 21.35, 22.6, 23.9, 17.7, 18.6, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/73ely1258126056.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,] 15.48333 15.650 15.7625 [2,] 17.24167 16.975 17.0625 [3,] 18.04167 17.900 17.6625 [4,] 19.32500 19.050 19.1250 [5,] 19.45000 20.050 19.6875 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 17.09144 16.95358 16.72178 [2,] 18.99189 18.84642 18.60322 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(15.4833333333333, 17.2416666666667, 18.0416666666667, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1ryjv1258126056.ps tmp/1ryjv1258126056.png") > system("convert tmp/2ru2j1258126056.ps tmp/2ru2j1258126056.png") > system("convert tmp/3n4gs1258126056.ps tmp/3n4gs1258126056.png") > system("convert tmp/4zaf51258126056.ps tmp/4zaf51258126056.png") > system("convert tmp/5eejc1258126056.ps tmp/5eejc1258126056.png") > system("convert tmp/653qf1258126056.ps tmp/653qf1258126056.png") > system("convert tmp/73ely1258126056.ps tmp/73ely1258126056.png") > > > proc.time() user system elapsed 1.196 0.939 1.492