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(92.49,92.46,92.55,92.24,92.41,92.83,92.85,93.04,93.04,92.83,92.96,92.83,93.01,93.21,93.58,94.07,94.57,95.03,95.21,95.89,96.43,96.35,96.71,96.32,97.23,97.88,98.2,98.56,99.31,99.69,99.77,101.06,101.77,101.91,102.52,102.09,102.22,102.74,103.56,104.4,104.76,104.86,104.84,104.96,104.83,104.58,104.8,104.17,104.63,105.32,106.16,107.22,107.51,107.87,107.79,108.04,107.74,107.71,111.19,110.82,113.65,114.72,114.32,116.76,116.47,117.34,116.92,116.48,115.07,116.45,116.84,114.31) > 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,] 92.49 93.01 97.23 102.22 104.63 113.65 NA [2,] 92.46 93.21 97.88 102.74 105.32 114.72 NA [3,] 92.55 93.58 98.20 103.56 106.16 114.32 NA [4,] 92.24 94.07 98.56 104.40 107.22 116.76 NA [5,] 92.41 94.57 99.31 104.76 107.51 116.47 NA [6,] 92.83 95.03 99.69 104.86 107.87 117.34 NA [7,] 92.85 95.21 99.77 104.84 107.79 116.92 NA [8,] 93.04 95.89 101.06 104.96 108.04 116.48 NA [9,] 93.04 96.43 101.77 104.83 107.74 115.07 NA [10,] 92.83 96.35 101.91 104.58 107.71 116.45 NA [11,] 92.96 96.71 102.52 104.80 111.19 116.84 NA [12,] 92.83 96.32 102.09 104.17 110.82 114.31 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.03 0.20 0.65 0.52 0.69 1.07 NA [2,] 0.09 0.37 0.32 0.82 0.84 -0.40 NA [3,] -0.31 0.49 0.36 0.84 1.06 2.44 NA [4,] 0.17 0.50 0.75 0.36 0.29 -0.29 NA [5,] 0.42 0.46 0.38 0.10 0.36 0.87 NA [6,] 0.02 0.18 0.08 -0.02 -0.08 -0.42 NA [7,] 0.19 0.68 1.29 0.12 0.25 -0.44 NA [8,] 0.00 0.54 0.71 -0.13 -0.30 -1.41 NA [9,] -0.21 -0.08 0.14 -0.25 -0.03 1.38 NA [10,] 0.13 0.36 0.61 0.22 3.48 0.39 NA [11,] -0.13 -0.39 -0.43 -0.63 -0.37 -2.53 NA [12,] 0.18 0.91 0.13 0.46 2.83 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/1nk7m1489514902.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/2bvnn1489514902.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/31ray1489514902.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/4i6w51489514902.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,] 92.490 92.46 92.55 92.24 92.410 92.830 92.850 93.04 93.04 92.830 [2,] 93.010 93.21 93.58 94.07 94.570 95.030 95.210 95.89 96.43 96.350 [3,] 99.725 100.31 100.88 101.48 102.035 102.275 102.305 103.01 103.30 103.245 [4,] 104.630 105.32 106.16 107.22 107.510 107.870 107.790 108.04 107.74 107.710 [5,] 113.650 114.72 114.32 116.76 116.470 117.340 116.920 116.48 115.07 116.450 [,11] [,12] [1,] 92.96 92.83 [2,] 96.71 96.32 [3,] 103.66 103.13 [4,] 111.19 110.82 [5,] 116.84 114.31 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 92.22972 92.49866 92.76549 92.99783 93.68828 93.99279 94.19049 [2,] 107.22028 108.12134 108.99451 109.96217 110.38172 110.55721 110.41951 [,8] [,9] [,10] [,11] [,12] [1,] 95.17286 96.00468 95.91743 94.31993 93.77703 [2,] 110.84714 110.59532 110.57257 113.00007 112.48297 $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(92.49, 93.01, 99.725, 104.63, 113.65, 92.46, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5xccx1489514902.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,] -0.030 -0.400 -0.310 -0.290 0.36 -0.08 -0.44 -1.410 -0.250 0.130 -0.63 [2,] 0.200 0.090 0.360 0.170 0.36 -0.08 0.12 -0.300 -0.210 0.220 -0.63 [3,] 0.585 0.345 0.665 0.325 0.40 0.00 0.22 -0.065 -0.055 0.375 -0.41 [4,] 0.690 0.820 1.060 0.500 0.46 0.08 0.68 0.540 0.140 0.610 -0.37 [5,] 1.070 0.840 1.060 0.750 0.46 0.18 1.29 0.710 0.140 0.610 -0.13 [,12] [1,] 0.13 [2,] 0.18 [3,] 0.46 [4,] 0.91 [5,] 0.91 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.2689342 -0.1258736 0.2134774 0.1121393 0.3354968 -0.1032052 -0.1412181 [2,] 0.9010658 0.8158736 1.1165226 0.5378607 0.4645032 0.1032052 0.5812181 [,8] [,9] [,10] [,11] [,12] [1,] -0.6068271 -0.2807613 0.1234374 -0.5777084 -0.05581616 [2,] 0.4768271 0.1707613 0.6265626 -0.2422916 0.97581616 $out [1] 2.44 0.10 0.87 -0.42 1.38 3.48 -2.53 2.83 $group [1] 3 5 5 6 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.0300000000000011, 0.199999999999989, 0.584999999999994, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/61n1e1489514902.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,] 92.240 93.010 97.23 102.740 105.320 113.65 NA [2,] 92.475 93.825 98.38 103.865 106.690 114.52 NA [3,] 92.830 95.120 99.73 104.670 107.725 116.46 NA [4,] 92.905 96.335 101.84 104.835 107.955 116.80 NA [5,] 93.040 96.710 102.52 104.960 108.040 117.34 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 92.63387 93.97517 98.15187 104.2276 107.148 115.4201 NA [2,] 93.02613 96.26483 101.30813 105.1124 108.302 117.4999 NA $out [1] 102.22 104.63 111.19 110.82 $group [1] 4 5 5 5 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(92.24, 92.475, 92.83, 92.905, 93.04, 93.01, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/759sv1489514902.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,] 100.5383 99.7250 99.04625 [2,] 101.8017 101.1800 100.48812 [3,] 102.9167 102.2900 101.67875 [4,] 103.2750 103.1875 102.36125 [5,] 104.1700 103.6600 103.87750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 102.2447 101.3744 100.8244 [2,] 103.5887 103.2056 102.5331 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(100.538333333333, 101.801666666667, 102.916666666667, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1nk7m1489514902.ps tmp/1nk7m1489514902.png",intern=TRUE)) character(0) > try(system("convert tmp/2bvnn1489514902.ps tmp/2bvnn1489514902.png",intern=TRUE)) character(0) > try(system("convert tmp/31ray1489514902.ps tmp/31ray1489514902.png",intern=TRUE)) character(0) > try(system("convert tmp/4i6w51489514902.ps tmp/4i6w51489514902.png",intern=TRUE)) character(0) > try(system("convert tmp/5xccx1489514902.ps tmp/5xccx1489514902.png",intern=TRUE)) character(0) > try(system("convert tmp/61n1e1489514902.ps tmp/61n1e1489514902.png",intern=TRUE)) character(0) > try(system("convert tmp/759sv1489514902.ps tmp/759sv1489514902.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.269 0.202 3.590