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(130,129,128,126,146,145,130,120,121,121,122,124,123,125,120,124,146,149,138,133,135,149,146,141,139,141,138,139,166,179,167,154,151,162,148,143,145,143,148,139,169,186,174,161,151,158,144,135,139,137,149,136,169,185,177,164,145,147,142,126,130,136,139,120,151,166,156,150,141,141,130,110,110,123,133,108,136,148,146,142,132,128,116,90,94,112,130,106,124,139,140,129,113,110,102,78,79,94,121,99,126,137,141,119,96,96,88,64,66,92,120,101,135,146,149,134,101,100,91,70) > 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] 120 > (np <- floor(n / par1)) [1] 10 > 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] 10 10 10 10 10 10 10 10 10 10 10 10 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] 130 123 139 145 139 130 110 94 79 66 NA [2,] 129 125 141 143 137 136 123 112 94 92 NA [3,] 128 120 138 148 149 139 133 130 121 120 NA [4,] 126 124 139 139 136 120 108 106 99 101 NA [5,] 146 146 166 169 169 151 136 124 126 135 NA [6,] 145 149 179 186 185 166 148 139 137 146 NA [7,] 130 138 167 174 177 156 146 140 141 149 NA [8,] 120 133 154 161 164 150 142 129 119 134 NA [9,] 121 135 151 151 145 141 132 113 96 101 NA [10,] 121 149 162 158 147 141 128 110 96 100 NA [11,] 122 146 148 144 142 130 116 102 88 91 NA [12,] 124 141 143 135 126 110 90 78 64 70 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] -1 2 2 -2 -2 6 13 18 15 26 NA [2,] -1 -5 -3 5 12 3 10 18 27 28 NA [3,] -2 4 1 -9 -13 -19 -25 -24 -22 -19 NA [4,] 20 22 27 30 33 31 28 18 27 34 NA [5,] -1 3 13 17 16 15 12 15 11 11 NA [6,] -15 -11 -12 -12 -8 -10 -2 1 4 3 NA [7,] -10 -5 -13 -13 -13 -6 -4 -11 -22 -15 NA [8,] 1 2 -3 -10 -19 -9 -10 -16 -23 -33 NA [9,] 0 14 11 7 2 0 -4 -3 0 -1 NA [10,] 1 -3 -14 -14 -5 -11 -12 -8 -8 -9 NA [11,] 2 -5 -5 -9 -16 -20 -26 -24 -24 -21 NA [12,] -1 -2 2 4 4 0 4 1 2 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/rcomp/tmp/1qvbt1281093208.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/2imbw1281093208.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/3imbw1281093208.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/4imbw1281093208.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,] 66.0 92 120.0 99 124 137.0 130.0 119 96.0 96.0 88 64 [2,] 94.0 112 121.0 106 135 145.0 140.0 129 113.0 110.0 102 78 [3,] 126.5 127 131.5 122 146 148.5 147.5 138 133.5 134.5 126 117 [4,] 139.0 137 139.0 136 166 179.0 167.0 154 145.0 149.0 144 135 [5,] 145.0 143 149.0 139 169 186.0 177.0 164 151.0 162.0 148 143 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 104.0162 114.509 122.5065 107.0108 130.5112 131.5122 134.0097 125.509 [2,] 148.9838 139.491 140.4935 136.9892 161.4888 165.4878 160.9903 150.491 [,9] [,10] [,11] [,12] [1,] 117.5115 115.0140 105.0151 88.52053 [2,] 149.4885 153.9860 146.9849 145.47947 $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(66, 94, 126.5, 139, 145, 92, 112, 127, 137, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/5twsz1281093208.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,] -2 -5.0 -25 18.0 11.0 -15 -22 -33 -4 -14.0 -26 -2 [2,] -1 -1.0 -22 22.0 11.0 -12 -13 -19 -1 -12.0 -24 0 [3,] 4 7.5 -16 27.5 12.5 -9 -12 -10 0 -8.5 -18 2 [4,] 15 18.0 -2 31.0 15.0 1 -6 -3 7 -5.0 -5 4 [5,] 26 28.0 4 34.0 17.0 4 -4 2 14 1.0 2 4 $n [1] 10 10 10 10 10 10 10 10 10 10 10 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -3.994238 -1.993158 -25.992797 23.00324 10.50144 -15.495318 -15.497479 [2,] 11.994238 16.993158 -6.007203 31.99676 14.49856 -2.504682 -8.502521 [,8] [,9] [,10] [,11] [,12] [1,] -17.994238 -3.997119 -11.997479 -27.493158 -0.1066667 [2,] -2.005762 3.997119 -5.002521 -8.506842 4.1066667 $out [1] -1 3 $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(-2, -1, 4, 15, 26, -5, -1, 7.5, 18, 28, -25, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/6twsz1281093208.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] [,11] [1,] 120.0 120.0 138.0 135.0 126.0 110.0 90 78.0 64.0 66.0 NA [2,] 121.5 124.5 140.0 143.5 138.0 130.0 113 104.0 91.0 91.5 NA [3,] 127.0 136.5 149.5 149.5 146.0 140.0 130 112.5 97.5 101.0 NA [4,] 130.0 146.0 164.0 165.0 166.5 150.5 139 129.5 123.5 134.5 NA [5,] 130.0 149.0 179.0 186.0 185.0 166.0 148 140.0 141.0 149.0 NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 123.1231 126.6937 138.5534 139.6937 133.0010 130.6498 118.1412 100.8693 [2,] 130.8769 146.3063 160.4466 159.3063 158.9990 149.3502 141.8588 124.1307 [,9] [,10] [,11] [1,] 82.67653 81.38741 NA [2,] 112.32347 120.61259 NA $out [1] 146 145 $group [1] 1 1 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(120, 121.5, 127, 130, 130, 120, 124.5, 136.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/74nrk1281093208.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,] 108.10 117.00 106.8750 [2,] 121.35 126.25 122.2500 [3,] 129.90 132.50 130.0625 [4,] 143.70 142.00 145.1250 [5,] 158.00 148.50 160.5000 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 119.7060 125.3163 119.6291 [2,] 140.0940 139.6837 140.4959 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(108.1, 121.35, 129.9, 143.7, 158, 117, 126.25, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1qvbt1281093208.ps tmp/1qvbt1281093208.png",intern=TRUE)) character(0) > try(system("convert tmp/2imbw1281093208.ps tmp/2imbw1281093208.png",intern=TRUE)) character(0) > try(system("convert tmp/3imbw1281093208.ps tmp/3imbw1281093208.png",intern=TRUE)) character(0) > try(system("convert tmp/4imbw1281093208.ps tmp/4imbw1281093208.png",intern=TRUE)) character(0) > try(system("convert tmp/5twsz1281093208.ps tmp/5twsz1281093208.png",intern=TRUE)) character(0) > try(system("convert tmp/6twsz1281093208.ps tmp/6twsz1281093208.png",intern=TRUE)) character(0) > try(system("convert tmp/74nrk1281093208.ps tmp/74nrk1281093208.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.110 0.840 2.944