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.65,92.68,92.70,92.73,92.80,92.86,93.02,93.02,93.04,93.09,93.11,93.11,93.20,93.21,93.22,93.23,93.29,93.42,93.43,93.45,93.45,93.49,93.50,93.56,93.68,93.70,94.01,94.07,94.33,94.43,94.47,95.35,95.37,95.46,95.83,96.00,96.85,97.84,98.38,98.90,99.51,99.93,99.95,101.40,101.56,101.65,101.70,101.91,101.91,102.29,102.33,102.44,102.57,102.59,102.84,102.88,103.04,103.16,103.20,103.23,103.27,103.31,103.59,104.35,104.55,104.60,104.67,104.93,105.08,105.15,109.25,109.82) > 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.65 93.20 93.68 96.85 101.91 103.27 NA [2,] 92.68 93.21 93.70 97.84 102.29 103.31 NA [3,] 92.70 93.22 94.01 98.38 102.33 103.59 NA [4,] 92.73 93.23 94.07 98.90 102.44 104.35 NA [5,] 92.80 93.29 94.33 99.51 102.57 104.55 NA [6,] 92.86 93.42 94.43 99.93 102.59 104.60 NA [7,] 93.02 93.43 94.47 99.95 102.84 104.67 NA [8,] 93.02 93.45 95.35 101.40 102.88 104.93 NA [9,] 93.04 93.45 95.37 101.56 103.04 105.08 NA [10,] 93.09 93.49 95.46 101.65 103.16 105.15 NA [11,] 93.11 93.50 95.83 101.70 103.20 109.25 NA [12,] 93.11 93.56 96.00 101.91 103.23 109.82 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.97 0.01 0.02 0.99 0.38 0.04 NA [2,] 0.02 0.01 0.31 0.54 0.04 0.28 NA [3,] 0.03 0.01 0.06 0.52 0.11 0.76 NA [4,] 0.07 0.06 0.26 0.61 0.13 0.20 NA [5,] 0.06 0.13 0.10 0.42 0.02 0.05 NA [6,] 0.16 0.01 0.04 0.02 0.25 0.07 NA [7,] 0.00 0.02 0.88 1.45 0.04 0.26 NA [8,] 0.02 0.00 0.02 0.16 0.16 0.15 NA [9,] 0.05 0.04 0.09 0.09 0.12 0.07 NA [10,] 0.02 0.01 0.37 0.05 0.04 4.10 NA [11,] 0.00 0.06 0.17 0.21 0.03 0.57 NA [12,] 0.09 0.12 0.85 0.00 0.04 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/1jz8t1489398714.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/2o4nr1489398714.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/3gzil1489398714.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/4wvpf1489398714.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,] 93.200 92.68 92.700 92.730 92.80 92.86 93.02 93.020 93.040 [2,] 93.650 93.21 93.220 93.230 93.29 93.42 93.43 93.450 93.450 [3,] 95.265 95.77 96.195 96.485 96.92 97.18 97.21 98.375 98.465 [4,] 101.910 102.29 102.330 102.440 102.57 102.59 102.84 102.880 103.040 [5,] 103.270 103.31 103.590 104.350 104.55 104.60 104.67 104.930 105.080 [,10] [,11] [,12] [1,] 93.090 93.110 93.110 [2,] 93.490 93.500 93.560 [3,] 98.555 98.765 98.955 [4,] 103.160 103.200 103.230 [5,] 105.150 109.250 109.820 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 89.93703 89.91311 90.31876 90.54425 90.9341 91.26505 91.14025 [2,] 100.59297 101.62689 102.07124 102.42575 102.9059 103.09495 103.27975 [,8] [,9] [,10] [,11] [,12] [1,] 92.29235 92.27914 92.31754 92.50819 92.71754 [2,] 104.45765 104.65086 104.79246 105.02181 105.19246 $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.2, 93.65, 95.265, 101.91, 103.27, 92.68, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/55mgo1489398714.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.01 0.010 0.060 0.02 0.010 0.00 0.000 0.04 0.010 0.000 0.00 [2,] 0.01 0.02 0.030 0.070 0.05 0.020 0.02 0.020 0.05 0.020 0.030 0.04 [3,] 0.03 0.16 0.085 0.165 0.08 0.055 0.15 0.085 0.08 0.045 0.115 0.09 [4,] 0.38 0.31 0.520 0.260 0.13 0.160 0.88 0.160 0.09 0.370 0.210 0.12 [5,] 0.38 0.54 0.760 0.260 0.13 0.250 1.45 0.160 0.12 0.370 0.210 0.12 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.208662 -0.02705937 -0.2310658 0.04244386 0.02839742 -0.03530452 [2,] 0.268662 0.34705937 0.4010658 0.28755614 0.13160258 0.14530452 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.4047278 -0.005304522 0.05419871 -0.1807613 -0.001105814 0.0334722 [2,] 0.7047278 0.175304522 0.10580129 0.2707613 0.231105814 0.1465278 $out [1] -0.97 0.99 0.61 0.42 4.10 0.57 0.85 $group [1] 1 1 4 5 10 11 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0.00999999999999091, 0.00999999999999091, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6l4311489398714.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,] 92.680 93.200 93.680 96.850 101.910 103.270 NA [2,] 92.765 93.225 94.040 98.640 102.385 103.970 NA [3,] 93.020 93.425 94.450 99.940 102.715 104.635 NA [4,] 93.100 93.470 95.415 101.605 103.100 105.115 NA [5,] 93.110 93.560 96.000 101.910 103.230 105.150 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 92.8672 93.31325 93.82285 98.58764 102.3889 104.1128 NA [2,] 93.1728 93.53675 95.07715 101.29236 103.0411 105.1572 NA $out [1] 93.65 109.25 109.82 $group [1] 1 6 6 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(92.68, 92.765, 93.02, 93.1, 93.11, 93.2, 93.225, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/72czt1489398714.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.09333 95.265 97.15125 [2,] 97.49583 96.340 97.43875 [3,] 98.01750 97.195 97.85125 [4,] 98.62833 98.510 98.34125 [5,] 99.60500 98.955 98.53500 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 97.50096 96.20525 97.43961 [2,] 98.53404 98.18475 98.26289 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(97.0933333333333, 97.4958333333333, 98.0175, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1jz8t1489398714.ps tmp/1jz8t1489398714.png",intern=TRUE)) character(0) > try(system("convert tmp/2o4nr1489398714.ps tmp/2o4nr1489398714.png",intern=TRUE)) character(0) > try(system("convert tmp/3gzil1489398714.ps tmp/3gzil1489398714.png",intern=TRUE)) character(0) > try(system("convert tmp/4wvpf1489398714.ps tmp/4wvpf1489398714.png",intern=TRUE)) character(0) > try(system("convert tmp/55mgo1489398714.ps tmp/55mgo1489398714.png",intern=TRUE)) character(0) > try(system("convert tmp/6l4311489398714.ps tmp/6l4311489398714.png",intern=TRUE)) character(0) > try(system("convert tmp/72czt1489398714.ps tmp/72czt1489398714.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.508 0.158 2.726