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(79.92,80.26,80.69,84.5,85.45,85.87,85.98,86.06,86.19,86.37,86.4,86.43,86.43,86.73,86.84,90.99,92.61,93.27,93.47,93.83,94.01,94.2,94.3,94.53,94.59,94.67,94.69,96.55,97.14,97.32,97.97,98.49,98.76,99.09,99.11,99.17,99.17,99.2,99.54,99.59,99.61,99.68,99.68,99.96,100,100.12,100.38,100.39,100.39,100.75,100.79,100.99,101.03,101.22,101.37,101.38,101.45,101.52,101.84,101.99,104.05,104.49,104.5,104.59,104.61,104.61,104.71,104.8,104.81,104.83,105.06,105.4) > 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,] 79.92 86.43 94.59 99.17 100.39 104.05 NA [2,] 80.26 86.73 94.67 99.20 100.75 104.49 NA [3,] 80.69 86.84 94.69 99.54 100.79 104.50 NA [4,] 84.50 90.99 96.55 99.59 100.99 104.59 NA [5,] 85.45 92.61 97.14 99.61 101.03 104.61 NA [6,] 85.87 93.27 97.32 99.68 101.22 104.61 NA [7,] 85.98 93.47 97.97 99.68 101.37 104.71 NA [8,] 86.06 93.83 98.49 99.96 101.38 104.80 NA [9,] 86.19 94.01 98.76 100.00 101.45 104.81 NA [10,] 86.37 94.20 99.09 100.12 101.52 104.83 NA [11,] 86.40 94.30 99.11 100.38 101.84 105.06 NA [12,] 86.43 94.53 99.17 100.39 101.99 105.40 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.34 0.30 0.08 0.03 0.36 0.44 NA [2,] 0.43 0.11 0.02 0.34 0.04 0.01 NA [3,] 3.81 4.15 1.86 0.05 0.20 0.09 NA [4,] 0.95 1.62 0.59 0.02 0.04 0.02 NA [5,] 0.42 0.66 0.18 0.07 0.19 0.00 NA [6,] 0.11 0.20 0.65 0.00 0.15 0.10 NA [7,] 0.08 0.36 0.52 0.28 0.01 0.09 NA [8,] 0.13 0.18 0.27 0.04 0.07 0.01 NA [9,] 0.18 0.19 0.33 0.12 0.07 0.02 NA [10,] 0.03 0.10 0.02 0.26 0.32 0.23 NA [11,] 0.03 0.23 0.06 0.01 0.15 0.34 NA [12,] 0.00 0.06 0.00 0.00 2.06 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/1bmeu1489162321.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/28aa51489162321.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/3tqlb1489162321.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/4pgx51489162321.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,] 79.92 80.260 80.690 84.50 85.450 85.87 85.980 86.060 86.19 [2,] 86.43 86.730 86.840 90.99 92.610 93.27 93.470 93.830 94.01 [3,] 96.88 96.935 97.115 98.07 98.375 98.50 98.825 99.225 99.38 [4,] 100.39 100.750 100.790 100.99 101.030 101.22 101.370 101.380 101.45 [5,] 104.05 104.490 104.500 104.59 104.610 104.61 104.710 104.800 104.81 [,10] [,11] [,12] [1,] 86.370 86.400 86.43 [2,] 94.200 94.300 94.53 [3,] 99.605 99.745 99.78 [4,] 101.520 101.840 101.99 [5,] 104.830 105.060 105.40 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 87.87535 87.89165 88.1168 91.61968 92.94383 93.37199 93.72924 [2,] 105.88465 105.97835 106.1132 104.52032 103.80617 103.62801 103.92076 [,8] [,9] [,10] [,11] [,12] [1,] 94.35501 94.58096 94.88336 94.88146 94.96806 [2,] 104.09499 104.17904 104.32664 104.60854 104.59194 $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(79.92, 86.43, 96.88, 100.39, 104.05, 80.26, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/55ijh1489162321.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.03 0.010 0.05 0.020 0.000 0.00 0.010 0.01 0.02 0.020 0.010 0.00 [2,] 0.08 0.020 0.09 0.020 0.070 0.10 0.080 0.04 0.07 0.030 0.030 0.00 [3,] 0.32 0.075 1.03 0.315 0.185 0.13 0.185 0.10 0.15 0.165 0.105 0.00 [4,] 0.36 0.340 3.81 0.950 0.420 0.20 0.360 0.18 0.19 0.260 0.230 0.06 [5,] 0.44 0.430 4.15 1.620 0.660 0.20 0.520 0.27 0.33 0.320 0.340 0.06 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.139391 -0.1314103 -1.36952 -0.28488 -0.0407613 0.06549677 0.004390956 [2,] 0.500609 0.2814103 3.42952 0.91488 0.4107613 0.19450323 0.365609044 [,8] [,9] [,10] [,11] [,12] [1,] 0.009695478 0.07259612 0.01664257 -0.02400646 -0.04239585 [2,] 0.190304522 0.22740388 0.31335743 0.23400646 0.04239585 $out [1] 0.65 2.06 $group [1] 6 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0.0300000000000011, 0.0799999999999983, 0.32, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/607731489162321.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,] 79.920 86.430 94.590 99.170 100.390 104.490 NA [2,] 82.595 88.915 95.620 99.565 100.890 104.545 NA [3,] 85.925 93.370 97.645 99.680 101.295 104.660 NA [4,] 86.280 94.105 98.925 100.060 101.485 104.820 NA [5,] 86.430 94.530 99.170 100.390 101.990 105.060 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 84.24425 91.00281 96.13757 99.45423 101.0236 104.5346 NA [2,] 87.60575 95.73719 99.15243 99.90577 101.5664 104.7854 NA $out [1] 104.05 105.40 $group [1] 6 6 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(79.92, 82.595, 85.925, 86.28, 86.43, 86.43, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7g6es1489162321.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,] 94.09167 96.8800 94.27750 [2,] 95.35500 97.5925 95.57500 [3,] 97.09583 98.6625 97.66500 [4,] 97.61250 99.4925 98.21938 [5,] 97.98500 99.7800 98.64000 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 96.06617 97.7959 96.45888 [2,] 98.12549 99.5291 98.87112 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(94.0916666666667, 95.355, 97.0958333333333, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1bmeu1489162321.ps tmp/1bmeu1489162321.png",intern=TRUE)) character(0) > try(system("convert tmp/28aa51489162321.ps tmp/28aa51489162321.png",intern=TRUE)) character(0) > try(system("convert tmp/3tqlb1489162321.ps tmp/3tqlb1489162321.png",intern=TRUE)) character(0) > try(system("convert tmp/4pgx51489162321.ps tmp/4pgx51489162321.png",intern=TRUE)) character(0) > try(system("convert tmp/55ijh1489162321.ps tmp/55ijh1489162321.png",intern=TRUE)) character(0) > try(system("convert tmp/607731489162321.ps tmp/607731489162321.png",intern=TRUE)) character(0) > try(system("convert tmp/7g6es1489162321.ps tmp/7g6es1489162321.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.528 0.232 4.118