R version 2.8.0 (2008-10-20) 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(188.5,188.6,191.9,193.5,194.9,194.9,196.2,196.2,198,198.6,201.3,203.5,204.1,204.8,206.5,207.8,208.6,209.7,210,211.7,212.4,213.7,214.8,216.4,217.5,218.6,220.4,221.8,222.5,223.4,225.5,226.5,227.8,228.5,229.1,229.9,230.8,231.9,236,237.5) > 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] 40 > (np <- floor(n / par1)) [1] 10 > 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] 10 10 10 10 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] 188.5 194.9 198.0 204.1 208.6 212.4 217.5 222.5 227.8 230.8 NA [2,] 188.6 194.9 198.6 204.8 209.7 213.7 218.6 223.4 228.5 231.9 NA [3,] 191.9 196.2 201.3 206.5 210.0 214.8 220.4 225.5 229.1 236.0 NA [4,] 193.5 196.2 203.5 207.8 211.7 216.4 221.8 226.5 229.9 237.5 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] 0.1 0.0 0.6 0.7 1.1 1.3 1.1 0.9 0.7 1.1 NA [2,] 3.3 1.3 2.7 1.7 0.3 1.1 1.8 2.1 0.6 4.1 NA [3,] 1.6 0.0 2.2 1.3 1.7 1.6 1.4 1.0 0.8 1.5 NA [4,] 1.4 1.8 0.6 0.8 0.7 1.1 0.7 1.3 0.9 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/freestat/rcomp/tmp/1hfsp1229959458.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/freestat/rcomp/tmp/2lhl01229959458.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/freestat/rcomp/tmp/33xoe1229959458.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/freestat/rcomp/tmp/4psbr1229959458.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,] 188.5 188.6 191.9 193.50 [2,] 198.0 198.6 201.3 203.50 [3,] 210.5 211.7 212.4 214.05 [4,] 222.5 223.4 225.5 226.50 [5,] 230.8 231.9 236.0 237.50 $n [1] 10 10 10 10 $conf [,1] [,2] [,3] [,4] [1,] 198.2588 199.3089 200.3087 202.5583 [2,] 222.7412 224.0911 224.4913 225.5417 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" Warning message: In bxp(list(stats = c(188.5, 198, 210.5, 222.5, 230.8, 188.6, 198.6, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/55yh01229959458.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,] 0.0 0.30 0.80 0.6 [2,] 0.6 1.10 1.00 0.7 [3,] 0.8 1.75 1.45 0.9 [4,] 1.1 2.70 1.60 1.3 [5,] 1.3 4.10 2.20 1.8 $n [1] 10 10 10 9 $conf [,1] [,2] [,3] [,4] [1,] 0.5501801 0.9505762 1.150216 0.584 [2,] 1.0498199 2.5494238 1.749784 1.216 $out [1] 0 $group [1] 3 $names [1] "1" "2" "3" "4" Warning message: In bxp(list(stats = c(0, 0.599999999999994, 0.800000000000011, 1.09999999999999, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/6k82u1229959458.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] [1,] 188.50 194.90 198.00 204.10 208.60 212.40 217.50 222.50 227.80 230.80 [2,] 188.55 194.90 198.30 204.45 209.15 213.05 218.05 222.95 228.15 231.35 [3,] 190.25 195.55 199.95 205.65 209.85 214.25 219.50 224.45 228.80 233.95 [4,] 192.70 196.20 202.40 207.15 210.85 215.60 221.10 226.00 229.50 236.75 [5,] 193.50 196.20 203.50 207.80 211.70 216.40 221.80 226.50 229.90 237.50 [,11] [1,] NA [2,] NA [3,] NA [4,] NA [5,] NA $n [1] 4 4 4 4 4 4 4 4 4 4 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 186.9715 194.523 196.711 203.517 208.507 212.2355 217.0905 222.0405 [2,] 193.5285 196.577 203.189 207.783 211.193 216.2645 221.9095 226.8595 [,9] [,10] [,11] [1,] 227.7335 229.684 NA [2,] 229.8665 238.216 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(188.5, 188.55, 190.25, 192.7, 193.5, 194.9, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/7rn951229959458.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,] 210.510 210.500 210.3875 [2,] 210.890 211.100 210.7812 [3,] 212.220 212.050 212.2938 [4,] 213.825 213.225 214.1813 [5,] 214.480 214.050 214.9500 $n [1] 4 4 4 $conf [,1] [,2] [,3] [1,] 209.9014 210.3712 209.6078 [2,] 214.5387 213.7288 214.9798 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(210.51, 210.89, 212.22, 213.825, 214.48, 210.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1hfsp1229959458.ps tmp/1hfsp1229959458.png") > system("convert tmp/2lhl01229959458.ps tmp/2lhl01229959458.png") > system("convert tmp/33xoe1229959458.ps tmp/33xoe1229959458.png") > system("convert tmp/4psbr1229959458.ps tmp/4psbr1229959458.png") > system("convert tmp/55yh01229959458.ps tmp/55yh01229959458.png") > system("convert tmp/6k82u1229959458.ps tmp/6k82u1229959458.png") > system("convert tmp/7rn951229959458.ps tmp/7rn951229959458.png") > > > proc.time() user system elapsed 1.823 1.464 2.092