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(100.57,100.27,100.27,100.18,100.16,100.18,100.18,100.59,100.69,101.06,101.15,101.16,101.16,100.81,100.94,101.13,101.29,101.34,101.35,101.7,102.05,102.48,102.66,102.72,102.73,102.18,102.22,102.37,102.53,102.61,102.62,103,103.17,103.52,103.69,103.73,99.57,99.09,99.14,99.36,99.6,99.65,99.8,100.15,100.45,100.89,101.13,101.17,101.21,101.1,101.17,101.11,101.2,101.15,100.92,101.1,101.22,101.25,101.39,101.43,101.95,101.92,102.05,102.07,102.1,102.16,101.63,101.43,101.4,101.6,101.72,101.73,102.67,102.59,102.69,102.93,103.02,103.06,102.47,102.4,102.42,102.51,102.61,102.78) > 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] 84 > (np <- floor(n / par1)) [1] 7 > 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] 7 7 7 7 7 7 7 7 7 7 7 7 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 100.57 101.16 102.73 99.57 101.21 101.95 102.67 NA [2,] 100.27 100.81 102.18 99.09 101.10 101.92 102.59 NA [3,] 100.27 100.94 102.22 99.14 101.17 102.05 102.69 NA [4,] 100.18 101.13 102.37 99.36 101.11 102.07 102.93 NA [5,] 100.16 101.29 102.53 99.60 101.20 102.10 103.02 NA [6,] 100.18 101.34 102.61 99.65 101.15 102.16 103.06 NA [7,] 100.18 101.35 102.62 99.80 100.92 101.63 102.47 NA [8,] 100.59 101.70 103.00 100.15 101.10 101.43 102.40 NA [9,] 100.69 102.05 103.17 100.45 101.22 101.40 102.42 NA [10,] 101.06 102.48 103.52 100.89 101.25 101.60 102.51 NA [11,] 101.15 102.66 103.69 101.13 101.39 101.72 102.61 NA [12,] 101.16 102.72 103.73 101.17 101.43 101.73 102.78 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] -0.30 -0.35 -0.55 -0.48 -0.11 -0.03 -0.08 NA [2,] 0.00 0.13 0.04 0.05 0.07 0.13 0.10 NA [3,] -0.09 0.19 0.15 0.22 -0.06 0.02 0.24 NA [4,] -0.02 0.16 0.16 0.24 0.09 0.03 0.09 NA [5,] 0.02 0.05 0.08 0.05 -0.05 0.06 0.04 NA [6,] 0.00 0.01 0.01 0.15 -0.23 -0.53 -0.59 NA [7,] 0.41 0.35 0.38 0.35 0.18 -0.20 -0.07 NA [8,] 0.10 0.35 0.17 0.30 0.12 -0.03 0.02 NA [9,] 0.37 0.43 0.35 0.44 0.03 0.20 0.09 NA [10,] 0.09 0.18 0.17 0.24 0.14 0.12 0.10 NA [11,] 0.01 0.06 0.04 0.04 0.04 0.01 0.17 NA [12,] 0.00 0.01 -4.16 0.04 0.52 0.94 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/17j7a1489666611.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/2bpkk1489666611.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/3jykt1489666611.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/4vxm01489666611.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,] 99.570 99.09 99.140 99.360 99.600 99.650 99.80 100.150 100.450 [2,] 100.865 100.54 100.605 100.645 100.680 100.665 100.55 100.845 100.955 [3,] 101.210 101.10 101.170 101.130 101.290 101.340 101.35 101.430 101.400 [4,] 102.310 102.05 102.135 102.220 102.315 102.385 102.05 102.050 102.235 [5,] 102.730 102.59 102.690 102.930 103.020 103.060 102.62 103.000 103.170 [,10] [,11] [,12] [1,] 100.890 101.130 101.16 [2,] 101.155 101.270 101.30 [3,] 101.600 101.720 101.73 [4,] 102.495 102.635 102.75 [5,] 103.520 103.690 103.73 $n [1] 7 7 7 7 7 7 7 7 7 7 7 7 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 100.3471 100.1983 100.2563 100.1894 100.3136 100.3128 100.4542 100.7104 [2,] 102.0729 102.0017 102.0837 102.0706 102.2664 102.3672 102.2458 102.1496 [,9] [,10] [,11] [,12] [1,] 100.6356 100.7998 100.9048 100.8641 [2,] 102.1644 102.4002 102.5352 102.5959 $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(99.57, 100.865, 101.21, 102.31, 102.73, 99.09, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/59vdf1489666611.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.550 0.000 -0.090 -0.02 0.020 -0.59 -0.200 -0.030 0.030 0.090 0.010 [2,] -0.415 0.045 -0.020 0.06 0.030 -0.38 0.055 0.060 0.145 0.110 0.025 [3,] -0.300 0.070 0.150 0.09 0.050 0.00 0.350 0.120 0.350 0.140 0.040 [4,] -0.095 0.115 0.205 0.16 0.055 0.01 0.365 0.235 0.400 0.175 0.050 [5,] -0.030 0.130 0.240 0.24 0.080 0.15 0.410 0.350 0.440 0.240 0.060 [,12] [1,] 0.000 [2,] 0.000 [3,] 0.025 [4,] 0.520 [5,] 0.940 $n [1] 7 7 7 7 7 7 7 7 7 7 7 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.4910988 0.02819713 0.01563363 0.03028161 0.0350704 -0.2329017 0.164873 [2,] -0.1089012 0.11180287 0.28436637 0.14971839 0.0649296 0.2329017 0.535127 [,8] [,9] [,10] [,11] [,12] [1,] 0.01549282 0.1977181 0.101183 0.0250704 -0.3104168 [2,] 0.22450718 0.5022819 0.178817 0.0549296 0.3604168 $out [1] -0.05 0.17 -4.16 $group [1] 5 11 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-0.549999999999997, -0.414999999999992, -0.299999999999997, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/65pnk1489666611.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] [,8] [1,] 100.160 100.810 102.180 99.090 100.920 101.400 102.400 NA [2,] 100.180 101.145 102.450 99.465 101.105 101.615 102.490 NA [3,] 100.420 101.345 102.675 99.725 101.185 101.825 102.640 NA [4,] 100.875 102.265 103.345 100.670 101.235 102.060 102.855 NA [5,] 101.160 102.720 103.730 101.170 101.430 102.160 103.060 NA $n [1] 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 100.103 100.8342 102.2668 99.17539 101.1257 101.622 102.4735 NA [2,] 100.737 101.8558 103.0832 100.27461 101.2443 102.028 102.8065 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" NA Warning message: In bxp(list(stats = c(100.16, 100.18, 100.42, 100.875, 101.16, 100.81, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7hrjr1489666611.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,] 101.1371 101.100 101.2950 [2,] 101.2943 101.190 101.4013 [3,] 101.4321 101.345 101.5113 [4,] 101.7650 101.515 101.7100 [5,] 102.1029 101.730 102.0250 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 101.2174 101.1968 101.3704 [2,] 101.6468 101.4932 101.6521 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(101.137142857143, 101.294285714286, 101.432142857143, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/17j7a1489666611.ps tmp/17j7a1489666611.png",intern=TRUE)) character(0) > try(system("convert tmp/2bpkk1489666611.ps tmp/2bpkk1489666611.png",intern=TRUE)) character(0) > try(system("convert tmp/3jykt1489666611.ps tmp/3jykt1489666611.png",intern=TRUE)) character(0) > try(system("convert tmp/4vxm01489666611.ps tmp/4vxm01489666611.png",intern=TRUE)) character(0) > try(system("convert tmp/59vdf1489666611.ps tmp/59vdf1489666611.png",intern=TRUE)) character(0) > try(system("convert tmp/65pnk1489666611.ps tmp/65pnk1489666611.png",intern=TRUE)) character(0) > try(system("convert tmp/7hrjr1489666611.ps tmp/7hrjr1489666611.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.568 0.202 2.824