R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch" 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(45570,45118,41921,40167,37315,39206,57075,58664,51705,45527,41057,40867,41484,39738,37254,35177,32846,34079,51287,52800,48443,42223,38796,38952,42343,42023,39340,37149,35431,36537,49626,58677,56009,50069,46470,45603,46729,46989,44666,42920,40125,40941,57748,61246,59809,52682,48394,47436,49750,48172,44960,41831,38672,39704,56207,59254,57374,51309,47083,45092,46353,45348,42867,39980,36790,37504,53331,55997,54764,48590,45565,44959) > 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] 72 > (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] 6 6 6 6 6 6 6 6 6 6 6 6 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 45570 41484 42343 46729 49750 46353 NA [2,] 45118 39738 42023 46989 48172 45348 NA [3,] 41921 37254 39340 44666 44960 42867 NA [4,] 40167 35177 37149 42920 41831 39980 NA [5,] 37315 32846 35431 40125 38672 36790 NA [6,] 39206 34079 36537 40941 39704 37504 NA [7,] 57075 51287 49626 57748 56207 53331 NA [8,] 58664 52800 58677 61246 59254 55997 NA [9,] 51705 48443 56009 59809 57374 54764 NA [10,] 45527 42223 50069 52682 51309 48590 NA [11,] 41057 38796 46470 48394 47083 45565 NA [12,] 40867 38952 45603 47436 45092 44959 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -452 -1746 -320 260 -1578 -1005 NA [2,] -3197 -2484 -2683 -2323 -3212 -2481 NA [3,] -1754 -2077 -2191 -1746 -3129 -2887 NA [4,] -2852 -2331 -1718 -2795 -3159 -3190 NA [5,] 1891 1233 1106 816 1032 714 NA [6,] 17869 17208 13089 16807 16503 15827 NA [7,] 1589 1513 9051 3498 3047 2666 NA [8,] -6959 -4357 -2668 -1437 -1880 -1233 NA [9,] -6178 -6220 -5940 -7127 -6065 -6174 NA [10,] -4470 -3427 -3599 -4288 -4226 -3025 NA [11,] -190 156 -867 -958 -1991 -606 NA [12,] 617 3391 1126 2314 1261 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/wessaorg/rcomp/tmp/11ckg1489514348.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/2348u1489514348.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/3aufi1489514348.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/42qcr1489514348.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,] 41484.0 39738 37254 35177.0 32846.0 34079 49626 52800.0 48443.0 42223.0 [2,] 42343.0 42023 39340 37149.0 35431.0 36537 51287 55997.0 51705.0 45527.0 [3,] 45961.5 45233 42394 40073.5 37052.5 38355 54769 58670.5 55386.5 49329.5 [4,] 46729.0 46989 44666 41831.0 38672.0 39704 57075 59254.0 57374.0 51309.0 [5,] 49750.0 48172 44960 42920.0 40125.0 40941 57748 61246.0 59809.0 52682.0 [,11] [,12] [1,] 38796.0 38952.0 [2,] 41057.0 40867.0 [3,] 46017.5 45025.5 [4,] 47083.0 45603.0 [5,] 48394.0 47436.0 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 43132.39 42029.77 38958.56 37053.46 34961.95 36312.18 51035.55 56569.63 [2,] 48790.61 48436.23 45829.44 43093.54 39143.05 40397.82 58502.45 60771.37 [,9] [,10] [,11] [,12] [1,] 51729.81 45599.92 42130.54 41970.63 [2,] 59043.19 53059.08 49904.46 48080.37 $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(41484, 42343, 45961.5, 46729, 49750, 39738, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/57yjg1489514348.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] [1,] -1746.0 -3212.0 -3129 -3190.0 714 15827 1513.0 -6959 -6220 -4470.0 [2,] -1578.0 -3197.0 -2887 -3159.0 816 15827 1589.0 -4357 -6220 -4288.0 [3,] -728.5 -2583.5 -2134 -2823.5 1069 16655 2856.5 -2274 -6176 -3912.5 [4,] -320.0 -2481.0 -1754 -2331.0 1233 17208 3498.0 -1437 -6065 -3427.0 [5,] 260.0 -2323.0 -1746 -1718.0 1233 17869 3498.0 -1233 -5940 -3025.0 [,11] [,12] [1,] -1991.0 617 [2,] -958.0 1126 [3,] -736.5 1261 [4,] -190.0 2314 [5,] 156.0 3391 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -1539.95063 -3045.343 -2864.822 -3357.587 800.0215 15764.21 1625.133 [2,] 82.95063 -2121.657 -1403.178 -2289.413 1337.9785 17545.79 4087.867 [,8] [,9] [,10] [,11] [,12] [1,] -4157.4943 -6275.98 -4467.873 -1231.8848 421.5622 [2,] -390.5057 -6076.02 -3357.127 -241.1152 2100.4378 $out [1] 1891 13089 9051 -7127 $group [1] 5 6 7 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-1746, -1578, -728.5, -320, 260, -3212, -3197, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6c10x1489514348.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,] 37315.0 32846.0 35431.0 40125.0 38672.0 36790.0 NA [2,] 40517.0 36215.5 38244.5 43793.0 43395.5 41423.5 NA [3,] 43519.5 39345.0 43973.0 47212.5 47627.5 45456.5 NA [4,] 48637.5 45333.0 49847.5 55215.0 53758.0 50960.5 NA [5,] 58664.0 52800.0 58677.0 61246.0 59254.0 55997.0 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 39815.69 35186.45 38680.79 42002.85 42901.09 41106.61 NA [2,] 47223.31 43503.55 49265.21 52422.15 52353.91 49806.39 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(37315, 40517, 43519.5, 48637.5, 58664, 32846, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7b9bx1489514348.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,] 36863.17 37052.50 37051.75 [2,] 40686.00 41233.75 40868.31 [3,] 44562.75 45597.25 44622.31 [4,] 51306.17 52049.25 51486.94 [5,] 57773.00 58670.50 57886.75 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 39718.82 40664.23 39779.09 [2,] 49406.68 50530.27 49465.54 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(36863.1666666667, 40686, 44562.75, 51306.1666666667, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/11ckg1489514348.ps tmp/11ckg1489514348.png",intern=TRUE)) character(0) > try(system("convert tmp/2348u1489514348.ps tmp/2348u1489514348.png",intern=TRUE)) character(0) > try(system("convert tmp/3aufi1489514348.ps tmp/3aufi1489514348.png",intern=TRUE)) character(0) > try(system("convert tmp/42qcr1489514348.ps tmp/42qcr1489514348.png",intern=TRUE)) character(0) > try(system("convert tmp/57yjg1489514348.ps tmp/57yjg1489514348.png",intern=TRUE)) character(0) > try(system("convert tmp/6c10x1489514348.ps tmp/6c10x1489514348.png",intern=TRUE)) character(0) > try(system("convert tmp/7b9bx1489514348.ps tmp/7b9bx1489514348.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.282 0.219 3.682