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(94.72,95.76,96.14,97.11,97.19,97.43,97.43,97.56,97.66,97.75,97.82,97.82,97.82,98.35,98.19,98.19,98.21,98.22,98.26,98.23,98.26,98.5,98.51,98.51,98.51,98.89,99.55,99.9,100.12,100.09,100.09,100.09,100.46,100.71,100.79,100.79,100.93,101.15,101.53,101.91,102.18,102.24,102.2,102.32,102.43,102.45,102.84,102.96,102.96,103.1,103.4,103.74,103.97,104.29,104.33,104.46,104.9,105.31,105.63,105.68,105.87,106.34,106.6,107.1,107.06,107.4,107.4,107.43,107.75,107.84,107.97,108.04) > 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,] 94.72 97.82 98.51 100.93 102.96 105.87 NA [2,] 95.76 98.35 98.89 101.15 103.10 106.34 NA [3,] 96.14 98.19 99.55 101.53 103.40 106.60 NA [4,] 97.11 98.19 99.90 101.91 103.74 107.10 NA [5,] 97.19 98.21 100.12 102.18 103.97 107.06 NA [6,] 97.43 98.22 100.09 102.24 104.29 107.40 NA [7,] 97.43 98.26 100.09 102.20 104.33 107.40 NA [8,] 97.56 98.23 100.09 102.32 104.46 107.43 NA [9,] 97.66 98.26 100.46 102.43 104.90 107.75 NA [10,] 97.75 98.50 100.71 102.45 105.31 107.84 NA [11,] 97.82 98.51 100.79 102.84 105.63 107.97 NA [12,] 97.82 98.51 100.79 102.96 105.68 108.04 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1.04 0.53 0.38 0.22 0.14 0.47 NA [2,] 0.38 -0.16 0.66 0.38 0.30 0.26 NA [3,] 0.97 0.00 0.35 0.38 0.34 0.50 NA [4,] 0.08 0.02 0.22 0.27 0.23 -0.04 NA [5,] 0.24 0.01 -0.03 0.06 0.32 0.34 NA [6,] 0.00 0.04 0.00 -0.04 0.04 0.00 NA [7,] 0.13 -0.03 0.00 0.12 0.13 0.03 NA [8,] 0.10 0.03 0.37 0.11 0.44 0.32 NA [9,] 0.09 0.24 0.25 0.02 0.41 0.09 NA [10,] 0.07 0.01 0.08 0.39 0.32 0.13 NA [11,] 0.00 0.00 0.00 0.12 0.05 0.07 NA [12,] 0.00 0.00 0.14 0.00 0.19 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/1zr5s1489519720.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/2lahr1489519720.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/362us1489519720.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/4dkrv1489519720.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,] 94.72 95.76 96.14 97.110 97.19 97.430 97.430 97.560 97.660 97.75 [2,] 97.82 98.35 98.19 98.190 98.21 98.220 98.260 98.230 98.260 98.50 [3,] 99.72 100.02 100.54 100.905 101.15 101.165 101.145 101.205 101.445 101.58 [4,] 102.96 103.10 103.40 103.740 103.97 104.290 104.330 104.460 104.900 105.31 [5,] 105.87 106.34 106.60 107.100 107.06 107.400 107.400 107.430 107.750 107.84 [,11] [,12] [1,] 97.820 97.820 [2,] 98.510 98.510 [3,] 101.815 101.875 [4,] 105.630 105.680 [5,] 107.970 108.040 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 96.40453 96.9561 97.17938 97.32507 97.43461 97.24965 97.22965 [2,] 103.03547 103.0839 103.90062 104.48493 104.86539 105.08035 105.06035 [,8] [,9] [,10] [,11] [,12] [1,] 97.18645 97.16199 97.18733 97.22237 97.25012 [2,] 105.22355 105.72801 105.97267 106.40763 106.49988 $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(94.72, 97.82, 99.72, 102.96, 105.87, 95.76, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/560vu1489519720.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.140 0.26 0.340 -0.04 -0.03 -0.04 -0.030 0.030 0.020 0.010 0.000 0.00 [2,] 0.220 0.26 0.340 0.02 0.01 0.00 0.000 0.100 0.090 0.070 0.000 0.00 [3,] 0.425 0.34 0.365 0.15 0.15 0.00 0.075 0.215 0.165 0.105 0.025 0.00 [4,] 0.530 0.38 0.500 0.23 0.32 0.04 0.130 0.370 0.250 0.320 0.070 0.14 [5,] 0.530 0.38 0.500 0.27 0.34 0.04 0.130 0.440 0.410 0.390 0.120 0.19 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.22504 0.2625961 0.2617948 0.01454322 -0.04996001 -0.02580129 [2,] 0.62496 0.4174039 0.4682052 0.28545678 0.34996001 0.02580129 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.008854199 0.04084128 0.06179483 -0.05625807 -0.02015226 -0.09892365 [2,] 0.158854199 0.38915872 0.26820517 0.26625807 0.07015226 0.09892365 $out [1] 1.04 -0.16 0.66 0.97 0.00 $group [1] 1 2 2 3 3 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0.140000000000001, 0.219999999999999, 0.424999999999997, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/670551489519720.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.760 98.190 98.510 100.93 102.960 105.870 NA [2,] 96.625 98.200 99.725 101.72 103.570 106.830 NA [3,] 97.430 98.245 100.090 102.22 104.310 107.400 NA [4,] 97.705 98.425 100.585 102.44 105.105 107.795 NA [5,] 97.820 98.510 100.790 102.96 105.680 108.040 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 96.9374 98.14238 99.69775 101.8916 103.6099 106.9599 NA [2,] 97.9226 98.34762 100.48225 102.5484 105.0101 107.8401 NA $out [1] 94.72 97.82 $group [1] 1 2 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(95.76, 96.625, 97.43, 97.705, 97.82, 98.19, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7hpa71489519720.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,] 100.1350 99.7200 100.2225 [2,] 101.1133 100.7225 100.8406 [3,] 101.6150 101.1575 101.2450 [4,] 102.0017 101.5125 101.6850 [5,] 102.3000 101.8750 102.0400 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 101.2098 100.7972 100.8599 [2,] 102.0202 101.5178 101.6301 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(100.135, 101.113333333333, 101.615, 102.001666666667, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1zr5s1489519720.ps tmp/1zr5s1489519720.png",intern=TRUE)) character(0) > try(system("convert tmp/2lahr1489519720.ps tmp/2lahr1489519720.png",intern=TRUE)) character(0) > try(system("convert tmp/362us1489519720.ps tmp/362us1489519720.png",intern=TRUE)) character(0) > try(system("convert tmp/4dkrv1489519720.ps tmp/4dkrv1489519720.png",intern=TRUE)) character(0) > try(system("convert tmp/560vu1489519720.ps tmp/560vu1489519720.png",intern=TRUE)) character(0) > try(system("convert tmp/670551489519720.ps tmp/670551489519720.png",intern=TRUE)) character(0) > try(system("convert tmp/7hpa71489519720.ps tmp/7hpa71489519720.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.635 0.199 2.889