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(93.09,93.02,93.23,92.7,92.68,93.11,93.02,93.29,93.2,92.86,93.04,92.8,93.11,93.42,94.01,94.47,94.07,94.33,94.43,95.37,95.83,95.46,96,95.35,96.85,97.84,98.38,98.9,99.51,99.95,99.93,101.4,101.7,101.65,102.33,101.56,101.91,102.29,102.44,102.84,103.2,103.23,103.16,103.31,103.04,102.57,102.88,101.91,102.59,103.27,103.59,104.35,104.6,105.08,104.93,105.15,104.67,104.55,109.82,109.25) > par1 = '60' > par1 <- '60' > #'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] 60 > (np <- floor(n / par1)) [1] 1 > 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] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 [39] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 > arr [,1] [,2] [1,] 93.09 NA [2,] 93.02 NA [3,] 93.23 NA [4,] 92.70 NA [5,] 92.68 NA [6,] 93.11 NA [7,] 93.02 NA [8,] 93.29 NA [9,] 93.20 NA [10,] 92.86 NA [11,] 93.04 NA [12,] 92.80 NA [13,] 93.11 NA [14,] 93.42 NA [15,] 94.01 NA [16,] 94.47 NA [17,] 94.07 NA [18,] 94.33 NA [19,] 94.43 NA [20,] 95.37 NA [21,] 95.83 NA [22,] 95.46 NA [23,] 96.00 NA [24,] 95.35 NA [25,] 96.85 NA [26,] 97.84 NA [27,] 98.38 NA [28,] 98.90 NA [29,] 99.51 NA [30,] 99.95 NA [31,] 99.93 NA [32,] 101.40 NA [33,] 101.70 NA [34,] 101.65 NA [35,] 102.33 NA [36,] 101.56 NA [37,] 101.91 NA [38,] 102.29 NA [39,] 102.44 NA [40,] 102.84 NA [41,] 103.20 NA [42,] 103.23 NA [43,] 103.16 NA [44,] 103.31 NA [45,] 103.04 NA [46,] 102.57 NA [47,] 102.88 NA [48,] 101.91 NA [49,] 102.59 NA [50,] 103.27 NA [51,] 103.59 NA [52,] 104.35 NA [53,] 104.60 NA [54,] 105.08 NA [55,] 104.93 NA [56,] 105.15 NA [57,] 104.67 NA [58,] 104.55 NA [59,] 109.82 NA [60,] 109.25 NA > darr [,1] [,2] [1,] -0.07 NA [2,] 0.21 NA [3,] -0.53 NA [4,] -0.02 NA [5,] 0.43 NA [6,] -0.09 NA [7,] 0.27 NA [8,] -0.09 NA [9,] -0.34 NA [10,] 0.18 NA [11,] -0.24 NA [12,] 0.31 NA [13,] 0.31 NA [14,] 0.59 NA [15,] 0.46 NA [16,] -0.40 NA [17,] 0.26 NA [18,] 0.10 NA [19,] 0.94 NA [20,] 0.46 NA [21,] -0.37 NA [22,] 0.54 NA [23,] -0.65 NA [24,] 1.50 NA [25,] 0.99 NA [26,] 0.54 NA [27,] 0.52 NA [28,] 0.61 NA [29,] 0.44 NA [30,] -0.02 NA [31,] 1.47 NA [32,] 0.30 NA [33,] -0.05 NA [34,] 0.68 NA [35,] -0.77 NA [36,] 0.35 NA [37,] 0.38 NA [38,] 0.15 NA [39,] 0.40 NA [40,] 0.36 NA [41,] 0.03 NA [42,] -0.07 NA [43,] 0.15 NA [44,] -0.27 NA [45,] -0.47 NA [46,] 0.31 NA [47,] -0.97 NA [48,] 0.68 NA [49,] 0.68 NA [50,] 0.32 NA [51,] 0.76 NA [52,] 0.25 NA [53,] 0.48 NA [54,] -0.15 NA [55,] 0.22 NA [56,] -0.48 NA [57,] -0.12 NA [58,] 5.27 NA [59,] -0.57 NA [60,] 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/1aqo01489521741.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/2w4881489521741.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/3fmj91489521741.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/4gnzx1489521741.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] [,11] [,12] [1,] 93.09 93.02 93.23 92.7 92.68 93.11 93.02 93.29 93.2 92.86 93.04 92.8 [2,] 93.09 93.02 93.23 92.7 92.68 93.11 93.02 93.29 93.2 92.86 93.04 92.8 [3,] 93.09 93.02 93.23 92.7 92.68 93.11 93.02 93.29 93.2 92.86 93.04 92.8 [4,] 93.09 93.02 93.23 92.7 92.68 93.11 93.02 93.29 93.2 92.86 93.04 92.8 [5,] 93.09 93.02 93.23 92.7 92.68 93.11 93.02 93.29 93.2 92.86 93.04 92.8 [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [1,] 93.11 93.42 94.01 94.47 94.07 94.33 94.43 95.37 95.83 95.46 96 95.35 [2,] 93.11 93.42 94.01 94.47 94.07 94.33 94.43 95.37 95.83 95.46 96 95.35 [3,] 93.11 93.42 94.01 94.47 94.07 94.33 94.43 95.37 95.83 95.46 96 95.35 [4,] 93.11 93.42 94.01 94.47 94.07 94.33 94.43 95.37 95.83 95.46 96 95.35 [5,] 93.11 93.42 94.01 94.47 94.07 94.33 94.43 95.37 95.83 95.46 96 95.35 [,25] [,26] [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36] [1,] 96.85 97.84 98.38 98.9 99.51 99.95 99.93 101.4 101.7 101.65 102.33 101.56 [2,] 96.85 97.84 98.38 98.9 99.51 99.95 99.93 101.4 101.7 101.65 102.33 101.56 [3,] 96.85 97.84 98.38 98.9 99.51 99.95 99.93 101.4 101.7 101.65 102.33 101.56 [4,] 96.85 97.84 98.38 98.9 99.51 99.95 99.93 101.4 101.7 101.65 102.33 101.56 [5,] 96.85 97.84 98.38 98.9 99.51 99.95 99.93 101.4 101.7 101.65 102.33 101.56 [,37] [,38] [,39] [,40] [,41] [,42] [,43] [,44] [,45] [,46] [1,] 101.91 102.29 102.44 102.84 103.2 103.23 103.16 103.31 103.04 102.57 [2,] 101.91 102.29 102.44 102.84 103.2 103.23 103.16 103.31 103.04 102.57 [3,] 101.91 102.29 102.44 102.84 103.2 103.23 103.16 103.31 103.04 102.57 [4,] 101.91 102.29 102.44 102.84 103.2 103.23 103.16 103.31 103.04 102.57 [5,] 101.91 102.29 102.44 102.84 103.2 103.23 103.16 103.31 103.04 102.57 [,47] [,48] [,49] [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 102.88 101.91 102.59 103.27 103.59 104.35 104.6 105.08 104.93 105.15 [2,] 102.88 101.91 102.59 103.27 103.59 104.35 104.6 105.08 104.93 105.15 [3,] 102.88 101.91 102.59 103.27 103.59 104.35 104.6 105.08 104.93 105.15 [4,] 102.88 101.91 102.59 103.27 103.59 104.35 104.6 105.08 104.93 105.15 [5,] 102.88 101.91 102.59 103.27 103.59 104.35 104.6 105.08 104.93 105.15 [,57] [,58] [,59] [,60] [1,] 104.67 104.55 109.82 109.25 [2,] 104.67 104.55 109.82 109.25 [3,] 104.67 104.55 109.82 109.25 [4,] 104.67 104.55 109.82 109.25 [5,] 104.67 104.55 109.82 109.25 $n [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 [39] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [1,] 93.09 93.02 93.23 92.7 92.68 93.11 93.02 93.29 93.2 92.86 93.04 92.8 [2,] 93.09 93.02 93.23 92.7 92.68 93.11 93.02 93.29 93.2 92.86 93.04 92.8 [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [1,] 93.11 93.42 94.01 94.47 94.07 94.33 94.43 95.37 95.83 95.46 96 95.35 [2,] 93.11 93.42 94.01 94.47 94.07 94.33 94.43 95.37 95.83 95.46 96 95.35 [,25] [,26] [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36] [1,] 96.85 97.84 98.38 98.9 99.51 99.95 99.93 101.4 101.7 101.65 102.33 101.56 [2,] 96.85 97.84 98.38 98.9 99.51 99.95 99.93 101.4 101.7 101.65 102.33 101.56 [,37] [,38] [,39] [,40] [,41] [,42] [,43] [,44] [,45] [,46] [1,] 101.91 102.29 102.44 102.84 103.2 103.23 103.16 103.31 103.04 102.57 [2,] 101.91 102.29 102.44 102.84 103.2 103.23 103.16 103.31 103.04 102.57 [,47] [,48] [,49] [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 102.88 101.91 102.59 103.27 103.59 104.35 104.6 105.08 104.93 105.15 [2,] 102.88 101.91 102.59 103.27 103.59 104.35 104.6 105.08 104.93 105.15 [,57] [,58] [,59] [,60] [1,] 104.67 104.55 109.82 109.25 [2,] 104.67 104.55 109.82 109.25 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" [16] "16" "17" "18" "19" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "30" [31] "31" "32" "33" "34" "35" "36" "37" "38" "39" "40" "41" "42" "43" "44" "45" [46] "46" "47" "48" "49" "50" "51" "52" "53" "54" "55" "56" "57" "58" "59" "60" > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5akei1489521741.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] [,12] [,13] [1,] -0.07 0.21 -0.53 -0.02 0.43 -0.09 0.27 -0.09 -0.34 0.18 -0.24 0.31 0.31 [2,] -0.07 0.21 -0.53 -0.02 0.43 -0.09 0.27 -0.09 -0.34 0.18 -0.24 0.31 0.31 [3,] -0.07 0.21 -0.53 -0.02 0.43 -0.09 0.27 -0.09 -0.34 0.18 -0.24 0.31 0.31 [4,] -0.07 0.21 -0.53 -0.02 0.43 -0.09 0.27 -0.09 -0.34 0.18 -0.24 0.31 0.31 [5,] -0.07 0.21 -0.53 -0.02 0.43 -0.09 0.27 -0.09 -0.34 0.18 -0.24 0.31 0.31 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [1,] 0.59 0.46 -0.4 0.26 0.1 0.94 0.46 -0.37 0.54 -0.65 1.5 0.99 [2,] 0.59 0.46 -0.4 0.26 0.1 0.94 0.46 -0.37 0.54 -0.65 1.5 0.99 [3,] 0.59 0.46 -0.4 0.26 0.1 0.94 0.46 -0.37 0.54 -0.65 1.5 0.99 [4,] 0.59 0.46 -0.4 0.26 0.1 0.94 0.46 -0.37 0.54 -0.65 1.5 0.99 [5,] 0.59 0.46 -0.4 0.26 0.1 0.94 0.46 -0.37 0.54 -0.65 1.5 0.99 [,26] [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36] [,37] [1,] 0.54 0.52 0.61 0.44 -0.02 1.47 0.3 -0.05 0.68 -0.77 0.35 0.38 [2,] 0.54 0.52 0.61 0.44 -0.02 1.47 0.3 -0.05 0.68 -0.77 0.35 0.38 [3,] 0.54 0.52 0.61 0.44 -0.02 1.47 0.3 -0.05 0.68 -0.77 0.35 0.38 [4,] 0.54 0.52 0.61 0.44 -0.02 1.47 0.3 -0.05 0.68 -0.77 0.35 0.38 [5,] 0.54 0.52 0.61 0.44 -0.02 1.47 0.3 -0.05 0.68 -0.77 0.35 0.38 [,38] [,39] [,40] [,41] [,42] [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 0.15 0.4 0.36 0.03 -0.07 0.15 -0.27 -0.47 0.31 -0.97 0.68 0.68 [2,] 0.15 0.4 0.36 0.03 -0.07 0.15 -0.27 -0.47 0.31 -0.97 0.68 0.68 [3,] 0.15 0.4 0.36 0.03 -0.07 0.15 -0.27 -0.47 0.31 -0.97 0.68 0.68 [4,] 0.15 0.4 0.36 0.03 -0.07 0.15 -0.27 -0.47 0.31 -0.97 0.68 0.68 [5,] 0.15 0.4 0.36 0.03 -0.07 0.15 -0.27 -0.47 0.31 -0.97 0.68 0.68 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [,57] [,58] [,59] [,60] [1,] 0.32 0.76 0.25 0.48 -0.15 0.22 -0.48 -0.12 5.27 -0.57 NA [2,] 0.32 0.76 0.25 0.48 -0.15 0.22 -0.48 -0.12 5.27 -0.57 NA [3,] 0.32 0.76 0.25 0.48 -0.15 0.22 -0.48 -0.12 5.27 -0.57 NA [4,] 0.32 0.76 0.25 0.48 -0.15 0.22 -0.48 -0.12 5.27 -0.57 NA [5,] 0.32 0.76 0.25 0.48 -0.15 0.22 -0.48 -0.12 5.27 -0.57 NA $n [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 [39] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] -0.07 0.21 -0.53 -0.02 0.43 -0.09 0.27 -0.09 -0.34 0.18 -0.24 0.31 0.31 [2,] -0.07 0.21 -0.53 -0.02 0.43 -0.09 0.27 -0.09 -0.34 0.18 -0.24 0.31 0.31 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [1,] 0.59 0.46 -0.4 0.26 0.1 0.94 0.46 -0.37 0.54 -0.65 1.5 0.99 [2,] 0.59 0.46 -0.4 0.26 0.1 0.94 0.46 -0.37 0.54 -0.65 1.5 0.99 [,26] [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36] [,37] [1,] 0.54 0.52 0.61 0.44 -0.02 1.47 0.3 -0.05 0.68 -0.77 0.35 0.38 [2,] 0.54 0.52 0.61 0.44 -0.02 1.47 0.3 -0.05 0.68 -0.77 0.35 0.38 [,38] [,39] [,40] [,41] [,42] [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 0.15 0.4 0.36 0.03 -0.07 0.15 -0.27 -0.47 0.31 -0.97 0.68 0.68 [2,] 0.15 0.4 0.36 0.03 -0.07 0.15 -0.27 -0.47 0.31 -0.97 0.68 0.68 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [,57] [,58] [,59] [,60] [1,] 0.32 0.76 0.25 0.48 -0.15 0.22 -0.48 -0.12 5.27 -0.57 NA [2,] 0.32 0.76 0.25 0.48 -0.15 0.22 -0.48 -0.12 5.27 -0.57 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" [16] "16" "17" "18" "19" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "30" [31] "31" "32" "33" "34" "35" "36" "37" "38" "39" "40" "41" "42" "43" "44" "45" [46] "46" "47" "48" "49" "50" "51" "52" "53" "54" "55" "56" "57" "58" "59" "60" > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6xoou1489521741.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] [1,] 92.68 NA [2,] 94.04 NA [3,] 99.94 NA [4,] 103.10 NA [5,] 109.82 NA $n [1] 60 0 $conf [,1] [,2] [1,] 98.09197 NA [2,] 101.78803 NA $out numeric(0) $group numeric(0) $names [1] "1" NA > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/79gzb1489521741.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,] 92.68 92.68 92.68 [2,] 94.04 94.04 94.04 [3,] 99.94 99.94 99.94 [4,] 103.10 103.10 103.10 [5,] 109.82 109.82 109.82 $n [1] 60 60 60 $conf [,1] [,2] [,3] [1,] 98.09197 98.09197 98.09197 [2,] 101.78803 101.78803 101.78803 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" > dev.off() null device 1 > > try(system("convert tmp/1aqo01489521741.ps tmp/1aqo01489521741.png",intern=TRUE)) character(0) > try(system("convert tmp/2w4881489521741.ps tmp/2w4881489521741.png",intern=TRUE)) character(0) > try(system("convert tmp/3fmj91489521741.ps tmp/3fmj91489521741.png",intern=TRUE)) character(0) > try(system("convert tmp/4gnzx1489521741.ps tmp/4gnzx1489521741.png",intern=TRUE)) character(0) > try(system("convert tmp/5akei1489521741.ps tmp/5akei1489521741.png",intern=TRUE)) character(0) > try(system("convert tmp/6xoou1489521741.ps tmp/6xoou1489521741.png",intern=TRUE)) character(0) > try(system("convert tmp/79gzb1489521741.ps tmp/79gzb1489521741.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.422 0.198 3.837