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(99.49,99.84,100.9,101.31,100.09,99.28,99.57,101.04,101.87,101.39,100.3,99.95,99.87,100.51,100.27,100.04,99.23,99.32,99.95,100.23,101.02,99.83,99.61,100.12,99.83,100.03,100.07,100.46,100.43,100.68,101.8,101.21,100.63,100.55,99.76,98.8,96.59,97.59,98.79,98.79,99.65,99.78,100.05,99.22,97.72,97.55,98.14,97.95,97.24,97.02,97.57,98.07,98.86,99.57,100.14,99.88,99.79,100.59,100.55,101.42) > 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] 60 > (np <- floor(n / par1)) [1] 5 > 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] 5 5 5 5 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 99.49 99.87 99.83 96.59 97.24 NA [2,] 99.84 100.51 100.03 97.59 97.02 NA [3,] 100.90 100.27 100.07 98.79 97.57 NA [4,] 101.31 100.04 100.46 98.79 98.07 NA [5,] 100.09 99.23 100.43 99.65 98.86 NA [6,] 99.28 99.32 100.68 99.78 99.57 NA [7,] 99.57 99.95 101.80 100.05 100.14 NA [8,] 101.04 100.23 101.21 99.22 99.88 NA [9,] 101.87 101.02 100.63 97.72 99.79 NA [10,] 101.39 99.83 100.55 97.55 100.59 NA [11,] 100.30 99.61 99.76 98.14 100.55 NA [12,] 99.95 100.12 98.80 97.95 101.42 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.35 0.64 0.20 1.00 -0.22 NA [2,] 1.06 -0.24 0.04 1.20 0.55 NA [3,] 0.41 -0.23 0.39 0.00 0.50 NA [4,] -1.22 -0.81 -0.03 0.86 0.79 NA [5,] -0.81 0.09 0.25 0.13 0.71 NA [6,] 0.29 0.63 1.12 0.27 0.57 NA [7,] 1.47 0.28 -0.59 -0.83 -0.26 NA [8,] 0.83 0.79 -0.58 -1.50 -0.09 NA [9,] -0.48 -1.19 -0.08 -0.17 0.80 NA [10,] -1.09 -0.22 -0.79 0.59 -0.04 NA [11,] -0.35 0.51 -0.96 -0.19 0.87 NA [12,] -0.08 -0.29 -2.21 -0.71 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/17eu51489499005.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/2pey11489499005.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/3j6bo1489499005.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/4amu61489499005.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] [,11] [1,] 96.59 97.02 97.57 98.07 98.86 99.28 99.95 99.22 99.79 99.83 99.61 [2,] 97.24 97.59 98.79 98.79 99.23 99.32 99.95 99.88 99.79 99.83 99.61 [3,] 99.49 99.84 100.07 100.04 99.65 99.57 100.05 100.23 100.63 100.55 99.76 [4,] 99.83 100.03 100.27 100.46 100.09 99.78 100.14 101.04 101.02 100.59 100.30 [5,] 99.87 100.51 100.90 101.31 100.43 99.78 100.14 101.21 101.87 101.39 100.55 [,12] [1,] 97.95 [2,] 98.80 [3,] 99.95 [4,] 100.12 [5,] 101.42 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 97.65991 98.1159 99.02424 98.85998 99.04233 99.24497 99.91575 [2,] 101.32009 101.5641 101.11576 101.22002 100.25767 99.89503 100.18425 [,8] [,9] [,10] [,11] [,12] [1,] 99.41035 99.76089 100.013 99.27245 99.01729 [2,] 101.04965 101.49911 101.087 100.24755 100.88271 $out [1] 100.68 99.57 101.80 97.72 97.55 98.14 $group [1] 6 7 7 9 10 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(96.59, 97.24, 99.49, 99.83, 99.87, 97.02, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5f6j81489499005.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.22 -0.24 -0.23 -1.22 0.09 0.27 -0.83 -1.50 -0.48 -1.09 -0.96 -2.210 [2,] 0.20 0.04 0.00 -0.81 0.09 0.29 -0.59 -0.58 -0.48 -0.79 -0.35 -1.460 [3,] 0.35 0.55 0.39 -0.03 0.13 0.57 -0.26 -0.09 -0.17 -0.22 -0.19 -0.500 [4,] 0.64 1.06 0.41 0.79 0.25 0.63 0.28 0.79 -0.08 -0.04 0.51 -0.185 [5,] 1.00 1.20 0.50 0.86 0.25 1.12 1.47 0.83 -0.08 0.59 0.87 -0.080 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.03909711 -0.1707294 0.100295 -1.160556 0.0169444 0.3297569 -0.8747398 [2,] 0.66090289 1.2707294 0.679705 1.100556 0.2430556 0.8102431 0.3547398 [,8] [,9] [,10] [,11] [,12] [1,] -1.0580385 -0.452639 -0.7499481 -0.7976738 -1.50725 [2,] 0.8780385 0.112639 0.3099481 0.4176738 0.50725 $out [1] -0.81 0.71 -1.19 0.80 $group [1] 5 5 9 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-0.219999999999999, 0.200000000000003, 0.350000000000009, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6flz91489499005.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] [1,] 99.280 99.230 99.760 96.590 97.020 NA [2,] 99.705 99.720 99.930 97.655 97.820 NA [3,] 100.195 99.995 100.445 98.465 99.680 NA [4,] 101.175 100.250 100.655 99.435 100.345 NA [5,] 101.870 101.020 101.210 100.050 101.420 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 99.52452 99.75326 100.1143 97.65313 98.52833 NA [2,] 100.86548 100.23674 100.7757 99.27687 100.83167 NA $out [1] 101.8 98.8 $group [1] 3 3 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(99.28, 99.705, 100.195, 101.175, 101.87, 99.23, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7acxp1489499005.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,] 98.998 99.490 98.8100 [2,] 99.584 99.705 99.4950 [3,] 99.699 99.995 99.6425 [4,] 100.094 100.150 100.1275 [5,] 100.316 100.630 100.4600 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 99.46639 99.79203 99.35401 [2,] 99.93161 100.19797 99.93099 $out [1] 98.604 98.535 $group [1] 1 3 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(98.998, 99.584, 99.699, 100.094, 100.316, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/17eu51489499005.ps tmp/17eu51489499005.png",intern=TRUE)) character(0) > try(system("convert tmp/2pey11489499005.ps tmp/2pey11489499005.png",intern=TRUE)) character(0) > try(system("convert tmp/3j6bo1489499005.ps tmp/3j6bo1489499005.png",intern=TRUE)) character(0) > try(system("convert tmp/4amu61489499005.ps tmp/4amu61489499005.png",intern=TRUE)) character(0) > try(system("convert tmp/5f6j81489499005.ps tmp/5f6j81489499005.png",intern=TRUE)) character(0) > try(system("convert tmp/6flz91489499005.ps tmp/6flz91489499005.png",intern=TRUE)) character(0) > try(system("convert tmp/7acxp1489499005.ps tmp/7acxp1489499005.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.868 0.268 3.199