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(95.83,95.87,96.06,96.06,96.15,96.26,96.28,96.36,96.38,96.43,96.47,96.55,96.71,96.87,96.99,97.1,97.26,97.31,97.33,97.33,97.45,97.61,97.59,97.6,97.96,98.36,98.36,98.51,98.77,98.78,98.89,98.86,99.04,99.09,99.1,99.12,99.37,99.46,99.6,99.88,99.88,100.01,100.02,100.19,100.2,100.35,100.47,100.58,101.4,101.67,101.82,101.85,101.98,102.06,102.16,102.2,102.35,102.47,102.55,102.62,102.8,102.87,102.94,102.95,102.94,103.05,103.09,103.1,103.13,103.19,103.36,103.42) > 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,] 95.83 96.71 97.96 99.37 101.40 102.80 NA [2,] 95.87 96.87 98.36 99.46 101.67 102.87 NA [3,] 96.06 96.99 98.36 99.60 101.82 102.94 NA [4,] 96.06 97.10 98.51 99.88 101.85 102.95 NA [5,] 96.15 97.26 98.77 99.88 101.98 102.94 NA [6,] 96.26 97.31 98.78 100.01 102.06 103.05 NA [7,] 96.28 97.33 98.89 100.02 102.16 103.09 NA [8,] 96.36 97.33 98.86 100.19 102.20 103.10 NA [9,] 96.38 97.45 99.04 100.20 102.35 103.13 NA [10,] 96.43 97.61 99.09 100.35 102.47 103.19 NA [11,] 96.47 97.59 99.10 100.47 102.55 103.36 NA [12,] 96.55 97.60 99.12 100.58 102.62 103.42 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.04 0.16 0.40 0.09 0.27 0.07 NA [2,] 0.19 0.12 0.00 0.14 0.15 0.07 NA [3,] 0.00 0.11 0.15 0.28 0.03 0.01 NA [4,] 0.09 0.16 0.26 0.00 0.13 -0.01 NA [5,] 0.11 0.05 0.01 0.13 0.08 0.11 NA [6,] 0.02 0.02 0.11 0.01 0.10 0.04 NA [7,] 0.08 0.00 -0.03 0.17 0.04 0.01 NA [8,] 0.02 0.12 0.18 0.01 0.15 0.03 NA [9,] 0.05 0.16 0.05 0.15 0.12 0.06 NA [10,] 0.04 -0.02 0.01 0.12 0.08 0.17 NA [11,] 0.08 0.01 0.02 0.11 0.07 0.06 NA [12,] 0.16 0.36 0.25 0.82 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/1k9us1476379008.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/2pypj1476379008.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/3sb9k1476379008.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/4dort1476379008.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] [1,] 95.830 95.87 96.06 96.060 96.150 96.260 96.280 96.360 96.38 [2,] 96.710 96.87 96.99 97.100 97.260 97.310 97.330 97.330 97.45 [3,] 98.665 98.91 98.98 99.195 99.325 99.395 99.455 99.525 99.62 [4,] 101.400 101.67 101.82 101.850 101.980 102.060 102.160 102.200 102.35 [5,] 102.800 102.87 102.94 102.950 102.940 103.050 103.090 103.100 103.13 [,10] [,11] [,12] [1,] 96.43 96.470 96.55 [2,] 97.61 97.590 97.60 [3,] 99.72 99.785 99.85 [4,] 102.47 102.550 102.62 [5,] 103.19 103.360 103.42 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 95.6398 95.81384 95.86449 96.1311 96.28045 96.3311 96.33949 [2,] 101.6902 102.00616 102.09551 102.2589 102.36955 102.4589 102.57051 [,8] [,9] [,10] [,11] [,12] [1,] 96.38369 96.45934 96.58514 96.58564 96.61194 [2,] 102.66631 102.78066 102.85486 102.98436 103.08806 $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(95.83, 96.71, 98.665, 101.4, 102.8, 95.87, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/51u4z1476379008.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.040 0.00 0.00 -0.01 0.010 0.01 -0.030 0.010 0.05 -0.02 0.010 0.16 [2,] 0.070 0.07 0.01 0.00 0.050 0.02 0.000 0.020 0.05 0.01 0.020 0.18 [3,] 0.125 0.13 0.07 0.11 0.095 0.03 0.025 0.075 0.09 0.06 0.065 0.25 [4,] 0.270 0.15 0.15 0.16 0.110 0.10 0.080 0.150 0.15 0.12 0.080 0.36 [5,] 0.400 0.19 0.28 0.26 0.130 0.11 0.170 0.180 0.16 0.17 0.110 0.36 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.00400646 0.07839742 -0.02030452 0.006794832 0.05629806 -0.02160258 [2,] 0.25400646 0.18160258 0.16030452 0.213205168 0.13370194 0.08160258 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.02660258 -0.008854199 0.02549677 -0.01095355 0.02629806 0.1228125 [2,] 0.07660258 0.158854199 0.15450323 0.13095355 0.10370194 0.3771875 $out [1] 0.82 $group [1] 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0.0400000000000063, 0.0700000000000074, 0.125, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6ovmz1476379008.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,] 95.830 96.710 97.960 99.370 101.400 102.80 NA [2,] 96.060 97.045 98.435 99.740 101.835 102.94 NA [3,] 96.270 97.320 98.820 100.015 102.110 103.07 NA [4,] 96.405 97.520 99.065 100.275 102.410 103.16 NA [5,] 96.550 97.610 99.120 100.580 102.620 103.42 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 96.11264 97.10335 98.53265 99.77098 101.8477 102.9697 NA [2,] 96.42736 97.53665 99.10735 100.25902 102.3723 103.1703 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(95.83, 96.06, 96.27, 96.405, 96.55, 96.71, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/73l0v1476379008.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.01167 98.6650 98.95750 [2,] 99.34333 99.0875 99.35187 [3,] 99.60333 99.4250 99.64250 [4,] 99.80750 99.6700 99.89500 [5,] 99.98167 99.8500 100.04500 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 99.39162 99.15932 99.39478 [2,] 99.81504 99.69068 99.89022 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(99.0116666666667, 99.3433333333333, 99.6033333333333, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1k9us1476379008.ps tmp/1k9us1476379008.png",intern=TRUE)) character(0) > try(system("convert tmp/2pypj1476379008.ps tmp/2pypj1476379008.png",intern=TRUE)) character(0) > try(system("convert tmp/3sb9k1476379008.ps tmp/3sb9k1476379008.png",intern=TRUE)) character(0) > try(system("convert tmp/4dort1476379008.ps tmp/4dort1476379008.png",intern=TRUE)) character(0) > try(system("convert tmp/51u4z1476379008.ps tmp/51u4z1476379008.png",intern=TRUE)) character(0) > try(system("convert tmp/6ovmz1476379008.ps tmp/6ovmz1476379008.png",intern=TRUE)) character(0) > try(system("convert tmp/73l0v1476379008.ps tmp/73l0v1476379008.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.435 0.165 2.645