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(70.99,70.99,72.03,72.31,72.33,72.33,73.14,73.28,73.28,73.28,73.28,73.28,73.28,73.28,74.33,75.71,76.65,76.65,76.66,76.66,76.66,76.66,76.66,76.17,76.05,76.06,76.08,79.02,80.21,79.8,80.22,81.28,82.1,82.13,82.12,82.13,82.13,82.13,82.13,82.68,83.81,84.52,84.53,84.57,84.59,85.28,86.5,86.79,86.83,88.45,93.64,95.75,95.9,96.01,95.99,95.96,96,96.02,96.04,96.04,96.04,96.04,96.13,96.17,96.19,96.16,96.45,96.47,96.47,96.76,97.24,97.26,98.3,98.87,100.49,100.53,99.66,99.31,100.36,100.77,100.39,100.42,100.44,100.44) > 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] 84 > (np <- floor(n / par1)) [1] 7 > 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] 7 7 7 7 7 7 7 7 7 7 7 7 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 70.99 73.28 76.05 82.13 86.83 96.04 98.30 NA [2,] 70.99 73.28 76.06 82.13 88.45 96.04 98.87 NA [3,] 72.03 74.33 76.08 82.13 93.64 96.13 100.49 NA [4,] 72.31 75.71 79.02 82.68 95.75 96.17 100.53 NA [5,] 72.33 76.65 80.21 83.81 95.90 96.19 99.66 NA [6,] 72.33 76.65 79.80 84.52 96.01 96.16 99.31 NA [7,] 73.14 76.66 80.22 84.53 95.99 96.45 100.36 NA [8,] 73.28 76.66 81.28 84.57 95.96 96.47 100.77 NA [9,] 73.28 76.66 82.10 84.59 96.00 96.47 100.39 NA [10,] 73.28 76.66 82.13 85.28 96.02 96.76 100.42 NA [11,] 73.28 76.66 82.12 86.50 96.04 97.24 100.44 NA [12,] 73.28 76.17 82.13 86.79 96.04 97.26 100.44 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 0.00 0.00 0.01 0.00 1.62 0.00 0.57 NA [2,] 1.04 1.05 0.02 0.00 5.19 0.09 1.62 NA [3,] 0.28 1.38 2.94 0.55 2.11 0.04 0.04 NA [4,] 0.02 0.94 1.19 1.13 0.15 0.02 -0.87 NA [5,] 0.00 0.00 -0.41 0.71 0.11 -0.03 -0.35 NA [6,] 0.81 0.01 0.42 0.01 -0.02 0.29 1.05 NA [7,] 0.14 0.00 1.06 0.04 -0.03 0.02 0.41 NA [8,] 0.00 0.00 0.82 0.02 0.04 0.00 -0.38 NA [9,] 0.00 0.00 0.03 0.69 0.02 0.29 0.03 NA [10,] 0.00 0.00 -0.01 1.22 0.02 0.48 0.02 NA [11,] 0.00 -0.49 0.01 0.29 0.00 0.02 0.00 NA [12,] 0.00 -0.12 0.00 0.04 0.00 1.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/1k8tp1476724058.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/2oxie1476724058.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/36nj71476724058.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/4ys641476724058.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,] 70.990 70.990 72.030 72.310 72.330 72.330 73.14 73.280 73.280 73.280 [2,] 74.665 74.670 75.205 77.365 78.430 78.225 78.44 78.970 79.380 79.395 [3,] 82.130 82.130 82.130 82.680 83.810 84.520 84.53 84.570 84.590 85.280 [4,] 91.435 92.245 94.885 95.960 96.045 96.085 96.22 96.215 96.235 96.390 [5,] 98.300 98.870 100.490 100.530 99.660 99.310 100.36 100.770 100.390 100.420 [,11] [,12] [1,] 73.28 73.28 [2,] 79.39 79.15 [3,] 86.50 86.79 [4,] 96.64 96.65 [5,] 100.44 100.44 $n [1] 7 7 7 7 7 7 7 7 7 7 7 7 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 72.11523 71.63449 70.37742 71.57537 73.29061 73.8543 73.91207 74.27156 [2,] 92.14477 92.62551 93.88258 93.78463 94.32939 95.1857 95.14793 94.86844 [,9] [,10] [,11] [,12] [1,] 74.52447 75.13086 76.19858 76.33928 [2,] 94.65553 95.42914 96.80142 97.24072 $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(70.99, 74.665, 82.13, 91.435, 98.3, 70.99, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/52tlv1476724058.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.00 0.000 0.040 -0.870 -0.410 -0.020 -0.030 0.00 0.00 -0.01 0.000 0.00 [2,] 0.00 0.055 0.160 0.020 -0.190 0.010 0.010 0.00 0.01 0.00 0.000 0.00 [3,] 0.00 1.040 0.550 0.150 0.000 0.290 0.040 0.00 0.03 0.02 0.000 0.00 [4,] 0.29 1.335 1.745 1.035 0.055 0.615 0.275 0.03 0.16 0.25 0.015 0.04 [5,] 0.57 1.620 2.940 1.190 0.110 1.050 0.410 0.04 0.29 0.48 0.020 0.04 $n [1] 7 7 7 7 7 7 7 7 7 7 7 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.1731833 0.2756046 -0.3965364 -0.4561416 -0.14631 -0.07129624 -0.1182537 [2,] 0.1731833 1.8043954 1.4965364 0.7561416 0.14631 0.65129624 0.1982537 [,8] [,9] [,10] [,11] [,12] [1,] -0.01791552 -0.05957758 -0.129296 -0.008957758 -0.02580129 [2,] 0.01791552 0.11957758 0.169296 0.008957758 0.02580129 $out [1] 1.62 5.19 0.71 1.06 0.82 -0.38 0.69 1.22 -0.49 0.29 -0.12 1.04 $group [1] 1 2 5 7 8 8 9 10 11 11 12 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0, 0, 0, 0.290000000000006, 0.570000000000007, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/67p5a1476724058.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] [,8] [1,] 70.990 73.28 76.050 82.130 93.640 96.040 98.300 NA [2,] 72.170 75.02 77.550 82.405 94.695 96.145 99.485 NA [3,] 72.735 76.65 80.215 84.525 95.975 96.320 100.405 NA [4,] 73.280 76.66 82.110 84.935 96.015 96.615 100.465 NA [5,] 73.280 76.66 82.130 86.790 96.040 97.260 100.770 NA $n [1] 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 72.22872 75.90198 78.13515 83.37105 95.37294 96.10563 99.95802 NA [2,] 73.24128 77.39802 82.29485 85.67895 96.57706 96.53437 100.85198 NA $out [1] 86.83 88.45 $group [1] 5 5 $names [1] "1" "2" "3" "4" "5" "6" "7" NA Warning message: In bxp(list(stats = c(70.99, 72.17, 72.735, 73.28, 73.28, 73.28, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7sy9s1476724058.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,] 83.37429 82.130 83.05000 [2,] 85.50000 82.405 85.85375 [3,] 86.58071 84.525 87.28375 [4,] 87.14571 84.935 87.85000 [5,] 87.46857 86.790 88.01500 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 85.83009 83.37105 86.37325 [2,] 87.33134 85.67895 88.19425 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(83.3742857142857, 85.5, 86.5807142857143, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1k8tp1476724058.ps tmp/1k8tp1476724058.png",intern=TRUE)) character(0) > try(system("convert tmp/2oxie1476724058.ps tmp/2oxie1476724058.png",intern=TRUE)) character(0) > try(system("convert tmp/36nj71476724058.ps tmp/36nj71476724058.png",intern=TRUE)) character(0) > try(system("convert tmp/4ys641476724058.ps tmp/4ys641476724058.png",intern=TRUE)) character(0) > try(system("convert tmp/52tlv1476724058.ps tmp/52tlv1476724058.png",intern=TRUE)) character(0) > try(system("convert tmp/67p5a1476724058.ps tmp/67p5a1476724058.png",intern=TRUE)) character(0) > try(system("convert tmp/7sy9s1476724058.ps tmp/7sy9s1476724058.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.452 0.179 2.673