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(91.16,91.17,91.17,91.38,92.68,92.72,92.79,92.81,92.81,92.81,92.81,92.81,92.81,92.82,92.82,92.88,93.38,93.89,94.1,94.18,94.3,94.31,94.36,94.38,94.38,94.5,94.57,94.89,96.71,97.57,97.88,97.97,98.4,98.51,98.46,98.46,98.48,98.6,98.6,98.71,99.13,99.2,99.3,100.18,101.37,101.77,102.28,102.38,102.35,103.23,105.37,106.62,107,107.24,107.31,107.35,107.42,107.58,107.64,107.64,107.68,108.51,110.37,111.31,111.57,111.66,111.69,111.9,111.95,112.04,112.13,112.14) > 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,] 91.16 92.81 94.38 98.48 102.35 107.68 NA [2,] 91.17 92.82 94.50 98.60 103.23 108.51 NA [3,] 91.17 92.82 94.57 98.60 105.37 110.37 NA [4,] 91.38 92.88 94.89 98.71 106.62 111.31 NA [5,] 92.68 93.38 96.71 99.13 107.00 111.57 NA [6,] 92.72 93.89 97.57 99.20 107.24 111.66 NA [7,] 92.79 94.10 97.88 99.30 107.31 111.69 NA [8,] 92.81 94.18 97.97 100.18 107.35 111.90 NA [9,] 92.81 94.30 98.40 101.37 107.42 111.95 NA [10,] 92.81 94.31 98.51 101.77 107.58 112.04 NA [11,] 92.81 94.36 98.46 102.28 107.64 112.13 NA [12,] 92.81 94.38 98.46 102.38 107.64 112.14 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.01 0.01 0.12 0.12 0.88 0.83 NA [2,] 0.00 0.00 0.07 0.00 2.14 1.86 NA [3,] 0.21 0.06 0.32 0.11 1.25 0.94 NA [4,] 1.30 0.50 1.82 0.42 0.38 0.26 NA [5,] 0.04 0.51 0.86 0.07 0.24 0.09 NA [6,] 0.07 0.21 0.31 0.10 0.07 0.03 NA [7,] 0.02 0.08 0.09 0.88 0.04 0.21 NA [8,] 0.00 0.12 0.43 1.19 0.07 0.05 NA [9,] 0.00 0.01 0.11 0.40 0.16 0.09 NA [10,] 0.00 0.05 -0.05 0.51 0.06 0.09 NA [11,] 0.00 0.02 0.00 0.10 0.00 0.01 NA [12,] 0.00 0.00 0.02 -0.03 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/143vs1489657118.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/2g83j1489657118.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/3z4it1489657118.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/4l1x01489657118.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,] 91.16 91.17 91.170 91.38 92.68 92.720 92.79 92.810 92.810 92.81 [2,] 92.81 92.82 92.820 92.88 93.38 93.890 94.10 94.180 94.300 94.31 [3,] 96.43 96.55 96.585 96.80 97.92 98.385 98.59 99.075 99.885 100.14 [4,] 102.35 103.23 105.370 106.62 107.00 107.240 107.31 107.350 107.420 107.58 [5,] 107.68 108.51 110.370 111.31 111.57 111.660 111.69 111.900 111.950 112.04 [,11] [,12] [1,] 92.81 92.81 [2,] 94.36 94.38 [3,] 100.37 100.42 [4,] 107.64 107.64 [5,] 112.13 112.14 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 90.27639 89.83521 88.48984 87.93726 89.13466 89.77382 90.06912 [2,] 102.58361 103.26479 104.68016 105.66274 106.70534 106.99618 107.11088 [,8] [,9] [,10] [,11] [,12] [1,] 90.57992 91.42218 91.58042 91.80397 91.86687 [2,] 107.57008 108.34782 108.69958 108.93603 108.97313 $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(91.16, 92.81, 96.43, 102.35, 107.68, 91.17, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5jb1w1489657118.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.01 0.000 0.060 0.26 0.040 0.030 0.020 0.000 0.00 -0.050 0.000 -0.03 [2,] 0.01 0.000 0.110 0.38 0.070 0.070 0.040 0.050 0.01 0.000 0.000 0.00 [3,] 0.12 0.035 0.265 0.46 0.165 0.085 0.085 0.095 0.10 0.055 0.005 0.00 [4,] 0.83 1.860 0.940 1.30 0.510 0.210 0.210 0.430 0.16 0.090 0.020 0.02 [5,] 0.88 2.140 1.250 1.82 0.860 0.310 0.210 0.430 0.16 0.090 0.020 0.04 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.4089265 -1.16476 -0.2703768 -0.1334297 -0.1188142 -0.005304522 [2,] 0.6489265 1.23476 0.8003768 1.0534297 0.4488142 0.175304522 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.02465549 -0.1501123 0.003245155 -0.003052907 -0.007900646 -0.01413195 [2,] 0.19465549 0.3401123 0.196754845 0.113052907 0.017900646 0.01413195 $out [1] 0.88 1.19 0.40 0.51 0.10 $group [1] 7 8 9 10 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.0100000000000051, 0.119999999999997, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/60lxr1489657118.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,] 91.160 92.810 94.380 98.480 105.370 110.370 NA [2,] 91.275 92.850 94.730 98.655 105.995 110.840 NA [3,] 92.755 93.995 97.725 99.250 107.275 111.675 NA [4,] 92.810 94.305 98.430 101.570 107.500 111.995 NA [5,] 92.810 94.380 98.510 102.380 107.640 112.140 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 92.05488 93.33136 96.03741 97.92045 106.5886 111.1482 NA [2,] 93.45512 94.65864 99.41259 100.57955 107.9614 112.2018 NA $out [1] 102.35 103.23 107.68 108.51 $group [1] 5 5 6 6 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(91.16, 91.275, 92.755, 92.81, 92.81, 92.81, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7sivx1489657118.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,] 97.8100 96.4300 97.2925 [2,] 99.0575 96.6925 98.7400 [3,] 100.4458 98.4875 100.0981 [4,] 101.1058 100.0125 100.6800 [5,] 101.3017 100.4200 100.8625 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 99.51157 96.97323 99.21328 [2,] 101.38009 100.00177 100.98297 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(97.81, 99.0575, 100.445833333333, 101.105833333333, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/143vs1489657118.ps tmp/143vs1489657118.png",intern=TRUE)) character(0) > try(system("convert tmp/2g83j1489657118.ps tmp/2g83j1489657118.png",intern=TRUE)) character(0) > try(system("convert tmp/3z4it1489657118.ps tmp/3z4it1489657118.png",intern=TRUE)) character(0) > try(system("convert tmp/4l1x01489657118.ps tmp/4l1x01489657118.png",intern=TRUE)) character(0) > try(system("convert tmp/5jb1w1489657118.ps tmp/5jb1w1489657118.png",intern=TRUE)) character(0) > try(system("convert tmp/60lxr1489657118.ps tmp/60lxr1489657118.png",intern=TRUE)) character(0) > try(system("convert tmp/7sivx1489657118.ps tmp/7sivx1489657118.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.418 0.219 2.684