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(2,2,2,2,2,2,2,2,2,2,2,2,2,2,2.21,2.25,2.25,2.45,2.5,2.5,2.64,2.75,2.93,3,3.17,3.25,3.39,3.5,3.5,3.65,3.75,3.75,3.9,4,4,4,4,4,4,4,4,4,4,4,4,4.18,4.25,4.25,3.97,3.42,2.75,2.31,2,1.66,1.31,1.09,1,1,1,1) > 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,] 2 2.00 3.17 4.00 3.97 NA [2,] 2 2.00 3.25 4.00 3.42 NA [3,] 2 2.21 3.39 4.00 2.75 NA [4,] 2 2.25 3.50 4.00 2.31 NA [5,] 2 2.25 3.50 4.00 2.00 NA [6,] 2 2.45 3.65 4.00 1.66 NA [7,] 2 2.50 3.75 4.00 1.31 NA [8,] 2 2.50 3.75 4.00 1.09 NA [9,] 2 2.64 3.90 4.00 1.00 NA [10,] 2 2.75 4.00 4.18 1.00 NA [11,] 2 2.93 4.00 4.25 1.00 NA [12,] 2 3.00 4.00 4.25 1.00 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0 0.00 0.08 0.00 -0.55 NA [2,] 0 0.21 0.14 0.00 -0.67 NA [3,] 0 0.04 0.11 0.00 -0.44 NA [4,] 0 0.00 0.00 0.00 -0.31 NA [5,] 0 0.20 0.15 0.00 -0.34 NA [6,] 0 0.05 0.10 0.00 -0.35 NA [7,] 0 0.00 0.00 0.00 -0.22 NA [8,] 0 0.14 0.15 0.00 -0.09 NA [9,] 0 0.11 0.10 0.18 0.00 NA [10,] 0 0.18 0.00 0.07 0.00 NA [11,] 0 0.07 0.00 0.00 0.00 NA [12,] 0 0.17 0.00 -0.28 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/1yi4d1257956530.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/2fkhc1257956530.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/306fs1257956530.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/4o32r1257956530.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,] 2.00 2.00 2.00 2.00 2.00 1.66 1.31 1.09 1.00 1.00 1.00 1.00 [2,] 2.00 2.00 2.21 2.25 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 [3,] 3.17 3.25 2.75 2.31 2.25 2.45 2.50 2.50 2.64 2.75 2.93 3.00 [4,] 3.97 3.42 3.39 3.50 3.50 3.65 3.75 3.75 3.90 4.00 4.00 4.00 [5,] 4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.18 4.25 4.25 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 1.778003 2.246632 1.916215 1.426753 1.190104 1.284114 1.263454 1.263454 [2,] 4.561997 4.253368 3.583785 3.193247 3.309896 3.615886 3.736546 3.736546 [,9] [,10] [,11] [,12] [1,] 1.297465 1.336805 1.516805 1.586805 [2,] 3.982535 4.163195 4.343195 4.413195 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(2, 2, 3.17, 3.97, 4, 2, 2, 3.25, 3.42, 4, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5es7k1257956530.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 0.00 0.00 0 0.00 0.00 0 -0.09 0.00 0.00 0 -0.280 [2,] 0 0.00 0.00 0 0.00 0.00 0 0.00 0.00 0.00 0 -0.140 [3,] 0 0.00 0.00 0 0.00 0.00 0 0.00 0.10 0.00 0 0.000 [4,] 0 0.14 0.04 0 0.15 0.05 0 0.14 0.11 0.07 0 0.085 [5,] 0 0.21 0.04 0 0.20 0.10 0 0.15 0.18 0.07 0 0.170 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 0 -0.09892365 -0.0282639 0 -0.1059896 -0.03532987 0 -0.09892365 [2,] 0 0.09892365 0.0282639 0 0.1059896 0.03532987 0 0.09892365 [,9] [,10] [,11] [,12] [1,] 0.02227428 -0.04946182 0 -0.17775 [2,] 0.17772572 0.04946182 0 0.17775 $out [1] 0.08 -0.55 -0.67 0.11 -0.44 -0.31 -0.34 -0.35 -0.22 0.18 0.07 $group [1] 1 1 2 3 3 4 5 6 7 10 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0, 0, 0, 0, 0, 0, 0, 0, 0.14, 0.21, 0, 0, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/61tnk1257956530.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,] 2 2.000 3.170 4.00 1.000 NA [2,] 2 2.230 3.445 4.00 1.000 NA [3,] 2 2.475 3.700 4.00 1.485 NA [4,] 2 2.695 3.950 4.09 2.530 NA [5,] 2 3.000 4.000 4.18 3.970 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 2 2.262910 3.469666 3.95895 0.7871567 NA [2,] 2 2.687090 3.930334 4.04105 2.1828433 NA $out [1] 4.25 4.25 $group [1] 4 4 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(2, 2, 2, 2, 2, 2, 2.23, 2.475, 2.695, 3, 3.17, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7lu371257956530.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,] 2.668 2.250 2.7100 [2,] 2.731 2.475 2.8125 [3,] 2.799 2.695 2.8750 [4,] 2.860 2.965 2.9925 [5,] 3.028 3.250 3.0000 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 2.740162 2.471508 2.792901 [2,] 2.857838 2.918492 2.957099 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(2.668, 2.731, 2.799, 2.86, 3.028, 2.25, 2.475, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1yi4d1257956530.ps tmp/1yi4d1257956530.png") > system("convert tmp/2fkhc1257956530.ps tmp/2fkhc1257956530.png") > system("convert tmp/306fs1257956530.ps tmp/306fs1257956530.png") > system("convert tmp/4o32r1257956530.ps tmp/4o32r1257956530.png") > system("convert tmp/5es7k1257956530.ps tmp/5es7k1257956530.png") > system("convert tmp/61tnk1257956530.ps tmp/61tnk1257956530.png") > system("convert tmp/7lu371257956530.ps tmp/7lu371257956530.png") > > > proc.time() user system elapsed 1.259 1.008 1.659