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(98.98,98.97,98.91,98.98,98.95,98.96,98.96,99.04,99.33,100.04,100.14,100.21,100.21,100.27,100.44,100.57,100.51,100.47,100.47,100.49,101,101.61,101.65,101.74,101.74,101.73,101.77,101.82,101.97,102.09,102.09,102.08,102.42,102.78,103.04,103.08,99.16,99.19,99.23,99.31,99.46,99.49,99.95,100.14,100.43,101.1,101.26,101.28,101.04,101.12,101.07,100.97,101.01,100.99,101.19,101.25,101.33,101.79,102.06,102.09,102.27,102.26,102.46,102.46,102.51,102.56,102.59,102.26,102.33,102.84,102.93,102.95) > 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,] 98.98 100.21 101.74 99.16 101.04 102.27 NA [2,] 98.97 100.27 101.73 99.19 101.12 102.26 NA [3,] 98.91 100.44 101.77 99.23 101.07 102.46 NA [4,] 98.98 100.57 101.82 99.31 100.97 102.46 NA [5,] 98.95 100.51 101.97 99.46 101.01 102.51 NA [6,] 98.96 100.47 102.09 99.49 100.99 102.56 NA [7,] 98.96 100.47 102.09 99.95 101.19 102.59 NA [8,] 99.04 100.49 102.08 100.14 101.25 102.26 NA [9,] 99.33 101.00 102.42 100.43 101.33 102.33 NA [10,] 100.04 101.61 102.78 101.10 101.79 102.84 NA [11,] 100.14 101.65 103.04 101.26 102.06 102.93 NA [12,] 100.21 101.74 103.08 101.28 102.09 102.95 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.01 0.06 -0.01 0.03 0.08 -0.01 NA [2,] -0.06 0.17 0.04 0.04 -0.05 0.20 NA [3,] 0.07 0.13 0.05 0.08 -0.10 0.00 NA [4,] -0.03 -0.06 0.15 0.15 0.04 0.05 NA [5,] 0.01 -0.04 0.12 0.03 -0.02 0.05 NA [6,] 0.00 0.00 0.00 0.46 0.20 0.03 NA [7,] 0.08 0.02 -0.01 0.19 0.06 -0.33 NA [8,] 0.29 0.51 0.34 0.29 0.08 0.07 NA [9,] 0.71 0.61 0.36 0.67 0.46 0.51 NA [10,] 0.10 0.04 0.26 0.16 0.27 0.09 NA [11,] 0.07 0.09 0.04 0.02 0.03 0.02 NA [12,] 0.00 0.00 -3.92 -0.24 0.18 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/1x2h31476361511.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/2kkxa1476361511.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/32wud1476361511.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/4h0a71476361511.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,] 98.980 98.970 98.910 98.98 98.95 98.96 98.96 99.04 99.330 100.04 [2,] 99.160 99.190 99.230 99.31 99.46 99.49 99.95 100.14 100.430 101.10 [3,] 100.625 100.695 100.755 100.77 100.76 100.73 100.83 100.87 101.165 101.70 [4,] 101.740 101.730 101.770 101.82 101.97 102.09 102.09 102.08 102.330 102.78 [5,] 102.270 102.260 102.460 102.46 102.51 102.56 102.59 102.26 102.420 102.84 [,11] [,12] [1,] 100.140 100.210 [2,] 101.260 101.280 [3,] 101.855 101.915 [4,] 102.930 102.950 [5,] 103.040 103.080 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 98.96082 99.05662 99.11662 99.15097 99.14097 99.05292 99.44963 [2,] 102.28918 102.33338 102.39338 102.38903 102.37903 102.40708 102.21037 [,8] [,9] [,10] [,11] [,12] [1,] 99.61864 99.93944 100.6163 100.7778 100.8378 [2,] 102.12136 102.39056 102.7837 102.9322 102.9922 $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(98.98, 99.16, 100.625, 101.74, 102.27, 98.97, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5hy7z1476361511.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.06 -0.10 -0.060 -0.04 0.000 -0.01 0.07 0.36 0.04 0.020 -0.24 [2,] -0.01 -0.05 0.00 -0.030 -0.02 0.000 -0.01 0.08 0.46 0.09 0.020 -0.24 [3,] 0.01 0.04 0.06 0.045 0.02 0.015 0.04 0.29 0.56 0.13 0.035 0.00 [4,] 0.06 0.17 0.08 0.150 0.05 0.200 0.08 0.34 0.67 0.26 0.070 0.00 [5,] 0.08 0.20 0.13 0.150 0.12 0.460 0.19 0.51 0.71 0.27 0.090 0.18 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.03515226 -0.1019071 0.008397416 -0.07110581 -0.02515226 -0.1140065 [2,] 0.05515226 0.1819071 0.111602584 0.16110581 0.06515226 0.1440065 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.01805291 0.1222916 0.4245432 0.02034451 0.002748385 -0.1695834 [2,] 0.09805291 0.4577084 0.6954568 0.23965549 0.067251615 0.1695834 $out [1] -0.33 -3.92 $group [1] 7 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-0.0100000000000051, -0.00999999999999091, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/67akx1476361511.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,] 98.910 100.210 101.730 99.160 100.970 102.260 NA [2,] 98.960 100.455 101.795 99.270 101.025 102.300 NA [3,] 98.980 100.500 102.085 99.720 101.155 102.485 NA [4,] 99.685 101.305 102.600 100.765 101.560 102.715 NA [5,] 100.210 101.740 103.080 101.280 102.090 102.950 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 98.64932 100.1123 101.7178 99.03812 100.911 102.2957 NA [2,] 99.31068 100.8877 102.4522 100.40188 101.399 102.6743 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(98.91, 98.96, 98.98, 99.685, 100.21, 100.21, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7qwta1476361511.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,] 100.5667 100.6250 100.4938 [2,] 100.6658 100.7425 100.5900 [3,] 100.8175 100.8000 100.8738 [4,] 101.4167 101.4325 101.6031 [5,] 101.8917 101.9150 102.0650 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 100.475 100.4853 100.4117 [2,] 101.160 101.1147 101.3358 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(100.566666666667, 100.665833333333, 100.8175, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1x2h31476361511.ps tmp/1x2h31476361511.png",intern=TRUE)) character(0) > try(system("convert tmp/2kkxa1476361511.ps tmp/2kkxa1476361511.png",intern=TRUE)) character(0) > try(system("convert tmp/32wud1476361511.ps tmp/32wud1476361511.png",intern=TRUE)) character(0) > try(system("convert tmp/4h0a71476361511.ps tmp/4h0a71476361511.png",intern=TRUE)) character(0) > try(system("convert tmp/5hy7z1476361511.ps tmp/5hy7z1476361511.png",intern=TRUE)) character(0) > try(system("convert tmp/67akx1476361511.ps tmp/67akx1476361511.png",intern=TRUE)) character(0) > try(system("convert tmp/7qwta1476361511.ps tmp/7qwta1476361511.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.712 0.219 3.035