R version 2.7.2 (2008-08-25) 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,88,108,116,104,110,105,107,124,109,102,125,102,101,116,114,115,119,108,110,120,113,111,121,99,104,117,108,122,122,111,111,131,108,118,119,104,105,118,124,123,114,119,116,129,112,123,124,117,110,118,135,127,117,137,130,132,142,122,126) > 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 102 99 104 117 NA [2,] 88 101 104 105 110 NA [3,] 108 116 117 118 118 NA [4,] 116 114 108 124 135 NA [5,] 104 115 122 123 127 NA [6,] 110 119 122 114 117 NA [7,] 105 108 111 119 137 NA [8,] 107 110 111 116 130 NA [9,] 124 120 131 129 132 NA [10,] 109 113 108 112 142 NA [11,] 102 111 118 123 122 NA [12,] 125 121 119 124 126 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -13 -1 5 1 -7 NA [2,] 20 15 13 13 8 NA [3,] 8 -2 -9 6 17 NA [4,] -12 1 14 -1 -8 NA [5,] 6 4 0 -9 -10 NA [6,] -5 -11 -11 5 20 NA [7,] 2 2 0 -3 -7 NA [8,] 17 10 20 13 2 NA [9,] -15 -7 -23 -17 10 NA [10,] -7 -2 10 11 -20 NA [11,] 23 10 1 1 4 NA [12,] -23 -22 -15 -7 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/1fm381226074901.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/2clt41226074901.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/324w41226074901.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/4z0u81226074901.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 101 116 108 104 110 105 107 120 108 102 119 [2,] 101 101 116 114 115 114 108 110 124 109 111 121 [3,] 102 104 117 116 122 117 111 111 129 112 118 124 [4,] 104 105 118 124 123 119 119 116 131 113 122 125 [5,] 104 110 118 135 127 122 119 116 132 113 123 126 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 99.8802 101.1736 115.5868 108.9340 116.3472 113.4670 103.2274 106.7604 [2,] 104.1198 106.8264 118.4132 123.0660 127.6528 120.5330 118.7726 115.2396 [,9] [,10] [,11] [,12] [1,] 124.0538 109.1736 110.2274 121.1736 [2,] 133.9462 114.8264 125.7726 126.8264 $out [1] 117 88 108 137 130 142 $group [1] 1 2 3 7 8 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(99, 101, 102, 104, 104, 101, 101, 104, 105, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/5xlxa1226074901.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,] -13 13 -9 -12 -10 -11 -7 2 -23 -20 1 -23.0 [2,] -7 13 -2 -8 -9 -11 -3 10 -17 -7 1 -22.5 [3,] -1 13 6 -1 0 -5 0 13 -15 -2 4 -18.5 [4,] 1 15 8 1 4 5 2 17 -7 10 10 -11.0 [5,] 5 15 17 14 6 20 2 20 -7 11 23 -7.0 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -6.65278 11.58681 -1.065975 -7.359377 -9.185767 -16.30556 -3.532987 [2,] 4.65278 14.41319 13.065975 5.359377 9.185767 6.30556 3.532987 [,8] [,9] [,10] [,11] [,12] [1,] 8.053818 -22.065975 -14.01216 -2.359377 -27.585 [2,] 17.946182 -7.934025 10.01216 10.359377 -9.415 $out [1] 20 8 10 $group [1] 2 2 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-13, -7, -1, 1, 5, 13, 13, 13, 15, 15, -9, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/6hme31226074901.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,] 88.0 101.0 99.0 104.0 110.0 NA [2,] 103.0 109.0 108.0 113.0 117.5 NA [3,] 107.5 113.5 114.0 118.5 126.5 NA [4,] 113.0 117.5 120.5 123.5 133.5 NA [5,] 125.0 121.0 131.0 129.0 142.0 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 102.9389 109.6231 108.2987 113.7109 119.2023 NA [2,] 112.0611 117.3769 119.7013 123.2891 133.7977 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(88, 103, 107.5, 113, 125, 101, 109, 113.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/7l7cn1226074901.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,] 114.8 102.0 102.5 [2,] 115.0 111.0 112.0 [3,] 116.2 116.5 116.5 [4,] 118.8 120.0 119.0 [5,] 123.0 129.0 127.5 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 114.4668 112.3950 113.3073 [2,] 117.9332 120.6050 119.6927 $out [1] 104.6 101.6 127.2 $group [1] 1 1 1 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(114.8, 115, 116.2, 118.8, 123, 102, 111, 116.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1fm381226074901.ps tmp/1fm381226074901.png") > system("convert tmp/2clt41226074901.ps tmp/2clt41226074901.png") > system("convert tmp/324w41226074901.ps tmp/324w41226074901.png") > system("convert tmp/4z0u81226074901.ps tmp/4z0u81226074901.png") > system("convert tmp/5xlxa1226074901.ps tmp/5xlxa1226074901.png") > system("convert tmp/6hme31226074901.ps tmp/6hme31226074901.png") > system("convert tmp/7l7cn1226074901.ps tmp/7l7cn1226074901.png") > > > proc.time() user system elapsed 2.149 1.462 2.487