R version 3.3.1 (2016-06-21) -- "Bug in Your Hair" 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.1,93.91,95.46,94.54,95.63,96.32,96.42,96.95,96.52,96.82,96.4,96.69,96.72,98.57,98.6,96.44,97.09,97.36,97.74,96.78,96.45,97.66,98.69,98.21,97.33,99.05,100.09,98.1,97.68,97.44,99.19,98.32,97.83,97.71,97.51,97.62,96.49,98.92,99.69,97.06,97.63,97.97,99.01,97.89,97.23,96.93,96.97,97.68,97.73,99.03,100.35,99.38,99.3,99.77,101.11,101.15,101.59,100.95,99.23,100.41) > 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,] 92.10 NA [2,] 93.91 NA [3,] 95.46 NA [4,] 94.54 NA [5,] 95.63 NA [6,] 96.32 NA [7,] 96.42 NA [8,] 96.95 NA [9,] 96.52 NA [10,] 96.82 NA [11,] 96.40 NA [12,] 96.69 NA [13,] 96.72 NA [14,] 98.57 NA [15,] 98.60 NA [16,] 96.44 NA [17,] 97.09 NA [18,] 97.36 NA [19,] 97.74 NA [20,] 96.78 NA [21,] 96.45 NA [22,] 97.66 NA [23,] 98.69 NA [24,] 98.21 NA [25,] 97.33 NA [26,] 99.05 NA [27,] 100.09 NA [28,] 98.10 NA [29,] 97.68 NA [30,] 97.44 NA [31,] 99.19 NA [32,] 98.32 NA [33,] 97.83 NA [34,] 97.71 NA [35,] 97.51 NA [36,] 97.62 NA [37,] 96.49 NA [38,] 98.92 NA [39,] 99.69 NA [40,] 97.06 NA [41,] 97.63 NA [42,] 97.97 NA [43,] 99.01 NA [44,] 97.89 NA [45,] 97.23 NA [46,] 96.93 NA [47,] 96.97 NA [48,] 97.68 NA [49,] 97.73 NA [50,] 99.03 NA [51,] 100.35 NA [52,] 99.38 NA [53,] 99.30 NA [54,] 99.77 NA [55,] 101.11 NA [56,] 101.15 NA [57,] 101.59 NA [58,] 100.95 NA [59,] 99.23 NA [60,] 100.41 NA > darr [,1] [,2] [1,] 1.81 NA [2,] 1.55 NA [3,] -0.92 NA [4,] 1.09 NA [5,] 0.69 NA [6,] 0.10 NA [7,] 0.53 NA [8,] -0.43 NA [9,] 0.30 NA [10,] -0.42 NA [11,] 0.29 NA [12,] 0.03 NA [13,] 1.85 NA [14,] 0.03 NA [15,] -2.16 NA [16,] 0.65 NA [17,] 0.27 NA [18,] 0.38 NA [19,] -0.96 NA [20,] -0.33 NA [21,] 1.21 NA [22,] 1.03 NA [23,] -0.48 NA [24,] -0.88 NA [25,] 1.72 NA [26,] 1.04 NA [27,] -1.99 NA [28,] -0.42 NA [29,] -0.24 NA [30,] 1.75 NA [31,] -0.87 NA [32,] -0.49 NA [33,] -0.12 NA [34,] -0.20 NA [35,] 0.11 NA [36,] -1.13 NA [37,] 2.43 NA [38,] 0.77 NA [39,] -2.63 NA [40,] 0.57 NA [41,] 0.34 NA [42,] 1.04 NA [43,] -1.12 NA [44,] -0.66 NA [45,] -0.30 NA [46,] 0.04 NA [47,] 0.71 NA [48,] 0.05 NA [49,] 1.30 NA [50,] 1.32 NA [51,] -0.97 NA [52,] -0.08 NA [53,] 0.47 NA [54,] 1.34 NA [55,] 0.04 NA [56,] 0.44 NA [57,] -0.64 NA [58,] -1.72 NA [59,] 1.18 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/1t0hj1476360516.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/29wq51476360516.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/349x21476360516.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/4a6431476360516.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,] 92.1 93.91 95.46 94.54 95.63 96.32 96.42 96.95 96.52 96.82 96.4 96.69 [2,] 92.1 93.91 95.46 94.54 95.63 96.32 96.42 96.95 96.52 96.82 96.4 96.69 [3,] 92.1 93.91 95.46 94.54 95.63 96.32 96.42 96.95 96.52 96.82 96.4 96.69 [4,] 92.1 93.91 95.46 94.54 95.63 96.32 96.42 96.95 96.52 96.82 96.4 96.69 [5,] 92.1 93.91 95.46 94.54 95.63 96.32 96.42 96.95 96.52 96.82 96.4 96.69 [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [1,] 96.72 98.57 98.6 96.44 97.09 97.36 97.74 96.78 96.45 97.66 98.69 98.21 [2,] 96.72 98.57 98.6 96.44 97.09 97.36 97.74 96.78 96.45 97.66 98.69 98.21 [3,] 96.72 98.57 98.6 96.44 97.09 97.36 97.74 96.78 96.45 97.66 98.69 98.21 [4,] 96.72 98.57 98.6 96.44 97.09 97.36 97.74 96.78 96.45 97.66 98.69 98.21 [5,] 96.72 98.57 98.6 96.44 97.09 97.36 97.74 96.78 96.45 97.66 98.69 98.21 [,25] [,26] [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36] [1,] 97.33 99.05 100.09 98.1 97.68 97.44 99.19 98.32 97.83 97.71 97.51 97.62 [2,] 97.33 99.05 100.09 98.1 97.68 97.44 99.19 98.32 97.83 97.71 97.51 97.62 [3,] 97.33 99.05 100.09 98.1 97.68 97.44 99.19 98.32 97.83 97.71 97.51 97.62 [4,] 97.33 99.05 100.09 98.1 97.68 97.44 99.19 98.32 97.83 97.71 97.51 97.62 [5,] 97.33 99.05 100.09 98.1 97.68 97.44 99.19 98.32 97.83 97.71 97.51 97.62 [,37] [,38] [,39] [,40] [,41] [,42] [,43] [,44] [,45] [,46] [,47] [,48] [1,] 96.49 98.92 99.69 97.06 97.63 97.97 99.01 97.89 97.23 96.93 96.97 97.68 [2,] 96.49 98.92 99.69 97.06 97.63 97.97 99.01 97.89 97.23 96.93 96.97 97.68 [3,] 96.49 98.92 99.69 97.06 97.63 97.97 99.01 97.89 97.23 96.93 96.97 97.68 [4,] 96.49 98.92 99.69 97.06 97.63 97.97 99.01 97.89 97.23 96.93 96.97 97.68 [5,] 96.49 98.92 99.69 97.06 97.63 97.97 99.01 97.89 97.23 96.93 96.97 97.68 [,49] [,50] [,51] [,52] [,53] [,54] [,55] [,56] [,57] [,58] [,59] [1,] 97.73 99.03 100.35 99.38 99.3 99.77 101.11 101.15 101.59 100.95 99.23 [2,] 97.73 99.03 100.35 99.38 99.3 99.77 101.11 101.15 101.59 100.95 99.23 [3,] 97.73 99.03 100.35 99.38 99.3 99.77 101.11 101.15 101.59 100.95 99.23 [4,] 97.73 99.03 100.35 99.38 99.3 99.77 101.11 101.15 101.59 100.95 99.23 [5,] 97.73 99.03 100.35 99.38 99.3 99.77 101.11 101.15 101.59 100.95 99.23 [,60] [1,] 100.41 [2,] 100.41 [3,] 100.41 [4,] 100.41 [5,] 100.41 $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,] 92.1 93.91 95.46 94.54 95.63 96.32 96.42 96.95 96.52 96.82 96.4 96.69 [2,] 92.1 93.91 95.46 94.54 95.63 96.32 96.42 96.95 96.52 96.82 96.4 96.69 [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [1,] 96.72 98.57 98.6 96.44 97.09 97.36 97.74 96.78 96.45 97.66 98.69 98.21 [2,] 96.72 98.57 98.6 96.44 97.09 97.36 97.74 96.78 96.45 97.66 98.69 98.21 [,25] [,26] [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36] [1,] 97.33 99.05 100.09 98.1 97.68 97.44 99.19 98.32 97.83 97.71 97.51 97.62 [2,] 97.33 99.05 100.09 98.1 97.68 97.44 99.19 98.32 97.83 97.71 97.51 97.62 [,37] [,38] [,39] [,40] [,41] [,42] [,43] [,44] [,45] [,46] [,47] [,48] [1,] 96.49 98.92 99.69 97.06 97.63 97.97 99.01 97.89 97.23 96.93 96.97 97.68 [2,] 96.49 98.92 99.69 97.06 97.63 97.97 99.01 97.89 97.23 96.93 96.97 97.68 [,49] [,50] [,51] [,52] [,53] [,54] [,55] [,56] [,57] [,58] [,59] [1,] 97.73 99.03 100.35 99.38 99.3 99.77 101.11 101.15 101.59 100.95 99.23 [2,] 97.73 99.03 100.35 99.38 99.3 99.77 101.11 101.15 101.59 100.95 99.23 [,60] [1,] 100.41 [2,] 100.41 $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/5smiq1476360516.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,] 1.81 1.55 -0.92 1.09 0.69 0.1 0.53 -0.43 0.3 -0.42 0.29 0.03 1.85 [2,] 1.81 1.55 -0.92 1.09 0.69 0.1 0.53 -0.43 0.3 -0.42 0.29 0.03 1.85 [3,] 1.81 1.55 -0.92 1.09 0.69 0.1 0.53 -0.43 0.3 -0.42 0.29 0.03 1.85 [4,] 1.81 1.55 -0.92 1.09 0.69 0.1 0.53 -0.43 0.3 -0.42 0.29 0.03 1.85 [5,] 1.81 1.55 -0.92 1.09 0.69 0.1 0.53 -0.43 0.3 -0.42 0.29 0.03 1.85 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [1,] 0.03 -2.16 0.65 0.27 0.38 -0.96 -0.33 1.21 1.03 -0.48 -0.88 1.72 [2,] 0.03 -2.16 0.65 0.27 0.38 -0.96 -0.33 1.21 1.03 -0.48 -0.88 1.72 [3,] 0.03 -2.16 0.65 0.27 0.38 -0.96 -0.33 1.21 1.03 -0.48 -0.88 1.72 [4,] 0.03 -2.16 0.65 0.27 0.38 -0.96 -0.33 1.21 1.03 -0.48 -0.88 1.72 [5,] 0.03 -2.16 0.65 0.27 0.38 -0.96 -0.33 1.21 1.03 -0.48 -0.88 1.72 [,26] [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36] [,37] [1,] 1.04 -1.99 -0.42 -0.24 1.75 -0.87 -0.49 -0.12 -0.2 0.11 -1.13 2.43 [2,] 1.04 -1.99 -0.42 -0.24 1.75 -0.87 -0.49 -0.12 -0.2 0.11 -1.13 2.43 [3,] 1.04 -1.99 -0.42 -0.24 1.75 -0.87 -0.49 -0.12 -0.2 0.11 -1.13 2.43 [4,] 1.04 -1.99 -0.42 -0.24 1.75 -0.87 -0.49 -0.12 -0.2 0.11 -1.13 2.43 [5,] 1.04 -1.99 -0.42 -0.24 1.75 -0.87 -0.49 -0.12 -0.2 0.11 -1.13 2.43 [,38] [,39] [,40] [,41] [,42] [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 0.77 -2.63 0.57 0.34 1.04 -1.12 -0.66 -0.3 0.04 0.71 0.05 1.3 [2,] 0.77 -2.63 0.57 0.34 1.04 -1.12 -0.66 -0.3 0.04 0.71 0.05 1.3 [3,] 0.77 -2.63 0.57 0.34 1.04 -1.12 -0.66 -0.3 0.04 0.71 0.05 1.3 [4,] 0.77 -2.63 0.57 0.34 1.04 -1.12 -0.66 -0.3 0.04 0.71 0.05 1.3 [5,] 0.77 -2.63 0.57 0.34 1.04 -1.12 -0.66 -0.3 0.04 0.71 0.05 1.3 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [,57] [,58] [,59] [,60] [1,] 1.32 -0.97 -0.08 0.47 1.34 0.04 0.44 -0.64 -1.72 1.18 NA [2,] 1.32 -0.97 -0.08 0.47 1.34 0.04 0.44 -0.64 -1.72 1.18 NA [3,] 1.32 -0.97 -0.08 0.47 1.34 0.04 0.44 -0.64 -1.72 1.18 NA [4,] 1.32 -0.97 -0.08 0.47 1.34 0.04 0.44 -0.64 -1.72 1.18 NA [5,] 1.32 -0.97 -0.08 0.47 1.34 0.04 0.44 -0.64 -1.72 1.18 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,] 1.81 1.55 -0.92 1.09 0.69 0.1 0.53 -0.43 0.3 -0.42 0.29 0.03 1.85 [2,] 1.81 1.55 -0.92 1.09 0.69 0.1 0.53 -0.43 0.3 -0.42 0.29 0.03 1.85 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [1,] 0.03 -2.16 0.65 0.27 0.38 -0.96 -0.33 1.21 1.03 -0.48 -0.88 1.72 [2,] 0.03 -2.16 0.65 0.27 0.38 -0.96 -0.33 1.21 1.03 -0.48 -0.88 1.72 [,26] [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36] [,37] [1,] 1.04 -1.99 -0.42 -0.24 1.75 -0.87 -0.49 -0.12 -0.2 0.11 -1.13 2.43 [2,] 1.04 -1.99 -0.42 -0.24 1.75 -0.87 -0.49 -0.12 -0.2 0.11 -1.13 2.43 [,38] [,39] [,40] [,41] [,42] [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 0.77 -2.63 0.57 0.34 1.04 -1.12 -0.66 -0.3 0.04 0.71 0.05 1.3 [2,] 0.77 -2.63 0.57 0.34 1.04 -1.12 -0.66 -0.3 0.04 0.71 0.05 1.3 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [,57] [,58] [,59] [,60] [1,] 1.32 -0.97 -0.08 0.47 1.34 0.04 0.44 -0.64 -1.72 1.18 NA [2,] 1.32 -0.97 -0.08 0.47 1.34 0.04 0.44 -0.64 -1.72 1.18 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/64d8m1476360516.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,] 93.91 NA [2,] 96.80 NA [3,] 97.68 NA [4,] 99.02 NA [5,] 101.59 NA $n [1] 60 0 $conf [,1] [,2] [1,] 97.22717 NA [2,] 98.13283 NA $out [1] 92.1 $group [1] 1 $names [1] "1" NA > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7hcsb1476360516.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,] 93.91 93.91 93.91 [2,] 96.80 96.80 96.80 [3,] 97.68 97.68 97.68 [4,] 99.02 99.02 99.02 [5,] 101.59 101.59 101.59 $n [1] 60 60 60 $conf [,1] [,2] [,3] [1,] 97.22717 97.22717 97.22717 [2,] 98.13283 98.13283 98.13283 $out [1] 92.1 92.1 92.1 $group [1] 1 2 3 $names [1] "mean" "median" "midrange" > dev.off() null device 1 > > try(system("convert tmp/1t0hj1476360516.ps tmp/1t0hj1476360516.png",intern=TRUE)) character(0) > try(system("convert tmp/29wq51476360516.ps tmp/29wq51476360516.png",intern=TRUE)) character(0) > try(system("convert tmp/349x21476360516.ps tmp/349x21476360516.png",intern=TRUE)) character(0) > try(system("convert tmp/4a6431476360516.ps tmp/4a6431476360516.png",intern=TRUE)) character(0) > try(system("convert tmp/5smiq1476360516.ps tmp/5smiq1476360516.png",intern=TRUE)) character(0) > try(system("convert tmp/64d8m1476360516.ps tmp/64d8m1476360516.png",intern=TRUE)) character(0) > try(system("convert tmp/7hcsb1476360516.ps tmp/7hcsb1476360516.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.399 0.169 2.598