R version 3.2.4 (2016-03-10) -- "Very Secure Dishes" Copyright (C) 2016 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(38552,33618,31499,33892,37134,32710,32520,33419,35003,34417,32359,35703,38632,33577,33277,35001,38296,34179,32791,35261,36789,35036,33004,35548,38485,34675,33081,36114,37524,34600,33795,36017,37009,32877,32505,34162,38591,33550,30753,33508,36327,33230,32971,32844,35124,32243,30840,34815,36308,33138,31425,34265,37612,31846,31065,33712,36031,32909,32204,34914,34888,33242,32316,35295,37800,34540,32614,35859,39866,34609,32375,34395,35348,33221,33892,36762) > 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] 76 > (np <- floor(n / par1)) [1] 6 > 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] 7 7 7 7 6 6 6 6 6 6 6 6 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 38552 38632 38485 38591 36308 34888 35348 [2,] 33618 33577 34675 33550 33138 33242 33221 [3,] 31499 33277 33081 30753 31425 32316 33892 [4,] 33892 35001 36114 33508 34265 35295 36762 [5,] 37134 38296 37524 36327 37612 37800 NA [6,] 32710 34179 34600 33230 31846 34540 NA [7,] 32520 32791 33795 32971 31065 32614 NA [8,] 33419 35261 36017 32844 33712 35859 NA [9,] 35003 36789 37009 35124 36031 39866 NA [10,] 34417 35036 32877 32243 32909 34609 NA [11,] 32359 33004 32505 30840 32204 32375 NA [12,] 35703 35548 34162 34815 34914 34395 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -4934 -5055 -3810 -5041 -3170 -1646 -2127 [2,] -2119 -300 -1594 -2797 -1713 -926 671 [3,] 2393 1724 3033 2755 2840 2979 2870 [4,] 3242 3295 1410 2819 3347 2505 NA [5,] -4424 -4117 -2924 -3097 -5766 -3260 NA [6,] -190 -1388 -805 -259 -781 -1926 NA [7,] 899 2470 2222 -127 2647 3245 NA [8,] 1584 1528 992 2280 2319 4007 NA [9,] -586 -1753 -4132 -2881 -3122 -5257 NA [10,] -2058 -2032 -372 -1403 -705 -2234 NA [11,] 3344 2544 1657 3975 2710 2020 NA [12,] 2929 2937 4429 1493 -26 953 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/1a8g51458059797.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/2zwcb1458059797.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/3mxf41458059797.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/414ea1458059797.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,] 34888.0 33138.0 30753 33508.0 36327 31846.0 32520.0 32844.0 35003 32243 [2,] 35828.0 33231.5 31462 34078.5 37134 32710.0 32520.0 33419.0 35124 32877 [3,] 38485.0 33550.0 32316 35001.0 37568 33704.5 32702.5 34486.5 36410 33663 [4,] 38571.5 33597.5 33179 35704.5 37800 34540.0 32971.0 35859.0 37009 34609 [5,] 38632.0 33618.0 33892 36762.0 38296 34600.0 32971.0 36017.0 37009 35036 [,11] [,12] [1,] 32204 34162.0 [2,] 32204 34395.0 [3,] 32367 34864.5 [4,] 32505 35548.0 [5,] 32505 35703.0 $n [1] 7 7 7 7 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 36846.63 33331.43 31290.64 34029.98 37138.41 32524.09 32411.59 32912.62 [2,] 40123.37 33768.57 33341.36 35972.02 37997.59 34884.91 32993.41 36060.38 [,9] [,10] [,11] [,12] [1,] 35194.11 32545.8 32172.85 34120.78 [2,] 37625.89 34780.2 32561.15 35608.22 $out [1] 34675 33795 31065 39866 33004 30840 $group [1] 2 7 7 9 11 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(34888, 35828, 38485, 38571.5, 38632, 33138, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/517ty1458059797.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] [,9] [,10] [,11] [1,] -5055.0 -2797 2393.0 1410.0 -5766.0 -1926 -127 992 -5257.0 -2234.0 1657 [2,] -4987.5 -1916 2574.0 2505.0 -4424.0 -1388 899 1528 -4132.0 -2058.0 2020 [3,] -3810.0 -1594 2840.0 3030.5 -3688.5 -793 2346 1932 -3001.5 -1717.5 2627 [4,] -2648.5 -613 2924.5 3295.0 -3097.0 -259 2647 2319 -1753.0 -705.0 3344 [5,] -1646.0 671 3033.0 3347.0 -2924.0 -190 3245 2319 -586.0 -372.0 3975 [,12] [1,] -26 [2,] 953 [3,] 2211 [4,] 2937 [5,] 4429 $n [1] 7 7 7 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -5206.813 -2372.1306 2630.687 2520.924 -4544.458 -1521.24147 1218.484 [2,] -2413.187 -815.8694 3049.313 3540.076 -2832.542 -64.75853 3473.516 [,8] [,9] [,10] [,11] [,12] [1,] 1421.779 -4536.032 -2590.2287 1772.977 931.2559 [2,] 2442.221 -1466.968 -844.7713 3481.023 3490.7441 $out [1] 1724 4007 $group [1] 3 8 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-5055, -4987.5, -3810, -2648.5, -1646, -2797, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6xjjb1458059797.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] [,7] [1,] 31499 32791.0 32505.0 30753.0 31065.0 32316.0 33221.0 [2,] 32615 33427.0 33438.0 32543.5 32025.0 32928.0 33556.5 [3,] 33755 35018.5 34637.5 33369.0 33425.0 34574.5 34620.0 [4,] 35353 36168.5 36561.5 34969.5 35472.5 35577.0 36055.0 [5,] 38552 38632.0 38485.0 38591.0 37612.0 37800.0 36762.0 $n [1] 12 12 12 12 12 12 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 32506.18 33768.08 33212.85 32262.49 31852.57 33366.27 32646.19 [2,] 35003.82 36268.92 36062.15 34475.51 34997.43 35782.73 36593.82 $out [1] 39866 $group [1] 6 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(31499, 32615, 33755, 35353, 38552, 32791, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/76fc31458059797.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,] 32214.50 32316.00 32320.50 [2,] 33071.75 33126.25 33074.62 [3,] 34100.25 34095.50 34161.94 [4,] 35806.86 35705.50 35548.56 [5,] 37448.83 38485.00 37492.25 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 32852.75 32919.09 33033.56 [2,] 35347.75 35271.91 35290.32 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(32214.5, 33071.75, 34100.25, 35806.8571428571, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1a8g51458059797.ps tmp/1a8g51458059797.png",intern=TRUE)) character(0) > try(system("convert tmp/2zwcb1458059797.ps tmp/2zwcb1458059797.png",intern=TRUE)) character(0) > try(system("convert tmp/3mxf41458059797.ps tmp/3mxf41458059797.png",intern=TRUE)) character(0) > try(system("convert tmp/414ea1458059797.ps tmp/414ea1458059797.png",intern=TRUE)) character(0) > try(system("convert tmp/517ty1458059797.ps tmp/517ty1458059797.png",intern=TRUE)) character(0) > try(system("convert tmp/6xjjb1458059797.ps tmp/6xjjb1458059797.png",intern=TRUE)) character(0) > try(system("convert tmp/76fc31458059797.ps tmp/76fc31458059797.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.642 0.469 3.144