R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree" Copyright (C) 2015 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) 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(1.1216,1.0569,1.0486,1.038,0.9865,0.9332,0.9052,0.8683,0.9232,0.8725,0.8903,0.8959,0.8766,0.9188,0.9838,0.9994,1.0731,1.1372,1.1248,1.189,1.2497,1.2046,1.222,1.2977,1.3113,1.2594,1.2199,1.1884,1.2023,1.2582,1.2743,1.2887,1.3106,1.3481,1.3738,1.4486,1.4976,1.5622,1.505,1.318,1.3029,1.3632,1.4303,1.4779,1.3829,1.2708,1.291,1.3583,1.368,1.4391,1.4127,1.3482,1.3108,1.2814,1.2502,1.2967,1.3206,1.3062,1.3242,1.361,1.3696,1.3711,1.3256,1.2498,1.1261,1.1053,1.1117,1.0953) > par1 = '12' > par1 <- '12' > #'GNU S' R Code compiled by R2WASP v. 1.2.327 (Mon, 30 Nov 2015 07:01:18 +0000) > #Author: root > #To cite this work: Wessa P., (2015), Mean Plot (v1.0.5) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_meanplot.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > # > par1 <- as.numeric(par1) > x <- na.omit(x) > (n <- length(x)) [1] 68 > (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] 6 6 6 6 6 6 6 6 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1.1216 0.8766 1.3113 1.4976 1.3680 1.3696 [2,] 1.0569 0.9188 1.2594 1.5622 1.4391 1.3711 [3,] 1.0486 0.9838 1.2199 1.5050 1.4127 1.3256 [4,] 1.0380 0.9994 1.1884 1.3180 1.3482 1.2498 [5,] 0.9865 1.0731 1.2023 1.3029 1.3108 1.1261 [6,] 0.9332 1.1372 1.2582 1.3632 1.2814 1.1053 [7,] 0.9052 1.1248 1.2743 1.4303 1.2502 1.1117 [8,] 0.8683 1.1890 1.2887 1.4779 1.2967 1.0953 [9,] 0.9232 1.2497 1.3106 1.3829 1.3206 NA [10,] 0.8725 1.2046 1.3481 1.2708 1.3062 NA [11,] 0.8903 1.2220 1.3738 1.2910 1.3242 NA [12,] 0.8959 1.2977 1.4486 1.3583 1.3610 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.0647 0.0422 -0.0519 0.0646 0.0711 0.0015 [2,] -0.0083 0.0650 -0.0395 -0.0572 -0.0264 -0.0455 [3,] -0.0106 0.0156 -0.0315 -0.1870 -0.0645 -0.0758 [4,] -0.0515 0.0737 0.0139 -0.0151 -0.0374 -0.1237 [5,] -0.0533 0.0641 0.0559 0.0603 -0.0294 -0.0208 [6,] -0.0280 -0.0124 0.0161 0.0671 -0.0312 0.0064 [7,] -0.0369 0.0642 0.0144 0.0476 0.0465 -0.0164 [8,] 0.0549 0.0607 0.0219 -0.0950 0.0239 NA [9,] -0.0507 -0.0451 0.0375 -0.1121 -0.0144 NA [10,] 0.0178 0.0174 0.0257 0.0202 0.0180 NA [11,] 0.0056 0.0757 0.0748 0.0673 0.0368 NA [12,] -0.0193 0.0136 0.0490 0.0097 0.0086 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/wessaorg/rcomp/tmp/1fz0d1457705217.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/2w0kc1457705217.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/3rbox1457705217.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/4crh31457705217.ps",horizontal=F,onefile=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] [1,] 0.87660 0.91880 0.98380 0.9994 0.9865 0.9332 0.9052 0.86830 1.2497 1.2046 [2,] 1.12160 1.05690 1.04860 1.0380 1.0731 1.1053 1.1117 1.09530 1.2497 1.2046 [3,] 1.33965 1.31525 1.27275 1.2191 1.1642 1.1977 1.1875 1.23885 1.3106 1.2708 [4,] 1.36960 1.43910 1.41270 1.3180 1.3029 1.2814 1.2743 1.29670 1.3206 1.3062 [5,] 1.49760 1.56220 1.50500 1.3482 1.3108 1.3632 1.4303 1.47790 1.3829 1.3481 [,11] [,12] [1,] 1.2220 1.2977 [2,] 1.2220 1.2977 [3,] 1.2910 1.3583 [4,] 1.3242 1.3610 [5,] 1.3738 1.4486 $n [1] 6 6 6 6 6 6 6 6 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 1.179682 1.068719 1.037894 1.038491 1.015972 1.08411 1.082618 1.10894 [2,] 1.499618 1.561781 1.507606 1.399709 1.312428 1.31129 1.292382 1.36876 [,9] [,10] [,11] [,12] [1,] 1.260502 1.19901 1.218786 1.313572 [2,] 1.360698 1.34259 1.363214 1.403028 $out [1] 0.9232 0.8725 0.8903 0.8959 $group [1] 9 10 11 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0.8766, 1.1216, 1.33965, 1.3696, 1.4976, 0.9188, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5tvzl1457705217.ps",horizontal=F,onefile=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] [1,] -0.06470 -0.05720 -0.0758 -0.12370 -0.05330 -0.0312 -0.03690 0.0219 [2,] -0.05190 -0.04550 -0.0758 -0.05150 -0.02940 -0.0280 -0.01640 0.0219 [3,] 0.02185 -0.03295 -0.0480 -0.02625 0.01755 -0.0030 0.03045 0.0239 [4,] 0.06460 -0.00830 -0.0106 0.01390 0.06030 0.0161 0.04760 0.0549 [5,] 0.07110 -0.00830 0.0156 0.07370 0.06410 0.0671 0.06420 0.0607 [,9] [,10] [,11] [,12] [1,] -0.0507 0.0174 0.0056 0.0086 [2,] -0.0507 0.0178 0.0368 0.0086 [3,] -0.0451 0.0180 0.0673 0.0097 [4,] -0.0144 0.0202 0.0748 0.0136 [5,] 0.0375 0.0202 0.0757 0.0136 $n [1] 6 6 6 6 6 6 6 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.05329626 -0.056945202 -0.090056106 -0.06843511 -0.0403094 -0.03144592 [2,] 0.09699626 -0.008954798 -0.005943894 0.01593511 0.0754094 0.02544592 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.01083207 0.0005822831 -0.07074949 0.01630417 0.0404493 0.006167013 [2,] 0.07173207 0.0472177169 -0.01945051 0.01969583 0.0941507 0.013232987 $out [1] 0.0650 -0.1870 -0.0950 -0.1121 0.0257 -0.0193 0.0490 $group [1] 2 3 8 9 10 12 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-0.0647, -0.0518999999999998, 0.02185, 0.0646, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6ifwq1457705217.ps",horizontal=F,onefile=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,] 0.8683 0.8766 1.18840 1.27080 1.25020 1.09530 [2,] 0.8931 0.9916 1.23905 1.31045 1.30145 1.10850 [3,] 0.9282 1.1310 1.28150 1.37305 1.32240 1.18795 [4,] 1.0433 1.2133 1.32970 1.48775 1.36450 1.34760 [5,] 1.1216 1.2977 1.44860 1.56220 1.43910 1.37110 $n [1] 12 12 12 12 12 8 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.8596928 1.029881 1.240154 1.292182 1.293642 1.054385 [2,] 0.9967072 1.232119 1.322846 1.453918 1.351158 1.321515 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(0.8683, 0.8931, 0.9282, 1.0433, 1.1216, 0.8766, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7hr691457705217.ps",horizontal=F,onefile=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,] 1.166950 1.164200 1.182050 [2,] 1.186525 1.208400 1.193031 [3,] 1.211455 1.271775 1.248287 [4,] 1.253358 1.312925 1.271106 [5,] 1.272300 1.358300 1.329350 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 1.180972 1.22410 1.212677 [2,] 1.241938 1.31945 1.283898 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(1.16695, 1.186525, 1.211455, 1.25335833333333, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1fz0d1457705217.ps tmp/1fz0d1457705217.png",intern=TRUE)) character(0) > try(system("convert tmp/2w0kc1457705217.ps tmp/2w0kc1457705217.png",intern=TRUE)) character(0) > try(system("convert tmp/3rbox1457705217.ps tmp/3rbox1457705217.png",intern=TRUE)) character(0) > try(system("convert tmp/4crh31457705217.ps tmp/4crh31457705217.png",intern=TRUE)) character(0) > try(system("convert tmp/5tvzl1457705217.ps tmp/5tvzl1457705217.png",intern=TRUE)) character(0) > try(system("convert tmp/6ifwq1457705217.ps tmp/6ifwq1457705217.png",intern=TRUE)) character(0) > try(system("convert tmp/7hr691457705217.ps tmp/7hr691457705217.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.405 0.452 2.876