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(1.4,1,-0.8,-2.9,-0.7,-0.7,1.5,3,3.2,3.1,3.9,1,1.3,0.8,1.2,2.9,3.9,4.5,4.5,3.3,2,1.5,1,2.1,3,4,5.1,4.5,4.2,3.3,2.7,1.8,1.4,0.5,-0.4,0.8,0.7,1.9,2,1.1,0.9,0.4,0.7,2.1,2.8,3.9,3.5,2,2,1.5,2.5,3.1,2.7,2.8,2.5,3,3.2,2.8,2.4,2,1.8,1.1,-1.5,-3.7) > 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] 64 > (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] 6 6 6 6 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1.4 1.3 3.0 0.7 2.0 1.8 [2,] 1.0 0.8 4.0 1.9 1.5 1.1 [3,] -0.8 1.2 5.1 2.0 2.5 -1.5 [4,] -2.9 2.9 4.5 1.1 3.1 -3.7 [5,] -0.7 3.9 4.2 0.9 2.7 NA [6,] -0.7 4.5 3.3 0.4 2.8 NA [7,] 1.5 4.5 2.7 0.7 2.5 NA [8,] 3.0 3.3 1.8 2.1 3.0 NA [9,] 3.2 2.0 1.4 2.8 3.2 NA [10,] 3.1 1.5 0.5 3.9 2.8 NA [11,] 3.9 1.0 -0.4 3.5 2.4 NA [12,] 1.0 2.1 0.8 2.0 2.0 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.4 -0.5 1.0 1.2 -0.5 -0.7 [2,] -1.8 0.4 1.1 0.1 1.0 -2.6 [3,] -2.1 1.7 -0.6 -0.9 0.6 -2.2 [4,] 2.2 1.0 -0.3 -0.2 -0.4 NA [5,] 0.0 0.6 -0.9 -0.5 0.1 NA [6,] 2.2 0.0 -0.6 0.3 -0.3 NA [7,] 1.5 -1.2 -0.9 1.4 0.5 NA [8,] 0.2 -1.3 -0.4 0.7 0.2 NA [9,] -0.1 -0.5 -0.9 1.1 -0.4 NA [10,] 0.8 -0.5 -0.9 -0.4 -0.4 NA [11,] -2.9 1.1 1.2 -1.5 -0.4 NA [12,] 0.3 0.9 -0.1 0.0 -0.2 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/19pby1258142441.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/2rqbe1258142441.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/3hqsp1258142441.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/44nsn1258142441.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,] 0.7 0.8 -1.5 -3.7 -0.7 -0.7 0.7 1.8 1.4 0.5 -0.4 0.8 [2,] 1.3 1.0 -0.8 -2.9 0.9 0.4 1.5 2.1 2.0 1.5 1.0 1.0 [3,] 1.6 1.3 1.6 2.0 2.7 2.8 2.5 3.0 2.8 2.8 2.4 2.0 [4,] 2.0 1.9 2.5 3.1 3.9 3.3 2.7 3.0 3.2 3.1 3.5 2.0 [5,] 3.0 1.9 5.1 4.5 4.2 4.5 4.5 3.3 3.2 3.9 3.9 2.1 $n [1] 6 6 6 6 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1.148477 0.719471 -0.5286066 -1.870194 0.5802076 0.7508673 1.652083 [2,] 2.051523 1.880529 3.7286066 5.870194 4.8197924 4.8491327 3.347917 [,8] [,9] [,10] [,11] [,12] [1,] 2.364062 1.952083 1.669444 0.6335063 1.293403 [2,] 3.635938 3.647917 3.930556 4.1664937 2.706597 $out [1] 4 $group [1] 2 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0.7, 1.3, 1.6, 2, 3, 0.8, 1, 1.3, 1.9, 1.9, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/54td81258142441.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.70 -2.60 -2.20 -0.4 -0.9 -0.6 -1.2 -1.3 -0.9 -0.5 -2.9 -0.2 [2,] -0.50 -1.80 -2.10 -0.3 -0.5 -0.3 -0.9 -0.4 -0.5 -0.5 -1.5 -0.1 [3,] -0.45 0.25 -0.75 -0.2 0.0 0.0 0.5 0.2 -0.4 -0.4 -0.4 0.0 [4,] 1.00 1.00 0.60 1.0 0.1 0.3 1.4 0.2 -0.1 -0.4 1.1 0.3 [5,] 1.20 1.10 1.70 2.2 0.6 0.3 1.5 0.7 -0.1 -0.4 1.2 0.9 $n [1] 6 6 6 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -1.4175484 -1.556090 -2.4915872 -1.1185767 -0.4239585 -0.4239585 -1.125174 [2,] 0.5175484 2.056090 0.9915872 0.7185767 0.4239585 0.4239585 2.125174 [,8] [,9] [,10] [,11] [,12] [1,] -0.2239585 -0.682639 -0.4706597 -2.237153 -0.282639 [2,] 0.6239585 -0.117361 -0.3293403 1.437153 0.282639 $out [1] 2.2 1.1 0.8 -0.9 $group [1] 6 9 10 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-0.7, -0.5, -0.45, 1, 1.2, -2.6, -1.8, 0.25, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6b9yu1258142441.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.90 0.80 -0.40 0.40 1.5 -3.70 [2,] -0.70 1.25 1.10 0.80 2.2 -2.60 [3,] 1.20 2.05 2.85 1.95 2.6 -0.20 [4,] 3.05 3.60 4.10 2.45 2.9 1.45 [5,] 3.90 4.50 5.10 3.90 3.2 1.80 $n [1] 12 12 12 12 12 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.5104002 0.9781492 1.48168 1.197424 2.280725 -3.3995 [2,] 2.9104002 3.1218508 4.21832 2.702576 2.919275 2.9995 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(-2.9, -0.7, 1.2, 3.05, 3.9, 0.8, 1.25, 2.05, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7wvbd1258142441.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,] 0.8333333 1.30 0.57500 [2,] 1.6400000 1.80 1.45625 [3,] 2.0700000 2.45 1.97500 [4,] 2.3700000 2.80 2.35000 [5,] 2.6400000 3.00 2.60000 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 1.737042 1.993893 1.567355 [2,] 2.402958 2.906107 2.382645 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(0.833333333333333, 1.64, 2.07, 2.37, 2.64, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/19pby1258142441.ps tmp/19pby1258142441.png") > system("convert tmp/2rqbe1258142441.ps tmp/2rqbe1258142441.png") > system("convert tmp/3hqsp1258142441.ps tmp/3hqsp1258142441.png") > system("convert tmp/44nsn1258142441.ps tmp/44nsn1258142441.png") > system("convert tmp/54td81258142441.ps tmp/54td81258142441.png") > system("convert tmp/6b9yu1258142441.ps tmp/6b9yu1258142441.png") > system("convert tmp/7wvbd1258142441.ps tmp/7wvbd1258142441.png") > > > proc.time() user system elapsed 1.200 0.936 1.470