R version 3.3.3 (2017-03-06) -- "Another Canoe" Copyright (C) 2017 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(88.05,93.25,92.96,93.08,90.67,92.17,94.28,95.01,93.27,95.59,97.4,97.05,97.38,96.23,96.65,96.46,97.87,98.59,99.54,97.39,97.09,97.83,97.58,96.81,97.52,98.19,96.18,97.41,99.23,96.93,98.82,102.47,95.95,101.17,100.55,99.5,99.89,100.43,100.63,99.36,100,99.55,100.12,101.31,96.59,98.79,100.93,102.4,106.99,105.27,107.27,109.21,108.57,110.17,108.1,107.58,106.91,103,106.12,109.69) > 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,] 88.05 97.38 97.52 99.89 106.99 NA [2,] 93.25 96.23 98.19 100.43 105.27 NA [3,] 92.96 96.65 96.18 100.63 107.27 NA [4,] 93.08 96.46 97.41 99.36 109.21 NA [5,] 90.67 97.87 99.23 100.00 108.57 NA [6,] 92.17 98.59 96.93 99.55 110.17 NA [7,] 94.28 99.54 98.82 100.12 108.10 NA [8,] 95.01 97.39 102.47 101.31 107.58 NA [9,] 93.27 97.09 95.95 96.59 106.91 NA [10,] 95.59 97.83 101.17 98.79 103.00 NA [11,] 97.40 97.58 100.55 100.93 106.12 NA [12,] 97.05 96.81 99.50 102.40 109.69 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 5.20 -1.15 0.67 0.54 -1.72 NA [2,] -0.29 0.42 -2.01 0.20 2.00 NA [3,] 0.12 -0.19 1.23 -1.27 1.94 NA [4,] -2.41 1.41 1.82 0.64 -0.64 NA [5,] 1.50 0.72 -2.30 -0.45 1.60 NA [6,] 2.11 0.95 1.89 0.57 -2.07 NA [7,] 0.73 -2.15 3.65 1.19 -0.52 NA [8,] -1.74 -0.30 -6.52 -4.72 -0.67 NA [9,] 2.32 0.74 5.22 2.20 -3.91 NA [10,] 1.81 -0.25 -0.62 2.14 3.12 NA [11,] -0.35 -0.77 -1.05 1.47 3.57 NA [12,] 0.33 0.71 0.39 4.59 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/16ayi1494806160.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/2n8pb1494806160.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/3xtfr1494806160.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/4vu8h1494806160.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,] 97.38 93.25 92.96 93.08 97.87 96.93 98.82 95.01 95.95 95.59 97.40 [2,] 97.38 96.23 96.18 96.46 97.87 96.93 98.82 97.39 95.95 97.83 97.58 [3,] 97.52 98.19 96.65 97.41 99.23 98.59 99.54 101.31 96.59 98.79 100.55 [4,] 99.89 100.43 100.63 99.36 100.00 99.55 100.12 102.47 97.09 101.17 100.93 [5,] 99.89 105.27 107.27 99.36 100.00 99.55 100.12 107.58 97.09 103.00 100.93 [,12] [1,] 96.81 [2,] 97.05 [3,] 99.50 [4,] 102.40 [5,] 109.69 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 95.74644 95.22229 93.50564 95.36087 97.72495 96.73871 98.62142 [2,] 99.29356 101.15771 99.79436 99.45913 100.73505 100.44129 100.45858 [,8] [,9] [,10] [,11] [,12] [1,] 97.72048 95.78448 96.42996 98.1829 95.7197 [2,] 104.89952 97.39552 101.15004 102.9171 103.2803 $out [1] 88.05 106.99 109.21 90.67 108.57 92.17 110.17 94.28 108.10 93.27 [11] 106.91 106.12 $group [1] 1 1 4 5 5 6 6 7 7 9 9 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(97.38, 97.38, 97.52, 99.89, 99.89, 93.25, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/59yre1494806160.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,] -1.72 -0.29 -1.27 -2.41 -2.30 0.57 -2.15 -6.52 0.74 -0.62 -1.05 0.33 [2,] -1.15 -0.29 -0.19 -0.64 -0.45 0.57 -0.52 -4.72 0.74 -0.25 -0.77 0.36 [3,] 0.54 0.20 0.12 0.64 0.72 0.95 0.73 -1.74 2.20 1.81 -0.35 0.55 [4,] 0.67 0.42 1.23 1.41 1.50 1.89 1.19 -0.67 2.32 2.14 1.47 2.65 [5,] 0.67 0.42 1.94 1.82 1.60 2.11 3.65 -0.30 2.32 3.12 3.57 4.59 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.7460074 -0.3016842 -0.8833684 -0.8085248 -0.6578651 0.01729133 [2,] 1.8260074 0.7016842 1.1233684 2.0885248 2.0978651 1.88270867 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.4782817 -4.60172 1.083576 0.121232 -1.932778 -1.2591 [2,] 1.9382817 1.12172 3.316424 3.498768 1.232778 2.3591 $out [1] 5.20 -2.01 2.00 -2.07 5.22 -3.91 $group [1] 1 2 2 6 9 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-1.72, -1.14999999999999, 0.540000000000006, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6zpu61494806160.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,] 90.670 96.230 95.950 98.790 103.000 NA [2,] 92.565 96.730 97.170 99.455 106.515 NA [3,] 93.260 97.385 98.505 100.060 107.425 NA [4,] 95.300 97.850 100.025 100.780 108.890 NA [5,] 97.400 98.590 102.470 102.400 110.170 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 92.01255 96.87416 97.20282 99.45566 106.3417 NA [2,] 94.50745 97.89584 99.80718 100.66434 108.5083 NA $out [1] 88.05 99.54 96.59 $group [1] 1 2 4 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(90.67, 92.565, 93.26, 95.3, 97.4, 96.23, 96.73, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/71au21494806160.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.962 96.590 96.520 [2,] 98.706 97.465 98.285 [3,] 99.272 98.690 98.785 [4,] 100.344 99.520 99.485 [5,] 101.090 101.310 99.930 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 98.5249 97.7527 98.23767 [2,] 100.0191 99.6273 99.33233 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(97.962, 98.706, 99.272, 100.344, 101.09, 96.59, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/16ayi1494806160.ps tmp/16ayi1494806160.png",intern=TRUE)) character(0) > try(system("convert tmp/2n8pb1494806160.ps tmp/2n8pb1494806160.png",intern=TRUE)) character(0) > try(system("convert tmp/3xtfr1494806160.ps tmp/3xtfr1494806160.png",intern=TRUE)) character(0) > try(system("convert tmp/4vu8h1494806160.ps tmp/4vu8h1494806160.png",intern=TRUE)) character(0) > try(system("convert tmp/59yre1494806160.ps tmp/59yre1494806160.png",intern=TRUE)) character(0) > try(system("convert tmp/6zpu61494806160.ps tmp/6zpu61494806160.png",intern=TRUE)) character(0) > try(system("convert tmp/71au21494806160.ps tmp/71au21494806160.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.038 0.525 5.362