R version 2.7.0 (2008-04-22) 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' > x <- x[x>quantile(x,0.05) & x #'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] 36 > (np <- floor(n / par1)) [1] 9 > 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] 9 9 9 9 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 191.9 196.2 201.3 206.5 210.0 214.8 220.4 225.5 229.1 NA [2,] 193.5 196.2 203.5 207.8 211.7 216.4 221.8 226.5 229.9 NA [3,] 194.9 198.0 204.1 208.6 212.4 217.5 222.5 227.8 230.8 NA [4,] 194.9 198.6 204.8 209.7 213.7 218.6 223.4 228.5 231.9 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1.6 0.0 2.2 1.3 1.7 1.6 1.4 1.0 0.8 NA [2,] 1.4 1.8 0.6 0.8 0.7 1.1 0.7 1.3 0.9 NA [3,] 0.0 0.6 0.7 1.1 1.3 1.1 0.9 0.7 1.1 NA [4,] 1.3 2.7 1.7 0.3 1.1 1.8 2.1 0.6 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/1d8ec1229178312.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/2klqk1229178312.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/39b611229178312.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/4nw7m1229178312.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,] 191.9 193.5 194.9 194.9 [2,] 201.3 203.5 204.1 204.8 [3,] 210.0 211.7 212.4 213.7 [4,] 220.4 221.8 222.5 223.4 [5,] 229.1 229.9 230.8 231.9 $n [1] 9 9 9 9 $conf [,1] [,2] [,3] [,4] [1,] 199.9407 202.062 202.7093 203.904 [2,] 220.0593 221.338 222.0907 223.496 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" Warning message: In bxp(list(stats = c(191.9, 201.3, 210, 220.4, 229.1, 193.5, 203.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/56w8v1229178312.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.8 0.6 0.6 0.30 [2,] 1.0 0.7 0.7 0.85 [3,] 1.4 0.9 0.9 1.50 [4,] 1.6 1.3 1.1 1.95 [5,] 2.2 1.8 1.3 2.70 $n [1] 9 9 9 8 $conf [,1] [,2] [,3] [,4] [1,] 1.084 0.584 0.6893333 0.8855242 [2,] 1.716 1.216 1.1106667 2.1144758 $out [1] 0 0 $group [1] 1 3 $names [1] "1" "2" "3" "4" Warning message: In bxp(list(stats = c(0.800000000000011, 1, 1.40000000000001, 1.59999999999999, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/68td41229178312.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,] 191.9 196.2 201.30 206.50 210.00 214.80 220.40 225.50 229.10 NA [2,] 192.7 196.2 202.40 207.15 210.85 215.60 221.10 226.00 229.50 NA [3,] 194.2 197.1 203.80 208.20 212.05 216.95 222.15 227.15 230.35 NA [4,] 194.9 198.3 204.45 209.15 213.05 218.05 222.95 228.15 231.35 NA [5,] 194.9 198.6 204.80 209.70 213.70 218.60 223.40 228.50 231.90 NA $n [1] 4 4 4 4 4 4 4 4 4 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 192.462 195.441 202.1805 206.62 210.312 215.0145 220.6885 225.4515 [2,] 195.938 198.759 205.4195 209.78 213.788 218.8855 223.6115 228.8485 [,9] [,10] [1,] 228.8885 NA [2,] 231.8115 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" NA Warning message: In bxp(list(stats = c(191.9, 192.7, 194.2, 194.9, 194.9, 196.2, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7t9701229178312.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.6333 210.00 210.850 [2,] 211.2778 210.85 211.750 [3,] 212.4389 212.05 212.975 [4,] 213.3722 213.05 213.700 [5,] 213.7889 213.70 214.100 $n [1] 4 4 4 $conf [,1] [,2] [,3] [1,] 210.7843 210.312 211.4345 [2,] 214.0935 213.788 214.5155 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(210.633333333333, 211.277777777778, 212.438888888889, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > system("convert tmp/1d8ec1229178312.ps tmp/1d8ec1229178312.png") > system("convert tmp/2klqk1229178312.ps tmp/2klqk1229178312.png") > system("convert tmp/39b611229178312.ps tmp/39b611229178312.png") > system("convert tmp/4nw7m1229178312.ps tmp/4nw7m1229178312.png") > system("convert tmp/56w8v1229178312.ps tmp/56w8v1229178312.png") > system("convert tmp/68td41229178312.ps tmp/68td41229178312.png") > system("convert tmp/7t9701229178312.ps tmp/7t9701229178312.png") > > > proc.time() user system elapsed 2.514 1.562 2.759