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(89.88,89.88,89.91,90.21,91.46,91.51,91.58,91.6,91.61,91.62,91.62,91.62,91.62,91.63,91.55,91.56,92.01,92.43,92.59,92.67,92.79,92.79,92.84,92.86,92.86,92.91,92.94,93.49,95.31,96.07,96.35,96.66,97.31,97.66,97.76,97.75,97.79,97.93,97.95,98.05,99.01,99.32,99.55,100.56,101.88,102.3,102.79,102.87,102.8,103.57,105.61,107.25,107.61,107.85,107.93,107.98,108.1,108.26,108.32,108.32,108.36,109.07,110.86,112.49,112.83,112.98,113.03,113.34,113.38,113.51,113.68,113.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] 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,] 89.88 91.62 92.86 97.79 102.80 108.36 NA [2,] 89.88 91.63 92.91 97.93 103.57 109.07 NA [3,] 89.91 91.55 92.94 97.95 105.61 110.86 NA [4,] 90.21 91.56 93.49 98.05 107.25 112.49 NA [5,] 91.46 92.01 95.31 99.01 107.61 112.83 NA [6,] 91.51 92.43 96.07 99.32 107.85 112.98 NA [7,] 91.58 92.59 96.35 99.55 107.93 113.03 NA [8,] 91.60 92.67 96.66 100.56 107.98 113.34 NA [9,] 91.61 92.79 97.31 101.88 108.10 113.38 NA [10,] 91.62 92.79 97.66 102.30 108.26 113.51 NA [11,] 91.62 92.84 97.76 102.79 108.32 113.68 NA [12,] 91.62 92.86 97.75 102.87 108.32 113.69 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.00 0.01 0.05 0.14 0.77 0.71 NA [2,] 0.03 -0.08 0.03 0.02 2.04 1.79 NA [3,] 0.30 0.01 0.55 0.10 1.64 1.63 NA [4,] 1.25 0.45 1.82 0.96 0.36 0.34 NA [5,] 0.05 0.42 0.76 0.31 0.24 0.15 NA [6,] 0.07 0.16 0.28 0.23 0.08 0.05 NA [7,] 0.02 0.08 0.31 1.01 0.05 0.31 NA [8,] 0.01 0.12 0.65 1.32 0.12 0.04 NA [9,] 0.01 0.00 0.35 0.42 0.16 0.13 NA [10,] 0.00 0.05 0.10 0.49 0.06 0.17 NA [11,] 0.00 0.02 -0.01 0.08 0.00 0.01 NA [12,] 0.00 0.00 0.04 -0.07 0.04 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/1j5cq1493386358.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/2zz1z1493386358.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/3lbqm1493386358.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/46ll61493386358.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,] 89.880 89.88 89.910 90.21 91.46 91.510 91.58 91.60 91.610 91.62 [2,] 91.620 91.63 91.550 91.56 92.01 92.430 92.59 92.67 92.790 92.79 [3,] 95.325 95.42 95.445 95.77 97.16 97.695 97.95 98.61 99.595 99.98 [4,] 102.800 103.57 105.610 107.25 107.61 107.850 107.93 107.98 108.100 108.26 [5,] 108.360 109.07 110.860 112.49 112.83 112.980 113.03 113.34 113.380 113.51 [,11] [,12] [1,] 91.620 91.62 [2,] 92.840 92.86 [3,] 100.275 100.31 [4,] 108.320 108.32 [5,] 113.680 113.69 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 88.11354 87.71831 86.37585 85.64944 87.0975 87.7486 88.0552 [2,] 102.53646 103.12169 104.51415 105.89056 107.2225 107.6414 107.8448 [,8] [,9] [,10] [,11] [,12] [1,] 88.73456 89.71956 90.00135 90.2899 90.3378 [2,] 108.48544 109.47044 109.95865 110.2601 110.2822 $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(89.88, 91.62, 95.325, 102.8, 108.36, 89.88, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/514yo1493386358.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.000 -0.08 0.010 0.340 0.050 0.05 0.020 0.01 0.000 0.00 -0.010 0.00 [2,] 0.010 0.02 0.100 0.360 0.150 0.07 0.050 0.04 0.010 0.05 0.000 0.00 [3,] 0.095 0.03 0.425 0.705 0.275 0.12 0.195 0.12 0.145 0.08 0.005 0.00 [4,] 0.710 1.79 1.630 1.250 0.420 0.23 0.310 0.65 0.350 0.17 0.020 0.04 [5,] 0.770 2.04 1.640 1.820 0.760 0.28 0.310 1.32 0.420 0.17 0.020 0.04 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.3565226 -1.111707 -0.5618994 0.1309213 0.1008413 0.01679483 0.0272916 [2,] 0.5465226 1.171707 1.4118994 1.2790787 0.4491587 0.22320517 0.3627084 [,8] [,9] [,10] [,11] [,12] [1,] -0.2734697 -0.07431098 0.002596124 -0.007900646 -0.0282639 [2,] 0.5134697 0.36431098 0.157403876 0.017900646 0.0282639 $out [1] 1.01 0.49 0.08 -0.07 $group [1] 7 10 11 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0, 0.00999999999999091, 0.0949999999999989, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6hvro1493386358.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,] 89.880 91.550 92.860 97.790 105.61 109.070 NA [2,] 90.060 91.625 93.215 98.000 106.43 111.675 NA [3,] 91.545 92.510 96.210 99.435 107.89 113.005 NA [4,] 91.615 92.790 97.485 102.090 108.18 113.445 NA [5,] 91.620 92.860 97.760 102.870 108.32 113.690 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 90.83575 91.97864 94.26242 97.56952 107.0918 112.1977 NA [2,] 92.25425 93.04136 98.15758 101.30048 108.6882 113.8123 NA $out [1] 102.80 103.57 108.36 $group [1] 5 5 6 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(89.88, 90.06, 91.545, 91.615, 91.62, 91.55, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7b8s21493386358.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.21833 95.3250 96.73875 [2,] 98.48917 95.6075 98.14625 [3,] 100.09917 97.8225 99.60563 [4,] 100.93417 99.7875 100.31062 [5,] 101.18500 100.3100 100.52000 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 98.98399 95.91597 98.61844 [2,] 101.21435 99.72903 100.59281 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(97.2183333333333, 98.4891666666667, 100.099166666667, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1j5cq1493386358.ps tmp/1j5cq1493386358.png",intern=TRUE)) character(0) > try(system("convert tmp/2zz1z1493386358.ps tmp/2zz1z1493386358.png",intern=TRUE)) character(0) > try(system("convert tmp/3lbqm1493386358.ps tmp/3lbqm1493386358.png",intern=TRUE)) character(0) > try(system("convert tmp/46ll61493386358.ps tmp/46ll61493386358.png",intern=TRUE)) character(0) > try(system("convert tmp/514yo1493386358.ps tmp/514yo1493386358.png",intern=TRUE)) character(0) > try(system("convert tmp/6hvro1493386358.ps tmp/6hvro1493386358.png",intern=TRUE)) character(0) > try(system("convert tmp/7b8s21493386358.ps tmp/7b8s21493386358.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.718 0.439 4.339