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(101.2,101.1,100.7,100.1,99.9,99.7,99.5,99.2,99,99,99.3,99.5,99.7,100,100.4,100.6,100.7,100.7,100.6,100.5,100.6,100.5,100.4,100.3,100.4,100.4,100.4,100.4,100.4,100.5,100.6,100.6,100.5,100.5,100.7,101.1,101.5,101.9,102.1,102.1,102.1,102.4,102.8,103.1,103.1,102.9,102.4,101.9,101.3,100.7,100.6,101,101.5,101.9,102.1,102.3,102.5,102.9,103.6,104.3) > 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,] 101.2 99.7 100.4 101.5 101.3 NA [2,] 101.1 100.0 100.4 101.9 100.7 NA [3,] 100.7 100.4 100.4 102.1 100.6 NA [4,] 100.1 100.6 100.4 102.1 101.0 NA [5,] 99.9 100.7 100.4 102.1 101.5 NA [6,] 99.7 100.7 100.5 102.4 101.9 NA [7,] 99.5 100.6 100.6 102.8 102.1 NA [8,] 99.2 100.5 100.6 103.1 102.3 NA [9,] 99.0 100.6 100.5 103.1 102.5 NA [10,] 99.0 100.5 100.5 102.9 102.9 NA [11,] 99.3 100.4 100.7 102.4 103.6 NA [12,] 99.5 100.3 101.1 101.9 104.3 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.1 0.3 0.0 0.4 -0.6 NA [2,] -0.4 0.4 0.0 0.2 -0.1 NA [3,] -0.6 0.2 0.0 0.0 0.4 NA [4,] -0.2 0.1 0.0 0.0 0.5 NA [5,] -0.2 0.0 0.1 0.3 0.4 NA [6,] -0.2 -0.1 0.1 0.4 0.2 NA [7,] -0.3 -0.1 0.0 0.3 0.2 NA [8,] -0.2 0.1 -0.1 0.0 0.2 NA [9,] 0.0 -0.1 0.0 -0.2 0.4 NA [10,] 0.3 -0.1 0.2 -0.5 0.7 NA [11,] 0.2 -0.1 0.4 -0.5 0.7 NA [12,] 0.2 0.1 0.4 -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/freestat/rcomp/tmp/1nxge1258017903.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/2pumb1258017903.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/3m5qj1258017903.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/4un9n1258017903.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,] 99.7 100.0 100.4 100.1 99.9 99.7 99.5 99.2 99.0 99.0 99.3 99.5 [2,] 100.4 100.4 100.4 100.4 100.4 100.5 100.6 100.5 100.5 100.5 100.4 100.3 [3,] 101.2 100.7 100.6 100.6 100.7 100.7 100.6 100.6 100.6 100.5 100.7 101.1 [4,] 101.3 101.1 100.7 101.0 101.5 101.9 102.1 102.3 102.5 102.9 102.4 101.9 [5,] 101.5 101.9 100.7 101.0 102.1 102.4 102.8 103.1 103.1 102.9 103.6 104.3 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 100.5641 100.2054 100.3880 100.1760 99.92274 99.71076 99.5401 99.32812 [2,] 101.8359 101.1946 100.8120 101.0240 101.47726 101.68924 101.6599 101.87188 [,9] [,10] [,11] [,12] [1,] 99.1868 98.80417 99.2868 99.96944 [2,] 102.0132 102.19583 102.1132 102.23056 $out [1] 102.1 102.1 $group [1] 3 4 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(99.7, 100.4, 101.2, 101.3, 101.5, 100, 100.4, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/5nk211258017903.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.6 -0.4 0.0 0.0 -0.2 -0.2 -0.3 -0.2 -0.2 -0.5 -0.5 -0.60 [2,] -0.1 -0.1 0.0 0.0 0.0 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.25 [3,] 0.0 0.0 0.0 0.0 0.1 0.1 0.0 0.0 0.0 0.2 0.2 0.15 [4,] 0.3 0.2 0.2 0.1 0.3 0.2 0.2 0.1 0.0 0.3 0.4 0.30 [5,] 0.4 0.4 0.4 0.1 0.4 0.4 0.3 0.2 0.0 0.7 0.7 0.40 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.282639 -0.2119792 -0.1413195 -0.07065975 -0.1119792 -0.1119792 [2,] 0.282639 0.2119792 0.1413195 0.07065975 0.3119792 0.3119792 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.2119792 -0.1413195 -0.07065975 -0.082639 -0.1532987 -0.2845 [2,] 0.2119792 0.1413195 0.07065975 0.482639 0.5532987 0.5845 $out [1] -0.6 -0.2 0.5 0.4 $group [1] 3 4 4 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-0.599999999999994, -0.100000000000009, 0, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/6mkhp1258017903.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,] 99.00 100.00 100.4 101.50 100.60 NA [2,] 99.25 100.35 100.4 102.00 101.15 NA [3,] 99.60 100.50 100.5 102.25 102.00 NA [4,] 100.40 100.60 100.6 102.85 102.70 NA [5,] 101.20 100.70 100.7 103.10 104.30 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 99.07548 100.3860 100.4088 101.8623 101.2930 NA [2,] 100.12452 100.6140 100.5912 102.6377 102.7070 NA $out [1] 99.7 101.1 $group [1] 2 3 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(99, 99.25, 99.6, 100.4, 101.2, 100, 100.35, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/7ntqj1258017903.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,] 100.82 100.50 100.55 [2,] 100.84 100.60 100.80 [3,] 101.08 100.65 101.15 [4,] 101.15 100.70 101.40 [5,] 101.42 100.70 101.70 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 100.9386 100.6044 100.8763 [2,] 101.2214 100.6956 101.4237 $out [1] 101.2 101.1 $group [1] 2 2 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(100.82, 100.84, 101.08, 101.15, 101.42, 100.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1nxge1258017903.ps tmp/1nxge1258017903.png") > system("convert tmp/2pumb1258017903.ps tmp/2pumb1258017903.png") > system("convert tmp/3m5qj1258017903.ps tmp/3m5qj1258017903.png") > system("convert tmp/4un9n1258017903.ps tmp/4un9n1258017903.png") > system("convert tmp/5nk211258017903.ps tmp/5nk211258017903.png") > system("convert tmp/6mkhp1258017903.ps tmp/6mkhp1258017903.png") > system("convert tmp/7ntqj1258017903.ps tmp/7ntqj1258017903.png") > > > proc.time() user system elapsed 1.907 1.498 2.267