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(62.38,62.62,64.15,64.97,66.12,67.08,68.66,69.04,70.8,73.2,74.19,75.36,75.54,76.81,77.69,79.34,80.36,80.74,81.12,82.95,87.31,88.93,90.8,91.29,91.36,92.72,95.75,97.19,98.73,99.03,99.4,99.66,100.5,101.21,101.26,101.44,101.97,102.23,102.58,101.91,101.63,101.1,100.71,100.75,100.14,97.72,94.91,94.34,97.11,96.51,95.8,95.25,95.09,94.97,95.21,95.46,95.33,95.14,95.6,95.66,95.66,96.33,97.66,98.27,99.53,100.86,101.26,101.29,101.38,101.49,101.29,101.26) > 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,] 62.38 75.54 91.36 101.97 97.11 95.66 NA [2,] 62.62 76.81 92.72 102.23 96.51 96.33 NA [3,] 64.15 77.69 95.75 102.58 95.80 97.66 NA [4,] 64.97 79.34 97.19 101.91 95.25 98.27 NA [5,] 66.12 80.36 98.73 101.63 95.09 99.53 NA [6,] 67.08 80.74 99.03 101.10 94.97 100.86 NA [7,] 68.66 81.12 99.40 100.71 95.21 101.26 NA [8,] 69.04 82.95 99.66 100.75 95.46 101.29 NA [9,] 70.80 87.31 100.50 100.14 95.33 101.38 NA [10,] 73.20 88.93 101.21 97.72 95.14 101.49 NA [11,] 74.19 90.80 101.26 94.91 95.60 101.29 NA [12,] 75.36 91.29 101.44 94.34 95.66 101.26 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.24 1.27 1.36 0.26 -0.60 0.67 NA [2,] 1.53 0.88 3.03 0.35 -0.71 1.33 NA [3,] 0.82 1.65 1.44 -0.67 -0.55 0.61 NA [4,] 1.15 1.02 1.54 -0.28 -0.16 1.26 NA [5,] 0.96 0.38 0.30 -0.53 -0.12 1.33 NA [6,] 1.58 0.38 0.37 -0.39 0.24 0.40 NA [7,] 0.38 1.83 0.26 0.04 0.25 0.03 NA [8,] 1.76 4.36 0.84 -0.61 -0.13 0.09 NA [9,] 2.40 1.62 0.71 -2.42 -0.19 0.11 NA [10,] 0.99 1.87 0.05 -2.81 0.46 -0.20 NA [11,] 1.17 0.49 0.18 -0.57 0.06 -0.03 NA [12,] 0.18 0.07 0.53 2.77 0.00 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/18p4x1489057530.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/226qs1489057530.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/3euz81489057530.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/4hd9l1489057530.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,] 62.38 62.620 64.150 64.97 66.12 67.08 68.660 69.04 70.800 73.20 [2,] 75.54 76.810 77.690 79.34 80.36 80.74 81.120 82.95 87.310 88.93 [3,] 93.51 94.525 95.775 96.22 96.91 97.00 97.305 97.56 97.735 96.43 [4,] 97.11 96.510 97.660 98.27 99.53 100.86 100.710 100.75 100.500 101.21 [5,] 101.97 102.230 102.580 101.91 101.63 101.10 101.260 101.29 101.380 101.49 [,11] [,12] [1,] 90.800 91.29 [2,] 90.800 91.29 [3,] 95.255 95.00 [4,] 101.260 101.26 [5,] 101.290 101.44 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 79.59665 81.81786 82.8937 84.00954 84.54473 84.02195 84.66882 [2,] 107.42335 107.23214 108.6563 108.43046 109.27527 109.97805 109.94118 [,8] [,9] [,10] [,11] [,12] [1,] 86.07843 89.22702 88.509 88.50796 88.56903 [2,] 109.04157 106.24298 104.351 102.00204 101.43097 $out [1] 74.19 75.36 $group [1] 11 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(62.38, 75.54, 93.51, 97.11, 101.97, 62.62, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5e4rh1489057530.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.600 -0.710 -0.670 -0.280 -0.53 0.240 0.030 -0.610 -2.42 -0.200 -0.57 [2,] 0.240 0.350 -0.550 -0.160 -0.12 0.240 0.040 -0.130 -0.19 -0.200 -0.03 [3,] 0.465 1.105 0.715 1.085 0.34 0.375 0.255 0.465 0.41 0.255 0.12 [4,] 1.270 1.530 1.440 1.260 0.96 0.400 0.380 1.760 1.62 0.990 0.49 [5,] 1.360 3.030 1.650 1.540 1.33 0.400 0.380 4.360 2.40 1.870 1.17 [,12] [1,] 0.00 [2,] 0.07 [3,] 0.18 [4,] 0.53 [5,] 0.53 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.1993833 0.3438619 -0.5686143 0.1690541 -0.3566349 0.2717948 0.03568902 [2,] 1.1293833 1.8661381 1.9986143 2.0009459 1.0366349 0.4782052 0.47431098 [,8] [,9] [,10] [,11] [,12] [1,] -0.754111 -0.7575085 -0.5125884 -0.2154168 -0.1450348 [2,] 1.684111 1.5775085 1.0225884 0.4554168 0.5050348 $out [1] 1.58 -0.39 1.83 -2.81 2.77 $group [1] 6 6 7 10 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-0.599999999999994, 0.239999999999995, 0.465000000000003, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6k4fz1489057530.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,] 62.38 75.540 91.360 94.910 94.970 95.660 NA [2,] 64.56 78.515 96.470 98.930 95.175 97.965 NA [3,] 67.87 80.930 99.215 100.925 95.395 101.060 NA [4,] 72.00 88.120 100.855 101.940 95.730 101.290 NA [5,] 75.36 91.290 101.440 102.580 96.510 101.490 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 64.47657 76.5491 97.21497 99.55212 95.14186 99.54345 NA [2,] 71.26343 85.3109 101.21503 102.29788 95.64814 102.57655 NA $out [1] 94.34 97.11 $group [1] 4 5 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(62.38, 64.56, 67.87, 72, 75.36, 75.54, 78.515, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7r3lh1489057530.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,] 87.33667 93.5100 88.12125 [2,] 89.21333 95.1275 90.17937 [3,] 90.84500 96.3250 92.43125 [4,] 92.76250 97.1525 95.13625 [5,] 93.22500 97.7350 95.95625 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 89.2262 95.40138 90.17039 [2,] 92.4638 97.24862 94.69211 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(87.3366666666667, 89.2133333333333, 90.845, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/18p4x1489057530.ps tmp/18p4x1489057530.png",intern=TRUE)) character(0) > try(system("convert tmp/226qs1489057530.ps tmp/226qs1489057530.png",intern=TRUE)) character(0) > try(system("convert tmp/3euz81489057530.ps tmp/3euz81489057530.png",intern=TRUE)) character(0) > try(system("convert tmp/4hd9l1489057530.ps tmp/4hd9l1489057530.png",intern=TRUE)) character(0) > try(system("convert tmp/5e4rh1489057530.ps tmp/5e4rh1489057530.png",intern=TRUE)) character(0) > try(system("convert tmp/6k4fz1489057530.ps tmp/6k4fz1489057530.png",intern=TRUE)) character(0) > try(system("convert tmp/7r3lh1489057530.ps tmp/7r3lh1489057530.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.476 0.225 2.747