R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree" Copyright (C) 2015 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(90.18,90.5,90.63,90.75,90.76,90.67,90.5,90.8,91.22,92.19,92.51,92.67,93.75,94.1,94.96,95.21,95.33,95.43,95.44,95.64,95.8,95.87,95.98,96.07,96.23,96.32,96.55,96.73,96.61,96.64,96.86,97.02,97.22,98.1,98.46,98.6,98.78,99.13,99.48,99.62,99.68,99.95,100.12,100.25,100.47,100.7,100.88,100.95,100.92,101.12,101.19,101.28,101.28,101.3,101.3,101.36,101.45,101.58,101.73,101.84,102.01,102.14,102.16,102.32,102.41,102.4,102.43,102.42,102.3,102.65,102.72,102.86) > 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,] 90.18 93.75 96.23 98.78 100.92 102.01 NA [2,] 90.50 94.10 96.32 99.13 101.12 102.14 NA [3,] 90.63 94.96 96.55 99.48 101.19 102.16 NA [4,] 90.75 95.21 96.73 99.62 101.28 102.32 NA [5,] 90.76 95.33 96.61 99.68 101.28 102.41 NA [6,] 90.67 95.43 96.64 99.95 101.30 102.40 NA [7,] 90.50 95.44 96.86 100.12 101.30 102.43 NA [8,] 90.80 95.64 97.02 100.25 101.36 102.42 NA [9,] 91.22 95.80 97.22 100.47 101.45 102.30 NA [10,] 92.19 95.87 98.10 100.70 101.58 102.65 NA [11,] 92.51 95.98 98.46 100.88 101.73 102.72 NA [12,] 92.67 96.07 98.60 100.95 101.84 102.86 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.32 0.35 0.09 0.35 0.20 0.13 NA [2,] 0.13 0.86 0.23 0.35 0.07 0.02 NA [3,] 0.12 0.25 0.18 0.14 0.09 0.16 NA [4,] 0.01 0.12 -0.12 0.06 0.00 0.09 NA [5,] -0.09 0.10 0.03 0.27 0.02 -0.01 NA [6,] -0.17 0.01 0.22 0.17 0.00 0.03 NA [7,] 0.30 0.20 0.16 0.13 0.06 -0.01 NA [8,] 0.42 0.16 0.20 0.22 0.09 -0.12 NA [9,] 0.97 0.07 0.88 0.23 0.13 0.35 NA [10,] 0.32 0.11 0.36 0.18 0.15 0.07 NA [11,] 0.16 0.09 0.14 0.07 0.11 0.14 NA [12,] 1.08 0.16 0.18 -0.03 0.17 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/116xu1457384323.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/29os21457384323.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/3d2pf1457384323.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/4vj621457384323.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] [1,] 90.180 90.500 90.630 90.750 90.760 90.670 90.50 90.800 91.220 [2,] 93.750 94.100 94.960 95.210 95.330 95.430 95.44 95.640 95.800 [3,] 97.505 97.725 98.015 98.175 98.145 98.295 98.49 98.635 98.845 [4,] 100.920 101.120 101.190 101.280 101.280 101.300 101.30 101.360 101.450 [5,] 102.010 102.140 102.160 102.320 102.410 102.400 102.43 102.420 102.300 [,10] [,11] [,12] [1,] 92.19 92.51 92.670 [2,] 95.87 95.98 96.070 [3,] 99.40 99.67 99.775 [4,] 101.58 101.73 101.840 [5,] 102.65 102.72 102.860 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 92.88012 93.19687 93.99645 94.25965 94.30706 94.50866 94.71011 [2,] 102.12988 102.25313 102.03355 102.09035 101.98294 102.08134 102.26989 [,8] [,9] [,10] [,11] [,12] [1,] 94.94542 95.20057 95.71687 95.96106 96.05316 [2,] 102.32458 102.48943 103.08313 103.37894 103.49684 $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(90.18, 93.75, 97.505, 100.92, 102.01, 90.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5tj2i1457384323.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.09 0.02 0.09 -0.120 -0.090 -0.17 -0.010 0.09 0.07 0.070 0.070 0.16 [2,] 0.13 0.07 0.12 0.000 -0.010 0.00 0.060 0.09 0.13 0.110 0.090 0.16 [3,] 0.26 0.18 0.15 0.035 0.025 0.02 0.145 0.18 0.29 0.165 0.125 0.17 [4,] 0.35 0.35 0.18 0.090 0.100 0.17 0.200 0.22 0.88 0.320 0.140 0.18 [5,] 0.35 0.35 0.25 0.120 0.100 0.22 0.300 0.22 0.97 0.360 0.160 0.18 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.1180929 -0.0006090437 0.1112981 -0.02305291 -0.04595355 -0.08965549 [2,] 0.4019071 0.3606090437 0.1887019 0.09305291 0.09595355 0.12965549 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0.05469548 0.0961458 -0.1937742 0.02954322 0.09274839 0.1558681 [2,] 0.23530452 0.2638542 0.7737742 0.30045678 0.15725161 0.1841319 $out [1] 0.86 0.27 0.42 -0.12 1.08 -0.03 $group [1] 2 5 8 8 12 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0.0899999999999892, 0.129999999999995, 0.259999999999998, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6agng1457384323.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,] 90.180 94.100 96.230 98.780 100.920 102.010 NA [2,] 90.565 95.085 96.580 99.550 101.235 102.230 NA [3,] 90.755 95.435 96.795 100.035 101.300 102.405 NA [4,] 91.705 95.835 97.660 100.585 101.515 102.540 NA [5,] 92.670 96.070 98.600 100.950 101.840 102.860 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 90.23504 95.09292 96.3024 99.56293 101.1723 102.2636 NA [2,] 91.27496 95.77708 97.2876 100.50707 101.4277 102.5464 NA $out [1] 93.75 $group [1] 2 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(90.18, 90.565, 90.755, 91.705, 92.67, 94.1, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/73zs71457384323.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,] 96.97833 97.5050 97.37750 [2,] 97.57333 98.0800 98.14375 [3,] 97.75333 98.3925 98.37375 [4,] 98.29583 99.1225 98.78688 [5,] 98.83167 99.7750 99.16000 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 97.42380 97.91701 98.08042 [2,] 98.08287 98.86799 98.66708 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(96.9783333333333, 97.5733333333333, 97.7533333333333, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/116xu1457384323.ps tmp/116xu1457384323.png",intern=TRUE)) character(0) > try(system("convert tmp/29os21457384323.ps tmp/29os21457384323.png",intern=TRUE)) character(0) > try(system("convert tmp/3d2pf1457384323.ps tmp/3d2pf1457384323.png",intern=TRUE)) character(0) > try(system("convert tmp/4vj621457384323.ps tmp/4vj621457384323.png",intern=TRUE)) character(0) > try(system("convert tmp/5tj2i1457384323.ps tmp/5tj2i1457384323.png",intern=TRUE)) character(0) > try(system("convert tmp/6agng1457384323.ps tmp/6agng1457384323.png",intern=TRUE)) character(0) > try(system("convert tmp/73zs71457384323.ps tmp/73zs71457384323.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.632 0.475 3.132