R version 2.11.1 (2010-05-31) Copyright (C) 2010 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(131,130.1,142,127.6,135,145.1,123.8,120.6,132.3,132.6,141.6,135.8,131.6,131.4,138.9,127.3,133.4,135.6,122,122.5,138.8,131.6,149.9,143.7,127.1,137.3,132.5,132.7,138.6,129.2,128.7,135.7,134.4,145,151.1,136.3,133.2,128.8,136.3,131.3,128.6,139.3,120.8,126.7,128.6,137.5,140.8,132.3,130.5,117.1) > 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] 50 > (np <- floor(n / par1)) [1] 4 > 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 4 4 4 4 4 4 4 4 4 4 > arr [,1] [,2] [,3] [,4] [,5] [1,] 131.0 131.6 127.1 133.2 130.5 [2,] 130.1 131.4 137.3 128.8 117.1 [3,] 142.0 138.9 132.5 136.3 NA [4,] 127.6 127.3 132.7 131.3 NA [5,] 135.0 133.4 138.6 128.6 NA [6,] 145.1 135.6 129.2 139.3 NA [7,] 123.8 122.0 128.7 120.8 NA [8,] 120.6 122.5 135.7 126.7 NA [9,] 132.3 138.8 134.4 128.6 NA [10,] 132.6 131.6 145.0 137.5 NA [11,] 141.6 149.9 151.1 140.8 NA [12,] 135.8 143.7 136.3 132.3 NA > darr [,1] [,2] [,3] [,4] [,5] [1,] -0.9 -0.2 10.2 -4.4 -13.4 [2,] 11.9 7.5 -4.8 7.5 NA [3,] -14.4 -11.6 0.2 -5.0 NA [4,] 7.4 6.1 5.9 -2.7 NA [5,] 10.1 2.2 -9.4 10.7 NA [6,] -21.3 -13.6 -0.5 -18.5 NA [7,] -3.2 0.5 7.0 5.9 NA [8,] 11.7 16.3 -1.3 1.9 NA [9,] 0.3 -7.2 10.6 8.9 NA [10,] 9.0 18.3 6.1 3.3 NA [11,] -5.8 -6.2 -14.8 -8.5 NA [12,] -4.2 -16.6 -3.1 -1.8 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/rcomp/tmp/1q5cj1290717295.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/rcomp/tmp/21wbm1290717295.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/rcomp/tmp/31wbm1290717295.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/rcomp/tmp/41wbm1290717295.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] [1,] 130.5 128.8 132.50 127.30 128.6 129.20 120.80 120.60 128.60 131.60 140.80 [2,] 130.5 128.8 134.40 127.45 131.0 132.40 121.40 121.55 130.45 132.10 141.20 [3,] 131.0 130.1 137.60 129.45 134.2 137.45 122.90 124.60 133.35 135.05 145.75 [4,] 131.6 131.4 140.45 132.00 136.8 142.20 126.25 131.20 136.60 141.25 150.50 [5,] 133.2 131.4 142.00 132.70 138.6 145.10 128.70 135.70 138.80 145.00 151.10 [,12] [1,] 132.30 [2,] 134.05 [3,] 136.05 [4,] 140.00 [5,] 143.70 $n [1] 5 5 4 4 4 4 4 4 4 4 4 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 130.2227 128.2628 132.8205 125.8555 129.618 129.708 119.0685 116.9765 [2,] 131.7773 131.9372 142.3795 133.0445 138.782 145.192 126.7315 132.2235 [,9] [,10] [,11] [,12] [1,] 128.4915 127.8215 138.403 131.3495 [2,] 138.2085 142.2785 153.097 140.7505 $out [1] 127.1 137.3 117.1 $group [1] 1 2 2 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(130.5, 130.5, 131, 131.6, 133.2, 128.8, 128.8, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/5uoap1290717295.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,] -4.4 -4.80 -14.4 -2.70 -9.40 -21.30 -3.20 -1.3 -7.20 3.30 -14.80 -16.60 [2,] -4.4 1.35 -13.0 1.60 -3.60 -19.90 -1.35 0.3 -3.45 4.70 -11.65 -10.40 [3,] -0.9 7.50 -8.3 6.00 6.15 -16.05 3.20 6.8 4.60 7.55 -7.35 -3.65 [4,] -0.2 9.70 -2.4 6.75 10.40 -7.05 6.45 14.0 9.75 13.65 -6.00 -2.45 [5,] -0.2 11.90 0.2 7.40 10.70 -0.50 7.00 16.3 10.60 18.30 -5.80 -1.80 $n [1] 5 4 4 4 4 4 4 4 4 4 4 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] -3.867709 0.9035 -16.674 1.9315 -4.91 -26.2015 -2.962 -4.023 -5.828 [2,] 2.067709 14.0965 0.074 10.0685 17.21 -5.8985 9.362 17.623 15.028 [,10] [,11] [,12] [1,] 0.4795 -11.8135 -9.9305 [2,] 14.6205 -2.8865 2.6305 $out [1] 10.2 -13.4 $group [1] 1 1 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-4.39999999999998, -4.39999999999998, -0.900000000000006, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/6uoap1290717295.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] [1,] 120.60 122.00 127.10 120.8 117.1 [2,] 128.85 129.35 130.85 128.6 117.1 [3,] 132.45 132.50 135.05 131.8 123.8 [4,] 138.70 138.85 137.95 136.9 130.5 [5,] 145.10 149.90 145.00 140.8 130.5 $n [1] 12 12 12 12 2 $conf [,1] [,2] [,3] [,4] [,5] [1,] 127.9573 128.1670 131.8116 128.0143 108.8291 [2,] 136.9427 136.8330 138.2884 135.5857 138.7709 $out [1] 151.1 $group [1] 3 $names [1] "1" "2" "3" "4" NA Warning message: In bxp(list(stats = c(120.6, 128.85, 132.45, 138.7, 145.1, 122, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/7uoap1290717295.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,] 123.8250 122.900 123.3625 [2,] 129.3325 129.775 129.8438 [3,] 133.7125 133.775 133.7438 [4,] 137.1625 136.750 136.9563 [5,] 145.8500 145.750 145.8000 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 130.1412 130.5937 130.4997 [2,] 137.2838 136.9563 136.9878 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(123.825, 129.3325, 133.7125, 137.1625, 145.85, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1q5cj1290717295.ps tmp/1q5cj1290717295.png",intern=TRUE)) character(0) > try(system("convert tmp/21wbm1290717295.ps tmp/21wbm1290717295.png",intern=TRUE)) character(0) > try(system("convert tmp/31wbm1290717295.ps tmp/31wbm1290717295.png",intern=TRUE)) character(0) > try(system("convert tmp/41wbm1290717295.ps tmp/41wbm1290717295.png",intern=TRUE)) character(0) > try(system("convert tmp/5uoap1290717295.ps tmp/5uoap1290717295.png",intern=TRUE)) character(0) > try(system("convert tmp/6uoap1290717295.ps tmp/6uoap1290717295.png",intern=TRUE)) character(0) > try(system("convert tmp/7uoap1290717295.ps tmp/7uoap1290717295.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.970 0.780 2.721