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(100.18,99.73,99.69,99.45,99.47,99.56,99.54,99.87,99.73,99.86,99.91,99.91,99.91,99.87,99.77,100.14,100.04,100.11,100.13,100.22,100.59,100.25,99.94,99.85,99.85,99.85,100.15,100.34,100.72,100.61,100.61,100.52,100.64,100.57,100.16,100.2,100.2,99.99,99.69,99.85,99.54,99.67,99.72,99.74,99.97,100.29,100.57,100.77,100.3,100.32,100.32,100.37,100.47,100.68,100.7,100.62,100.52,100.62,100.52,100.57,100.59,100.59,100.56,100.44,100.39,100.51,100.4,100.45,100.42,100.38,100.25,100.34) > 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,] 100.18 99.91 99.85 100.20 100.30 100.59 NA [2,] 99.73 99.87 99.85 99.99 100.32 100.59 NA [3,] 99.69 99.77 100.15 99.69 100.32 100.56 NA [4,] 99.45 100.14 100.34 99.85 100.37 100.44 NA [5,] 99.47 100.04 100.72 99.54 100.47 100.39 NA [6,] 99.56 100.11 100.61 99.67 100.68 100.51 NA [7,] 99.54 100.13 100.61 99.72 100.70 100.40 NA [8,] 99.87 100.22 100.52 99.74 100.62 100.45 NA [9,] 99.73 100.59 100.64 99.97 100.52 100.42 NA [10,] 99.86 100.25 100.57 100.29 100.62 100.38 NA [11,] 99.91 99.94 100.16 100.57 100.52 100.25 NA [12,] 99.91 99.85 100.20 100.77 100.57 100.34 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.45 -0.04 0.00 -0.21 0.02 0.00 NA [2,] -0.04 -0.10 0.30 -0.30 0.00 -0.03 NA [3,] -0.24 0.37 0.19 0.16 0.05 -0.12 NA [4,] 0.02 -0.10 0.38 -0.31 0.10 -0.05 NA [5,] 0.09 0.07 -0.11 0.13 0.21 0.12 NA [6,] -0.02 0.02 0.00 0.05 0.02 -0.11 NA [7,] 0.33 0.09 -0.09 0.02 -0.08 0.05 NA [8,] -0.14 0.37 0.12 0.23 -0.10 -0.03 NA [9,] 0.13 -0.34 -0.07 0.32 0.10 -0.04 NA [10,] 0.05 -0.31 -0.41 0.28 -0.10 -0.13 NA [11,] 0.00 -0.09 0.04 0.20 0.05 0.09 NA [12,] 0.00 0.00 0.00 -0.47 0.02 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/17l3w1489660169.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/2jcnr1489660169.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/3aqxe1489660169.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/42xg01489660169.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,] 99.85 99.73 99.69 99.45 99.470 99.56 99.540 99.740 99.73 99.860 [2,] 99.91 99.85 99.69 99.85 99.540 99.67 99.720 99.870 99.97 100.250 [3,] 100.19 99.93 99.96 100.24 100.215 100.31 100.265 100.335 100.47 100.335 [4,] 100.30 100.32 100.32 100.37 100.470 100.61 100.610 100.520 100.59 100.570 [5,] 100.59 100.59 100.56 100.44 100.720 100.68 100.700 100.620 100.64 100.620 [,11] [,12] [1,] 99.910 99.85 [2,] 99.940 99.91 [3,] 100.205 100.27 [4,] 100.520 100.57 [5,] 100.570 100.77 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 99.93844 99.62683 99.55363 99.90458 99.61512 99.70367 99.69092 [2,] 100.44156 100.23317 100.36637 100.57542 100.81488 100.91633 100.83908 [,8] [,9] [,10] [,11] [,12] [1,] 99.91573 100.0701 100.1286 99.83088 99.84428 [2,] 100.75427 100.8699 100.5414 100.57912 100.69572 $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(99.85, 99.91, 100.19, 100.3, 100.59, 99.73, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5sh3g1489660169.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.45 -0.100 -0.240 -0.310 0.070 -0.02 -0.090 -0.140 -0.34 -0.410 -0.090 [2,] -0.21 -0.100 -0.120 -0.100 0.070 -0.02 -0.080 -0.100 -0.07 -0.310 0.000 [3,] -0.02 -0.035 0.105 -0.015 0.105 0.01 0.035 0.045 0.03 -0.115 0.045 [4,] 0.00 0.000 0.190 0.100 0.130 0.02 0.090 0.230 0.13 0.050 0.090 [5,] 0.02 0.000 0.370 0.380 0.210 0.05 0.330 0.370 0.32 0.280 0.200 [,12] [1,] 0 [2,] 0 [3,] 0 [4,] 0 [5,] 0 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.1554568 -0.09950323 -0.09496001 -0.1440065 0.06629806 -0.01580129 [2,] 0.1154568 0.02950323 0.30496001 0.1140065 0.14370194 0.03580129 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.07465549 -0.1678607 -0.09900646 -0.3472116 -0.01305291 0 [2,] 0.14465549 0.2578607 0.15900646 0.1172116 0.10305291 0 $out [1] 0.30 -0.30 -0.11 -0.11 -0.47 0.02 $group [1] 2 2 5 6 12 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-0.450000000000003, -0.210000000000008, -0.019999999999996, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6flfe1489660169.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,] 99.45 99.770 99.850 99.540 100.300 100.250 NA [2,] 99.55 99.890 100.155 99.705 100.345 100.385 NA [3,] 99.73 100.075 100.430 99.910 100.520 100.430 NA [4,] 99.89 100.180 100.610 100.245 100.620 100.535 NA [5,] 100.18 100.590 100.720 100.770 100.700 100.590 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 99.57492 99.94273 100.2225 99.6637 100.3946 100.3616 NA [2,] 99.88508 100.20727 100.6375 100.1563 100.6454 100.4984 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(99.45, 99.55, 99.73, 99.89, 100.18, 99.77, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/72sr41489660169.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.0300 100.1900 99.99375 [2,] 100.1017 100.1975 100.09188 [3,] 100.1867 100.2525 100.18625 [4,] 100.2550 100.3225 100.23875 [5,] 100.3283 100.4700 100.39125 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 100.1167 100.1955 100.1193 [2,] 100.2566 100.3095 100.2532 $out [1] 99.93 99.96 $group [1] 2 2 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(100.03, 100.101666666667, 100.186666666667, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/17l3w1489660169.ps tmp/17l3w1489660169.png",intern=TRUE)) character(0) > try(system("convert tmp/2jcnr1489660169.ps tmp/2jcnr1489660169.png",intern=TRUE)) character(0) > try(system("convert tmp/3aqxe1489660169.ps tmp/3aqxe1489660169.png",intern=TRUE)) character(0) > try(system("convert tmp/42xg01489660169.ps tmp/42xg01489660169.png",intern=TRUE)) character(0) > try(system("convert tmp/5sh3g1489660169.ps tmp/5sh3g1489660169.png",intern=TRUE)) character(0) > try(system("convert tmp/6flfe1489660169.ps tmp/6flfe1489660169.png",intern=TRUE)) character(0) > try(system("convert tmp/72sr41489660169.ps tmp/72sr41489660169.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.645 0.232 2.987