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(103,102.4,102,101.8,101.6,101.4,101.3,101.4,101.7,102.4,103.1,103.8,104.4,105,105.7,106.4,107.1,107.9,108.8,109.6,110.3,110.8,111.2,111.7,112.3,112.8,113.1,113.1,113.1,113.2,113.1,112.8,112.5,112.3,112.5,112.9,113.5,114.1,114.6,114.9,115.4,115.7,116.1,116.5,117.1,117.5,117.7,117.7,117.7,117.6,117.5,117.6,117.9,118.2,118.5,118.7,118.8,118.9,119,119) > 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,] 103.0 104.4 112.3 113.5 117.7 NA [2,] 102.4 105.0 112.8 114.1 117.6 NA [3,] 102.0 105.7 113.1 114.6 117.5 NA [4,] 101.8 106.4 113.1 114.9 117.6 NA [5,] 101.6 107.1 113.1 115.4 117.9 NA [6,] 101.4 107.9 113.2 115.7 118.2 NA [7,] 101.3 108.8 113.1 116.1 118.5 NA [8,] 101.4 109.6 112.8 116.5 118.7 NA [9,] 101.7 110.3 112.5 117.1 118.8 NA [10,] 102.4 110.8 112.3 117.5 118.9 NA [11,] 103.1 111.2 112.5 117.7 119.0 NA [12,] 103.8 111.7 112.9 117.7 119.0 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.6 0.6 0.5 0.6 -0.1 NA [2,] -0.4 0.7 0.3 0.5 -0.1 NA [3,] -0.2 0.7 0.0 0.3 0.1 NA [4,] -0.2 0.7 0.0 0.5 0.3 NA [5,] -0.2 0.8 0.1 0.3 0.3 NA [6,] -0.1 0.9 -0.1 0.4 0.3 NA [7,] 0.1 0.8 -0.3 0.4 0.2 NA [8,] 0.3 0.7 -0.3 0.6 0.1 NA [9,] 0.7 0.5 -0.2 0.4 0.1 NA [10,] 0.7 0.4 0.2 0.2 0.1 NA [11,] 0.7 0.5 0.4 0.0 0.0 NA [12,] 0.6 0.6 0.6 0.0 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/1ith41229977173.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/2vl2f1229977173.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/3ed7g1229977173.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/4iog01229977173.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,] 103.0 102.4 102.0 101.8 101.6 101.4 101.3 101.4 101.7 102.4 103.1 103.8 [2,] 104.4 105.0 105.7 106.4 107.1 107.9 108.8 109.6 110.3 110.8 111.2 111.7 [3,] 112.3 112.8 113.1 113.1 113.1 113.2 113.1 112.8 112.5 112.3 112.5 112.9 [4,] 113.5 114.1 114.6 114.9 115.4 115.7 116.1 116.5 117.1 117.5 117.7 117.7 [5,] 117.7 117.6 117.5 117.6 117.9 118.2 118.5 118.7 118.8 118.9 119.0 119.0 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 105.8700 106.3700 106.8113 107.0939 107.2352 107.6885 107.9418 107.9245 [2,] 118.7300 119.2300 119.3887 119.1061 118.9648 118.7115 118.2582 117.6755 [,9] [,10] [,11] [,12] [1,] 107.6951 107.5658 107.9071 108.6604 [2,] 117.3049 117.0342 117.0929 117.1396 $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(103, 104.4, 112.3, 113.5, 117.7, 102.4, 105, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5yqsl1229977173.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.2 -0.2 0.1 -0.1 -0.3 -0.3 -0.2 0.1 0.0 0.0 [2,] -0.1 -0.1 0.0 0.0 0.1 -0.1 0.1 0.1 0.1 0.2 0.0 0.3 [3,] 0.5 0.3 0.1 0.3 0.3 0.3 0.2 0.3 0.4 0.2 0.4 0.6 [4,] 0.6 0.5 0.3 0.5 0.3 0.4 0.4 0.6 0.5 0.4 0.5 0.6 [5,] 0.6 0.7 0.7 0.7 0.3 0.9 0.8 0.7 0.7 0.7 0.7 0.6 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.005381763 -0.1239585 -0.1119792 -0.05329874 0.1586805 -0.05329874 [2,] 0.994618237 0.7239585 0.3119792 0.65329874 0.4413195 0.65329874 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.01197924 -0.05329874 0.117361 0.0586805 0.04670126 0.363 [2,] 0.41197924 0.65329874 0.682639 0.3413195 0.75329874 0.837 $out [1] -0.2 0.8 $group [1] 5 5 $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.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6q6zw1229977173.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,] 101.3 104.40 112.30 113.50 117.50 NA [2,] 101.5 106.05 112.50 114.75 117.65 NA [3,] 101.9 108.35 112.85 115.90 118.35 NA [4,] 102.7 110.55 113.10 117.30 118.85 NA [5,] 103.8 111.70 113.20 117.70 119.00 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 101.3527 106.2975 112.5763 114.7369 117.8027 NA [2,] 102.4473 110.4025 113.1237 117.0631 118.8973 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(101.3, 101.5, 101.9, 102.7, 103.8, 104.4, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7va271229977173.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,] 110.18 112.30 108.950 [2,] 110.67 112.50 110.400 [3,] 111.42 112.85 112.125 [4,] 112.23 113.10 113.925 [5,] 113.02 113.20 114.700 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 110.7085 112.5763 110.5172 [2,] 112.1315 113.1237 113.7328 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(110.18, 110.67, 111.42, 112.23, 113.02, 112.3, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1ith41229977173.ps tmp/1ith41229977173.png") > system("convert tmp/2vl2f1229977173.ps tmp/2vl2f1229977173.png") > system("convert tmp/3ed7g1229977173.ps tmp/3ed7g1229977173.png") > system("convert tmp/4iog01229977173.ps tmp/4iog01229977173.png") > system("convert tmp/5yqsl1229977173.ps tmp/5yqsl1229977173.png") > system("convert tmp/6q6zw1229977173.ps tmp/6q6zw1229977173.png") > system("convert tmp/7va271229977173.ps tmp/7va271229977173.png") > > > proc.time() user system elapsed 1.195 0.949 1.990