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(78.46,78.59,81.37,83.61,83.85,84.08,84.56,84.65,85.41,85.75,86.21,86.38,86.65,87.30,87.87,88.23,88.33,88.62,88.67,88.85,88.87,89.20,89.38,89.65,90.37,90.38,91.43,92.09,92.21,92.31,92.62,93.13,93.17,93.42,93.50,95.75,97.29,98.01,98.02,98.20,98.29,98.39,98.42,98.70,98.90,99.04,99.31,99.34,99.35,99.51,99.88,99.91,100.30,100.74,101.16,101.30,101.37,101.68,101.68,101.89,101.93,102.66,102.68,103.13,103.14,104.01,104.17,104.41,104.71,105.51,105.98,106.25) > 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,] 78.46 86.65 90.37 97.29 99.35 101.93 NA [2,] 78.59 87.30 90.38 98.01 99.51 102.66 NA [3,] 81.37 87.87 91.43 98.02 99.88 102.68 NA [4,] 83.61 88.23 92.09 98.20 99.91 103.13 NA [5,] 83.85 88.33 92.21 98.29 100.30 103.14 NA [6,] 84.08 88.62 92.31 98.39 100.74 104.01 NA [7,] 84.56 88.67 92.62 98.42 101.16 104.17 NA [8,] 84.65 88.85 93.13 98.70 101.30 104.41 NA [9,] 85.41 88.87 93.17 98.90 101.37 104.71 NA [10,] 85.75 89.20 93.42 99.04 101.68 105.51 NA [11,] 86.21 89.38 93.50 99.31 101.68 105.98 NA [12,] 86.38 89.65 95.75 99.34 101.89 106.25 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.13 0.65 0.01 0.72 0.16 0.73 NA [2,] 2.78 0.57 1.05 0.01 0.37 0.02 NA [3,] 2.24 0.36 0.66 0.18 0.03 0.45 NA [4,] 0.24 0.10 0.12 0.09 0.39 0.01 NA [5,] 0.23 0.29 0.10 0.10 0.44 0.87 NA [6,] 0.48 0.05 0.31 0.03 0.42 0.16 NA [7,] 0.09 0.18 0.51 0.28 0.14 0.24 NA [8,] 0.76 0.02 0.04 0.20 0.07 0.30 NA [9,] 0.34 0.33 0.25 0.14 0.31 0.80 NA [10,] 0.46 0.18 0.08 0.27 0.00 0.47 NA [11,] 0.17 0.27 2.25 0.03 0.21 0.27 NA [12,] 0.27 0.72 1.54 0.01 0.04 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/1ekv61489659943.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/2nq101489659943.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/3oss91489659943.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/486t91489659943.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,] 78.46 78.590 81.370 83.610 83.85 84.08 84.56 84.650 85.410 85.75 [2,] 86.65 87.300 87.870 88.230 88.33 88.62 88.67 88.850 88.870 89.20 [3,] 93.83 94.195 94.725 95.145 95.25 95.35 95.52 95.915 96.035 96.23 [4,] 99.35 99.510 99.880 99.910 100.30 100.74 101.16 101.300 101.370 101.68 [5,] 101.93 102.660 102.680 103.130 103.14 104.01 104.17 104.410 104.710 105.51 [,11] [,12] [1,] 86.210 86.380 [2,] 89.380 89.650 [3,] 96.405 97.545 [4,] 101.680 101.890 [5,] 105.980 106.250 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 85.63809 86.31916 86.97816 87.61102 87.52896 87.53221 87.46355 [2,] 102.02191 102.07084 102.47184 102.67898 102.97104 103.16779 103.57645 [,8] [,9] [,10] [,11] [,12] [1,] 87.88435 87.9721 88.18 88.4711 89.6498 [2,] 103.94565 104.0979 104.28 104.3389 105.4402 $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(78.46, 86.65, 93.83, 99.35, 101.93, 78.59, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5nsbd1489659943.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] [1,] 0.010 0.01 0.030 0.01 0.10 0.030 0.09 0.020 0.14 0.000 0.03 0.01 [2,] 0.130 0.02 0.180 0.09 0.10 0.050 0.14 0.040 0.25 0.080 0.17 0.04 [3,] 0.405 0.47 0.405 0.11 0.26 0.235 0.21 0.135 0.32 0.225 0.24 0.27 [4,] 0.720 1.05 0.660 0.24 0.44 0.420 0.28 0.300 0.34 0.460 0.27 0.72 [5,] 0.730 1.05 0.660 0.39 0.87 0.480 0.28 0.300 0.34 0.470 0.27 1.54 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.02443094 -0.1943833 0.0953845 0.01324516 0.04068902 -0.003661951 [2,] 0.78556906 1.1343833 0.7146155 0.20675484 0.47931098 0.473661951 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0.1196955 -0.0327084 0.2619471 -0.02011227 0.1754968 -0.2104863 [2,] 0.3003045 0.3027084 0.3780529 0.47011227 0.3045032 0.7504863 $out [1] 2.78 2.24 0.51 0.76 0.80 2.25 $group [1] 2 3 7 8 9 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0.00999999999999091, 0.13000000000001, 0.405000000000001, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6m3gs1489659943.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,] 78.46 86.650 90.370 97.290 99.350 101.930 NA [2,] 82.49 88.050 91.760 98.110 99.895 102.905 NA [3,] 84.32 88.645 92.465 98.405 100.950 104.090 NA [4,] 85.58 89.035 93.295 98.970 101.525 105.110 NA [5,] 86.38 89.650 93.500 99.340 101.890 106.250 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 82.91063 88.19573 91.76488 98.01275 100.2065 103.0843 NA [2,] 85.72937 89.09427 93.16512 98.79725 101.6935 105.0957 NA $out [1] 95.75 $group [1] 3 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(78.46, 82.49, 84.32, 85.58, 86.38, 86.65, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7zl9j1489659943.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.34167 93.8300 93.20750 [2,] 93.86833 94.9350 94.21313 [3,] 94.81250 95.4350 94.95687 [4,] 95.58583 96.1325 95.49313 [5,] 96.54333 97.5450 96.21375 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 94.02914 94.88881 94.37306 [2,] 95.59586 95.98119 95.54069 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(92.3416666666667, 93.8683333333333, 94.8125, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1ekv61489659943.ps tmp/1ekv61489659943.png",intern=TRUE)) character(0) > try(system("convert tmp/2nq101489659943.ps tmp/2nq101489659943.png",intern=TRUE)) character(0) > try(system("convert tmp/3oss91489659943.ps tmp/3oss91489659943.png",intern=TRUE)) character(0) > try(system("convert tmp/486t91489659943.ps tmp/486t91489659943.png",intern=TRUE)) character(0) > try(system("convert tmp/5nsbd1489659943.ps tmp/5nsbd1489659943.png",intern=TRUE)) character(0) > try(system("convert tmp/6m3gs1489659943.ps tmp/6m3gs1489659943.png",intern=TRUE)) character(0) > try(system("convert tmp/7zl9j1489659943.ps tmp/7zl9j1489659943.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.602 0.176 2.835