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.61,92.19,92.68,92.66,92.77,92.21,92.58,91.9,93.81,94.05,94.51,94.49,94.36,94.72,95.57,95.87,95.93,96.09,95.82,96.06,97.09,97.67,98.53,98.12,98.84,98.98,100.04,99.47,99.84,99.52,99.81,99.55,100.21,101.44,101,101.32,101.84,101.81,101.83,102.18,101.97,101.8,101.69,101.91,102.27,102.73,102.61,102.89,102.93,103.01,102.54,103.08,103.72,103.83,103.69,103.57,103.95,104.52,104.58,104.75,108.4,107.23,107.76,107.25,108.1,108.49,107.19,106.83,107.24,108.49,109.3,109.15) > 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.61 94.36 98.84 101.84 102.93 108.40 NA [2,] 92.19 94.72 98.98 101.81 103.01 107.23 NA [3,] 92.68 95.57 100.04 101.83 102.54 107.76 NA [4,] 92.66 95.87 99.47 102.18 103.08 107.25 NA [5,] 92.77 95.93 99.84 101.97 103.72 108.10 NA [6,] 92.21 96.09 99.52 101.80 103.83 108.49 NA [7,] 92.58 95.82 99.81 101.69 103.69 107.19 NA [8,] 91.90 96.06 99.55 101.91 103.57 106.83 NA [9,] 93.81 97.09 100.21 102.27 103.95 107.24 NA [10,] 94.05 97.67 101.44 102.73 104.52 108.49 NA [11,] 94.51 98.53 101.00 102.61 104.58 109.30 NA [12,] 94.49 98.12 101.32 102.89 104.75 109.15 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.42 0.36 0.14 -0.03 0.08 -1.17 NA [2,] 0.49 0.85 1.06 0.02 -0.47 0.53 NA [3,] -0.02 0.30 -0.57 0.35 0.54 -0.51 NA [4,] 0.11 0.06 0.37 -0.21 0.64 0.85 NA [5,] -0.56 0.16 -0.32 -0.17 0.11 0.39 NA [6,] 0.37 -0.27 0.29 -0.11 -0.14 -1.30 NA [7,] -0.68 0.24 -0.26 0.22 -0.12 -0.36 NA [8,] 1.91 1.03 0.66 0.36 0.38 0.41 NA [9,] 0.24 0.58 1.23 0.46 0.57 1.25 NA [10,] 0.46 0.86 -0.44 -0.12 0.06 0.81 NA [11,] -0.02 -0.41 0.32 0.28 0.17 -0.15 NA [12,] -0.13 0.72 0.52 0.04 3.65 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/144vi1489514757.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/2bulu1489514757.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/3dcqp1489514757.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/4dx6m1489514757.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.61 92.190 92.680 92.660 92.770 92.21 92.58 91.90 93.81 94.050 [2,] 94.36 94.720 95.570 95.870 95.930 96.09 95.82 96.06 97.09 97.670 [3,] 100.34 100.395 100.935 100.825 100.905 100.66 100.75 100.73 101.24 102.085 [4,] 102.93 103.010 102.540 103.080 103.720 103.83 103.69 103.57 103.95 104.520 [5,] 108.40 107.230 107.760 107.250 108.100 108.49 107.19 106.83 107.24 108.490 [,11] [,12] [1,] 94.510 94.490 [2,] 98.530 98.120 [3,] 101.805 102.105 [4,] 104.580 104.750 [5,] 109.300 109.150 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 94.81207 95.04768 96.43912 96.17432 95.8802 95.66745 95.6736 [2,] 105.86793 105.74232 105.43088 105.47568 105.9298 105.65255 105.8264 [,8] [,9] [,10] [,11] [,12] [1,] 95.88581 96.81508 97.66653 97.90255 97.82844 [2,] 105.57419 105.66492 106.50347 105.70745 106.38156 $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.61, 94.36, 100.34, 102.93, 108.4, 92.19, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/55a671489514757.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,] -1.170 -0.47 -0.57 -0.21 -0.56 -0.270 -0.68 0.360 0.240 -0.44 -0.410 -0.13 [2,] -0.420 0.02 -0.51 0.06 -0.32 -0.270 -0.36 0.380 0.460 -0.12 -0.150 0.04 [3,] 0.025 0.51 0.14 0.24 -0.03 -0.125 -0.19 0.535 0.575 0.26 0.075 0.52 [4,] 0.140 0.85 0.35 0.64 0.16 0.290 0.22 1.030 1.230 0.81 0.280 0.72 [5,] 0.360 1.06 0.54 0.85 0.39 0.370 0.24 1.910 1.250 0.86 0.320 0.72 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.3362181 -0.02537681 -0.4147278 -0.1341187 -0.3396155 -0.4862181 [2,] 0.3862181 1.04537681 0.6947278 0.6141187 0.2796155 0.2362181 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.5641187 0.115729 0.07832513 -0.33988 -0.2023639 0.03951371 [2,] 0.1841187 0.954271 1.07167487 0.85988 0.3523639 1.00048629 $out [1] -1.30 3.65 $group [1] 6 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-1.17, -0.420000000000002, 0.0249999999999986, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6wvmh1489514757.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.900 94.360 98.840 101.69 102.540 106.830 NA [2,] 92.395 95.695 99.495 101.82 103.045 107.235 NA [3,] 92.670 95.995 99.825 101.94 103.705 107.930 NA [4,] 93.930 97.380 100.605 102.44 104.235 108.490 NA [5,] 94.510 98.530 101.440 102.89 104.750 109.300 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 91.96988 95.22646 99.31872 101.6572 103.1622 107.3576 NA [2,] 93.37012 96.76354 100.33128 102.2228 104.2478 108.5024 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(91.9, 92.395, 92.67, 93.93, 94.51, 94.36, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7efn51489514757.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,] 99.65667 100.3400 99.06875 [2,] 100.02000 100.6950 99.66875 [3,] 100.22667 100.8650 100.06938 [4,] 101.12250 101.5225 101.02125 [5,] 101.78667 102.1050 101.61750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 99.72381 100.4876 99.45249 [2,] 100.72952 101.2424 100.68626 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(99.6566666666667, 100.02, 100.226666666667, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/144vi1489514757.ps tmp/144vi1489514757.png",intern=TRUE)) character(0) > try(system("convert tmp/2bulu1489514757.ps tmp/2bulu1489514757.png",intern=TRUE)) character(0) > try(system("convert tmp/3dcqp1489514757.ps tmp/3dcqp1489514757.png",intern=TRUE)) character(0) > try(system("convert tmp/4dx6m1489514757.ps tmp/4dx6m1489514757.png",intern=TRUE)) character(0) > try(system("convert tmp/55a671489514757.ps tmp/55a671489514757.png",intern=TRUE)) character(0) > try(system("convert tmp/6wvmh1489514757.ps tmp/6wvmh1489514757.png",intern=TRUE)) character(0) > try(system("convert tmp/7efn51489514757.ps tmp/7efn51489514757.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.969 0.249 3.388