R version 3.2.2 (2015-08-14) -- "Fire Safety" 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(85.74,86.62,86.66,87.39,87.59,88.8,88.64,89.55,89.04,88.49,89.5,89.46,90.33,90.27,91.5,92.53,93.14,93.01,92.84,92.88,93.05,93.17,93.67,94.9,95.72,96.08,97.52,98.26,98.48,98.09,98.03,98.14,98.71,98.69,98.72,98.47,99.49,99.84,100.9,101.31,100.09,99.28,99.57,101.04,101.87,101.39,100.3,99.95,99.87,100.51,100.27,100.04,99.23,99.32,99.95,100.23,101.02,99.83,99.61,100.12,99.83,100.03,100.07,100.46,100.43,100.68,101.8,101.21,100.63,100.55,99.76,98.8) > par1 = '12' > par1 <- '12' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: root > #To cite this work: Wessa P., (2012), Mean Plot (v1.0.4) 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) > (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,] 85.74 90.33 95.72 99.49 99.87 99.83 NA [2,] 86.62 90.27 96.08 99.84 100.51 100.03 NA [3,] 86.66 91.50 97.52 100.90 100.27 100.07 NA [4,] 87.39 92.53 98.26 101.31 100.04 100.46 NA [5,] 87.59 93.14 98.48 100.09 99.23 100.43 NA [6,] 88.80 93.01 98.09 99.28 99.32 100.68 NA [7,] 88.64 92.84 98.03 99.57 99.95 101.80 NA [8,] 89.55 92.88 98.14 101.04 100.23 101.21 NA [9,] 89.04 93.05 98.71 101.87 101.02 100.63 NA [10,] 88.49 93.17 98.69 101.39 99.83 100.55 NA [11,] 89.50 93.67 98.72 100.30 99.61 99.76 NA [12,] 89.46 94.90 98.47 99.95 100.12 98.80 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.88 -0.06 0.36 0.35 0.64 0.20 NA [2,] 0.04 1.23 1.44 1.06 -0.24 0.04 NA [3,] 0.73 1.03 0.74 0.41 -0.23 0.39 NA [4,] 0.20 0.61 0.22 -1.22 -0.81 -0.03 NA [5,] 1.21 -0.13 -0.39 -0.81 0.09 0.25 NA [6,] -0.16 -0.17 -0.06 0.29 0.63 1.12 NA [7,] 0.91 0.04 0.11 1.47 0.28 -0.59 NA [8,] -0.51 0.17 0.57 0.83 0.79 -0.58 NA [9,] -0.55 0.12 -0.02 -0.48 -1.19 -0.08 NA [10,] 1.01 0.50 0.03 -1.09 -0.22 -0.79 NA [11,] -0.04 1.23 -0.25 -0.35 0.51 -0.96 NA [12,] 0.87 0.82 1.02 -0.08 -0.29 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/1nlt31444926679.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/223f01444926679.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/3ye5j1444926679.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/4fwm81444926679.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,] 85.740 86.62 86.660 87.39 87.590 88.800 88.64 89.550 89.04 88.49 [2,] 90.330 90.27 91.500 92.53 93.140 93.010 92.84 92.880 93.05 93.17 [3,] 97.605 97.96 98.795 99.15 98.855 98.685 98.80 99.185 99.67 99.26 [4,] 99.830 100.03 100.270 100.46 100.090 99.320 99.95 101.040 101.02 100.55 [5,] 99.870 100.51 100.900 101.31 100.430 100.680 101.80 101.210 101.87 101.39 [,11] [,12] [1,] 89.500 89.460 [2,] 93.670 94.900 [3,] 99.165 98.635 [4,] 99.760 99.950 [5,] 100.300 100.120 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 91.47719 91.66448 93.13807 94.03489 94.37203 94.61485 94.21382 [2,] 103.73281 104.25552 104.45193 104.26511 103.33797 102.75515 103.38618 [,8] [,9] [,10] [,11] [,12] [1,] 93.92154 94.52909 94.49966 95.23675 95.37759 [2,] 104.44846 104.81091 104.02034 103.09325 101.89241 $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(85.74, 90.33, 97.605, 99.83, 99.87, 86.62, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5yyby1444926679.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.060 -0.24 0.39 -1.220 -0.81 -0.170 -0.590 -0.58 -1.19 -1.090 -0.960 [2,] 0.200 0.04 0.39 -0.810 -0.39 -0.160 0.040 -0.51 -0.55 -0.790 -0.350 [3,] 0.355 0.55 0.57 0.085 -0.02 0.115 0.195 0.37 -0.28 -0.095 -0.145 [4,] 0.640 1.23 0.74 0.220 0.25 0.630 0.910 0.79 -0.02 0.500 0.510 [5,] 0.880 1.44 1.03 0.610 1.21 1.120 1.470 0.83 0.12 1.010 1.230 [,12] [1,] -0.29 [2,] -0.08 [3,] 0.82 [4,] 0.87 [5,] 1.02 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.07118579 -0.2175884 0.3442387 -0.5793833 -0.4328207 -0.3945755 [2,] 0.63881421 1.3175884 0.7957613 0.7493833 0.3928207 0.6245755 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.3661781 -0.468542 -0.62186712 -0.9270917 -0.6997278 0.1487324 [2,] 0.7561781 1.208542 0.06186712 0.7370917 0.4097278 1.4912676 $out [1] -0.23 $group [1] 3 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-0.0600000000000023, 0.200000000000003, 0.355000000000004, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6ur0w1444926679.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,] 85.740 90.330 97.520 99.280 99.230 99.760 NA [2,] 87.025 92.015 97.775 99.705 99.720 99.930 NA [3,] 88.565 92.945 98.200 100.195 99.995 100.445 NA [4,] 89.250 93.155 98.585 101.175 100.250 100.655 NA [5,] 89.550 93.670 98.720 101.870 101.020 101.210 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 87.55016 92.42504 97.83055 99.52452 99.75326 100.1143 NA [2,] 89.57984 93.46496 98.56945 100.86548 100.23674 100.7757 NA $out [1] 90.27 94.90 95.72 96.08 101.80 98.80 $group [1] 2 2 3 3 6 6 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(85.74, 87.025, 88.565, 89.25, 89.55, 90.33, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7g1yq1444926679.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,] 95.55833 97.9600 95.71125 [2,] 96.32333 98.6600 96.70375 [3,] 96.73500 98.8275 97.16688 [4,] 96.98500 99.1750 97.48812 [5,] 97.38667 99.6700 97.72750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 96.43321 98.59261 96.80912 [2,] 97.03679 99.06239 97.52463 $out [1] 95.16333 97.60500 $group [1] 1 2 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(95.5583333333333, 96.3233333333333, 96.735, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1nlt31444926679.ps tmp/1nlt31444926679.png",intern=TRUE)) character(0) > try(system("convert tmp/223f01444926679.ps tmp/223f01444926679.png",intern=TRUE)) character(0) > try(system("convert tmp/3ye5j1444926679.ps tmp/3ye5j1444926679.png",intern=TRUE)) character(0) > try(system("convert tmp/4fwm81444926679.ps tmp/4fwm81444926679.png",intern=TRUE)) character(0) > try(system("convert tmp/5yyby1444926679.ps tmp/5yyby1444926679.png",intern=TRUE)) character(0) > try(system("convert tmp/6ur0w1444926679.ps tmp/6ur0w1444926679.png",intern=TRUE)) character(0) > try(system("convert tmp/7g1yq1444926679.ps tmp/7g1yq1444926679.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.489 0.475 2.987