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(75.99,76.31,76.51,76.75,77.23,77.22,77.25,77.36,77.57,77.88,78.29,78.42,78.96,79.85,80.05,80.16,80.29,80.36,80.48,80.95,82.3,84.81,85.4,86.13,87.02,87.38,87.5,87.91,88.06,88.09,88.16,88.33,88.52,88.96,89.26,89.34,89.09,89.25,89.31,89.28,89.32,89.47,89.59,89.62,89.71,89.9,90.04,90.05,90.18,90.5,90.63,90.75,90.76,90.67,90.5,90.8,91.22,92.19,92.51,92.67,93.75,94.1,94.96,95.21,95.33,95.43,95.44,95.64,95.8,95.87,95.98,96.07,96.23,96.32,96.55,96.73,96.61,96.64,96.86,97.02,97.22,98.1,98.46,98.6,98.78,99.13,99.48,99.62,99.68,99.95,100.12,100.25,100.47,100.7,100.88,100.95,100.92,101.12,101.19,101.28,101.28,101.3,101.3,101.36,101.45,101.58,101.73,101.84,102.01,102.14,102.16,102.32,102.41,102.4,102.43,102.42,102.3,102.65,102.72,102.86) > 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] 120 > (np <- floor(n / par1)) [1] 10 > 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] 10 10 10 10 10 10 10 10 10 10 10 10 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] 75.99 78.96 87.02 89.09 90.18 93.75 96.23 98.78 100.92 102.01 NA [2,] 76.31 79.85 87.38 89.25 90.50 94.10 96.32 99.13 101.12 102.14 NA [3,] 76.51 80.05 87.50 89.31 90.63 94.96 96.55 99.48 101.19 102.16 NA [4,] 76.75 80.16 87.91 89.28 90.75 95.21 96.73 99.62 101.28 102.32 NA [5,] 77.23 80.29 88.06 89.32 90.76 95.33 96.61 99.68 101.28 102.41 NA [6,] 77.22 80.36 88.09 89.47 90.67 95.43 96.64 99.95 101.30 102.40 NA [7,] 77.25 80.48 88.16 89.59 90.50 95.44 96.86 100.12 101.30 102.43 NA [8,] 77.36 80.95 88.33 89.62 90.80 95.64 97.02 100.25 101.36 102.42 NA [9,] 77.57 82.30 88.52 89.71 91.22 95.80 97.22 100.47 101.45 102.30 NA [10,] 77.88 84.81 88.96 89.90 92.19 95.87 98.10 100.70 101.58 102.65 NA [11,] 78.29 85.40 89.26 90.04 92.51 95.98 98.46 100.88 101.73 102.72 NA [12,] 78.42 86.13 89.34 90.05 92.67 96.07 98.60 100.95 101.84 102.86 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] 0.32 0.89 0.36 0.16 0.32 0.35 0.09 0.35 0.20 0.13 NA [2,] 0.20 0.20 0.12 0.06 0.13 0.86 0.23 0.35 0.07 0.02 NA [3,] 0.24 0.11 0.41 -0.03 0.12 0.25 0.18 0.14 0.09 0.16 NA [4,] 0.48 0.13 0.15 0.04 0.01 0.12 -0.12 0.06 0.00 0.09 NA [5,] -0.01 0.07 0.03 0.15 -0.09 0.10 0.03 0.27 0.02 -0.01 NA [6,] 0.03 0.12 0.07 0.12 -0.17 0.01 0.22 0.17 0.00 0.03 NA [7,] 0.11 0.47 0.17 0.03 0.30 0.20 0.16 0.13 0.06 -0.01 NA [8,] 0.21 1.35 0.19 0.09 0.42 0.16 0.20 0.22 0.09 -0.12 NA [9,] 0.31 2.51 0.44 0.19 0.97 0.07 0.88 0.23 0.13 0.35 NA [10,] 0.41 0.59 0.30 0.14 0.32 0.11 0.36 0.18 0.15 0.07 NA [11,] 0.13 0.73 0.08 0.01 0.16 0.09 0.14 0.07 0.11 0.14 NA [12,] 0.54 0.89 -0.25 0.13 1.08 0.16 0.18 -0.03 0.17 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/1i0am1476802572.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/2et201476802572.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/3zs4v1476802572.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/4f5s41476802572.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,] 75.990 76.31 76.510 76.75 77.230 77.22 77.25 77.36 77.57 77.88 [2,] 87.020 87.38 87.500 87.91 88.060 88.09 88.16 88.33 88.52 88.96 [3,] 91.965 92.30 92.795 92.98 93.045 93.05 92.97 93.22 93.51 94.03 [4,] 98.780 99.13 99.480 99.62 99.680 99.95 100.12 100.25 100.47 100.70 [5,] 102.010 102.14 102.160 102.32 102.410 102.40 102.43 102.42 102.30 102.65 [,11] [,12] [1,] 78.290 78.42 [2,] 89.260 89.34 [3,] 94.245 94.37 [4,] 100.880 100.95 [5,] 102.720 102.86 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 86.08924 86.42923 86.80931 87.12922 87.23918 87.12427 86.99431 87.26429 [2,] 97.84076 98.17077 98.78069 98.83078 98.85082 98.97573 98.94569 99.17571 [,9] [,10] [,11] [,12] [1,] 87.5393 88.16423 88.43918 88.56918 [2,] 99.4807 99.89577 100.05082 100.17082 $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(75.99, 87.02, 91.965, 98.78, 102.01, 76.31, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5l5hd1476802572.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.09 0.020 -0.03 -0.120 -0.09 0.00 -0.010 0.090 0.07 0.07 0.01 -0.25 [2,] 0.16 0.070 0.11 0.010 -0.01 0.01 0.060 0.090 0.19 0.14 0.08 0.13 [3,] 0.32 0.165 0.15 0.075 0.03 0.05 0.145 0.195 0.33 0.24 0.12 0.17 [4,] 0.35 0.230 0.24 0.130 0.10 0.12 0.200 0.220 0.88 0.36 0.14 0.54 [5,] 0.36 0.350 0.41 0.150 0.15 0.22 0.300 0.220 0.97 0.59 0.16 1.08 $n [1] 10 10 10 10 10 10 10 10 10 10 10 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.2250684 0.08505762 0.08504682 0.01504322 -0.02496039 -0.004960386 [2,] 0.4149316 0.24494238 0.21495318 0.13495678 0.08496039 0.104960386 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0.07505042 0.1300468 -0.01475151 0.1300792 0.09002161 -0.04593333 [2,] 0.21494958 0.2599532 0.67475151 0.3499208 0.14997839 0.38593333 $out [1] 0.89 0.86 0.48 0.27 -0.17 0.47 1.35 0.42 -0.12 2.51 0.73 $group [1] 1 2 4 5 6 7 8 8 8 9 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0.0899999999999892, 0.159999999999997, 0.32, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6zxn11476802572.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] [,9] [,10] [1,] 75.990 78.960 87.020 89.090 90.180 94.100 96.230 98.780 100.920 102.010 [2,] 76.630 80.105 87.705 89.295 90.565 95.085 96.580 99.550 101.235 102.230 [3,] 77.240 80.420 88.125 89.530 90.755 95.435 96.795 100.035 101.300 102.405 [4,] 77.725 83.555 88.740 89.805 91.705 95.835 97.660 100.585 101.515 102.540 [5,] 78.420 86.130 89.340 90.050 92.670 96.070 98.600 100.950 101.840 102.860 [,11] [1,] NA [2,] NA [3,] NA [4,] NA [5,] NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 76.74056 78.84643 87.65293 89.29739 90.23504 95.09292 96.3024 99.56293 [2,] 77.73944 81.99357 88.59707 89.76261 91.27496 95.77708 97.2876 100.50707 [,9] [,10] [,11] [1,] 101.1723 102.2636 NA [2,] 101.4277 102.5464 NA $out [1] 93.75 $group [1] 6 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(75.99, 76.63, 77.24, 77.725, 78.42, 78.96, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7p0zt1476802572.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,] 91.2930 91.9650 92.8400 [2,] 91.9175 92.8825 93.4625 [3,] 92.1830 93.0475 93.8450 [4,] 92.9600 93.7700 94.4300 [5,] 93.6930 94.3700 94.9400 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 91.70751 92.64271 93.40372 [2,] 92.65849 93.45229 94.28628 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(91.293, 91.9175, 92.183, 92.96, 93.693, 91.965, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1i0am1476802572.ps tmp/1i0am1476802572.png",intern=TRUE)) character(0) > try(system("convert tmp/2et201476802572.ps tmp/2et201476802572.png",intern=TRUE)) character(0) > try(system("convert tmp/3zs4v1476802572.ps tmp/3zs4v1476802572.png",intern=TRUE)) character(0) > try(system("convert tmp/4f5s41476802572.ps tmp/4f5s41476802572.png",intern=TRUE)) character(0) > try(system("convert tmp/5l5hd1476802572.ps tmp/5l5hd1476802572.png",intern=TRUE)) character(0) > try(system("convert tmp/6zxn11476802572.ps tmp/6zxn11476802572.png",intern=TRUE)) character(0) > try(system("convert tmp/7p0zt1476802572.ps tmp/7p0zt1476802572.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.579 0.175 2.804