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(93.55,94.11,94.47,94.38,94.42,94.39,94.42,94.34,94.59,94.63,94.84,94.98,95.19,95.76,96.08,96.04,96.2,96.31,96.3,96.29,96.46,96.66,96.83,97,97.1,97.33,97.31,97.16,97.4,97.4,97.52,97.77,98,98.2,98.48,98.53,98.71,99.03,99.52,99.65,99.98,99.94,100.12,100.17,100.38,100.75,100.84,100.91,100.9,101.15,101.4,101.39,101.55,101.73,101.7,101.65,101.73,101.53,101.58,101.58,101.71,101.71,101.98,101.99,101.95,102.11,102.28,102.32,102.18,102.14,102.29,102.33) > 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,] 93.55 95.19 97.10 98.71 100.90 101.71 NA [2,] 94.11 95.76 97.33 99.03 101.15 101.71 NA [3,] 94.47 96.08 97.31 99.52 101.40 101.98 NA [4,] 94.38 96.04 97.16 99.65 101.39 101.99 NA [5,] 94.42 96.20 97.40 99.98 101.55 101.95 NA [6,] 94.39 96.31 97.40 99.94 101.73 102.11 NA [7,] 94.42 96.30 97.52 100.12 101.70 102.28 NA [8,] 94.34 96.29 97.77 100.17 101.65 102.32 NA [9,] 94.59 96.46 98.00 100.38 101.73 102.18 NA [10,] 94.63 96.66 98.20 100.75 101.53 102.14 NA [11,] 94.84 96.83 98.48 100.84 101.58 102.29 NA [12,] 94.98 97.00 98.53 100.91 101.58 102.33 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.56 0.57 0.23 0.32 0.25 0.00 NA [2,] 0.36 0.32 -0.02 0.49 0.25 0.27 NA [3,] -0.09 -0.04 -0.15 0.13 -0.01 0.01 NA [4,] 0.04 0.16 0.24 0.33 0.16 -0.04 NA [5,] -0.03 0.11 0.00 -0.04 0.18 0.16 NA [6,] 0.03 -0.01 0.12 0.18 -0.03 0.17 NA [7,] -0.08 -0.01 0.25 0.05 -0.05 0.04 NA [8,] 0.25 0.17 0.23 0.21 0.08 -0.14 NA [9,] 0.04 0.20 0.20 0.37 -0.20 -0.04 NA [10,] 0.21 0.17 0.28 0.09 0.05 0.15 NA [11,] 0.14 0.17 0.05 0.07 0.00 0.04 NA [12,] 0.21 0.10 0.18 -0.01 0.13 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/1fdjl1489501122.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/2e6tx1489501122.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/3mogf1489501122.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/4zxz91489501122.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,] 93.550 94.11 94.470 94.380 94.42 94.39 94.42 94.34 94.59 94.630 [2,] 95.190 95.76 96.080 96.040 96.20 96.31 96.30 96.29 96.46 96.660 [3,] 97.905 98.18 98.415 98.405 98.69 98.67 98.82 98.97 99.19 99.475 [4,] 100.900 101.15 101.400 101.390 101.55 101.73 101.70 101.65 101.73 101.530 [5,] 101.710 101.71 101.980 101.990 101.95 102.11 102.28 102.32 102.18 102.140 [,11] [,12] [1,] 94.84 94.98 [2,] 96.83 97.00 [3,] 99.66 99.72 [4,] 101.58 101.58 [5,] 102.29 102.33 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 94.22187 94.70328 94.98343 94.95408 95.23908 95.17392 95.33683 [2,] 101.58813 101.65672 101.84657 101.85592 102.14092 102.16608 102.30317 [,8] [,9] [,10] [,11] [,12] [1,] 95.51263 95.79068 96.33369 96.5961 96.76575 [2,] 102.42737 102.58932 102.61631 102.7239 102.67425 $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(93.55, 95.19, 97.905, 100.9, 101.71, 94.11, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5ye271489501122.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] [1,] 0.000 0.250 -0.150 -0.04 -0.040 -0.030 -0.080 -0.14 -0.20 0.05 0.00 [2,] 0.230 0.250 -0.090 0.04 -0.030 -0.010 -0.050 0.08 -0.04 0.09 0.04 [3,] 0.285 0.295 -0.025 0.16 0.055 0.075 0.015 0.19 0.12 0.16 0.06 [4,] 0.560 0.360 0.010 0.24 0.160 0.170 0.050 0.23 0.20 0.21 0.14 [5,] 0.570 0.490 0.130 0.33 0.180 0.180 0.050 0.25 0.37 0.28 0.17 [,12] [1,] -0.01 [2,] 0.10 [3,] 0.13 [4,] 0.18 [5,] 0.21 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.07213934 0.2240464 -0.08950323 0.03099354 -0.06755614 -0.04110581 [2,] 0.49786066 0.3659536 0.03950323 0.28900646 0.17755614 0.19110581 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.04950323 0.09324516 -0.03480775 0.08259612 -0.00450323 0.0734722 [2,] 0.07950323 0.28675484 0.27480775 0.23740388 0.12450323 0.1865278 $out [1] -0.02 0.25 $group [1] 2 7 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0, 0.230000000000004, 0.285000000000004, 0.560000000000002, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6t50v1489501122.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,] 94.11 95.760 97.10 98.710 101.150 101.710 NA [2,] 94.36 96.060 97.32 99.585 101.395 101.965 NA [3,] 94.42 96.295 97.46 100.050 101.565 102.125 NA [4,] 94.61 96.560 98.10 100.565 101.675 102.285 NA [5,] 94.98 97.000 98.53 100.910 101.730 102.330 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 94.30597 96.06695 97.10424 99.60302 101.4373 101.979 NA [2,] 94.53403 96.52305 97.81576 100.49698 101.6927 102.271 NA $out [1] 93.55 95.19 100.90 $group [1] 1 2 5 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(94.11, 94.36, 94.42, 94.61, 94.98, 95.76, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7hjxu1489501122.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.86000 97.9050 98.01000 [2,] 98.44750 98.4100 98.64812 [3,] 98.68500 98.7550 98.94375 [4,] 98.93750 99.3325 99.15438 [5,] 99.22167 99.7200 99.39750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 98.46151 98.33424 98.71285 [2,] 98.90849 99.17576 99.17465 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(97.86, 98.4475, 98.685, 98.9375, 99.2216666666667, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1fdjl1489501122.ps tmp/1fdjl1489501122.png",intern=TRUE)) character(0) > try(system("convert tmp/2e6tx1489501122.ps tmp/2e6tx1489501122.png",intern=TRUE)) character(0) > try(system("convert tmp/3mogf1489501122.ps tmp/3mogf1489501122.png",intern=TRUE)) character(0) > try(system("convert tmp/4zxz91489501122.ps tmp/4zxz91489501122.png",intern=TRUE)) character(0) > try(system("convert tmp/5ye271489501122.ps tmp/5ye271489501122.png",intern=TRUE)) character(0) > try(system("convert tmp/6t50v1489501122.ps tmp/6t50v1489501122.png",intern=TRUE)) character(0) > try(system("convert tmp/7hjxu1489501122.ps tmp/7hjxu1489501122.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.838 0.222 3.164